Skip to content

Commit

Permalink
Initial schema draft
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephAbbey committed Jan 12, 2024
1 parent 4665d14 commit cec10bb
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,35 @@
"name": { "title": "Your familiar name", "type": "string" },
"type": {
"title": "Menu item type",
"description": "One of 'tap, 'toggle' or 'group'.",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"const": "toggle"
}
},
"required": ["entity", "name", "type"],
"additionalProperties": false
},
"template": {
"type": "object",
"properties": {
"name": { "title": "Your familiar name", "type": "string" },
"content": { "title": "What to display (template)", "type": "string" },
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"const": "template"
}
},
"required": ["name", "content", "type"],
"additionalProperties": false
},
"tap": {
"type": "object",
"properties": {
"entity": { "$ref": "#/$defs/entity" },
"name": { "title": "Your familiar name", "type": "string" },
"type": {
"title": "Menu item type",
"description": "One of 'tap, 'toggle' or 'group'.",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"const": "tap"
},
"service": {
Expand All @@ -54,7 +68,7 @@
"title": { "type": "string" },
"type": {
"title": "Menu item type",
"description": "One of 'tap, 'toggle' or 'group'.",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"const": "group"
},
"items": { "$ref": "#/$defs/items" }
Expand All @@ -66,8 +80,9 @@
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/$defs/toggle" },
{ "$ref": "#/$defs/tap" },
{ "$ref": "#/$defs/template" },
{ "$ref": "#/$defs/toggle" },
{ "$ref": "#/$defs/menu" }
]
}
Expand Down

0 comments on commit cec10bb

Please sign in to comment.