Skip to content

Instantly share code, notes, and snippets.

@andrey-reznik
Last active September 23, 2019 18:58
Show Gist options
  • Select an option

  • Save andrey-reznik/a3d1db225c9cade0d9d30ce480978c80 to your computer and use it in GitHub Desktop.

Select an option

Save andrey-reznik/a3d1db225c9cade0d9d30ce480978c80 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"sections": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"form": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"method": {
"type": "string"
},
"title": {
"type": "string"
},
"inputs": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"label": {
"type": "string"
},
"placeholder": {
"type": "string"
}
},
"required": [
"id",
"type",
"label",
"placeholder"
]
}
]
},
"buttons": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"text": {
"type": "string"
},
"class": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"text",
"class"
]
}
]
}
},
"required": [
"action",
"method",
"title",
"inputs",
"buttons"
]
},
"tabs": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"id",
"name",
"text"
]
}
]
},
"content": {
"type": "array",
"items": [
{
"type": "object"
}
]
}
},
"required": [
"list",
"content"
]
},
"modals": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
]
}
},
"required": [
"id",
"name",
"form",
"tabs",
"modals"
]
}
]
}
},
"required": [
"sections"
]
}
{
"sections": [
{
"id": "str",
"name": "str",
"form": {
"action": "str",
"method": "str",
"title": "str",
"inputs": [
{
"id": "str",
"type": "str",
"label": "str",
"placeholder": ""
}
],
"buttons": [
{
"id": "str",
"name": "str",
"type": "str",
"text": "str",
"class": "str"
}
]
},
"tabs": {
"list": [
{
"id": "",
"name": "",
"text": ""
}
],
"content": [
{}
]
},
"modals": [
{
"id": "",
"name": ""
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment