99 lines
2.5 KiB
JSON
99 lines
2.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Speiseplan",
|
|
"type": "object",
|
|
"properties": {
|
|
"Allergens": {
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"\\d+_\\d*": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Id": {
|
|
"title": "Allergen identifier",
|
|
"type": "string"
|
|
},
|
|
"Label": {
|
|
"title": "Allergen label",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["Id", "Label"]
|
|
}
|
|
}
|
|
},
|
|
"Products": {
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"\\d+": {
|
|
"properties": {
|
|
"AllergenIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"uniqueItems": true
|
|
},
|
|
"ProductId": {
|
|
"type": "integer"
|
|
},
|
|
"Name": {
|
|
"title": "Product name",
|
|
"type": "string"
|
|
},
|
|
"Price": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Betrag": {
|
|
"title": "Preis in Euro",
|
|
"type": "number",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"required": ["Betrag"]
|
|
}
|
|
},
|
|
"required": ["AllergenIds", "ProductId", "Name", "Price"]
|
|
}
|
|
},
|
|
"Rows": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Name": {
|
|
"title": "Category name",
|
|
"type": "string"
|
|
},
|
|
"Days": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Weekday": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 4
|
|
},
|
|
"ProductIds": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ProductId": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": ["ProductId"]
|
|
}
|
|
},
|
|
"required": ["Weekday", "ProductIds"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["Name", "Days"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": ["Allergens", "Products", "Rows"]
|
|
}
|