Skip to content

Instantly share code, notes, and snippets.

@davisagli
Created November 11, 2018 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davisagli/6c9c1c2d7b69ff4dcd44744774b8fede to your computer and use it in GitHub Desktop.
Save davisagli/6c9c1c2d7b69ff4dcd44744774b8fede to your computer and use it in GitHub Desktop.
schema:
{
"properties": {
"behaviors": {
"additionalProperties": {
"oneOf": [
{
"properties": {
"@type": {
"const": "behaviors.ITitle"
},
"title": {
"type": "string"
},
"additionalProperties": false
}
},
{
"properties": {
"@type": {
"const": "behaviors.IText"
},
"text": {
"type": "string"
},
"additionalProperties": false
}
}
]
}
},
"layout": {
"type": "array"
}
}
}
behavior data:
{
"behaviors": {
"1": {
"@type": "behaviors.ITitle",
"title": "my title"
},
"2": {
"@type": "behaviors.IText",
"text": "hello Tokyo"
}
},
"layout": [
"2",
"1",
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment