Files
formulation/container/schemas/v2/collection.schema.json
T

32 lines
1.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://recipes.uuard.com/schemas/v2/collection.schema.json",
"title": "Menu or recipe collection",
"type": "object",
"required": ["schema_version", "id", "type", "name", "entries"],
"additionalProperties": false,
"properties": {
"schema_version": { "$ref": "common.schema.json#/$defs/schemaVersion" },
"id": { "$ref": "common.schema.json#/$defs/id" },
"type": { "type": "string", "enum": ["menu", "collection"] },
"name": { "$ref": "common.schema.json#/$defs/nonEmptyString" },
"description": { "type": "string" },
"entries": {
"type": "array",
"items": {
"type": "object",
"required": ["recipe_id", "order"],
"additionalProperties": false,
"properties": {
"recipe_id": { "$ref": "common.schema.json#/$defs/id" },
"recipe_revision": { "$ref": "common.schema.json#/$defs/revision" },
"order": { "type": "integer", "minimum": 1 },
"servings": { "$ref": "common.schema.json#/$defs/positiveDecimal" },
"section": { "type": "string" },
"notes": { "type": "string" }
}
}
}
}
}