{ "$schema": "http://json-schema.org/schema", "$id": "https://tildegit.org/jakew/cookbook/raw/branch/main/recipe.schema.json", "title": "Recipe", "description": "A recipe", "type": "object", "required": ["title", "author", "date", "ingredients", "instructions"], "properties": { "title": { "description": "The title of the recipe", "type": "string" }, "description": { "description": "A short sentence describing what the recipe makes", "type": "string" }, "author": { "description": "The author of this recipe", "type": "object", "properties": { "username": { "description": "The username of the author on the given tilde", "type": "string" }, "tilde": { "description": "Which tilde the user lives on", "type": "string", "pattern": "^https?://(.*)\\.(.*)/" } }, "required": ["username", "tilde"] }, "date": { "description": "The date this recipe was added to the cookbook", "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "source": { "description": "The source of the recipe, for example, the website or book it was copied from", "type": "string" }, "timings": { "description": "The timings of the recipe", "type": "object", "properties": { "prep": { "description": "The time it takes to collect, prepare and combine the ingredients into the pot/pan/oven", "type": "integer", "minimum": 0 }, "cook": { "description": "The time it takes to actually cook the dish", "type": "integer", "minimum": 0 } }, "required": ["prep", "cook"] }, "servings": { "description": "The number of people this dish serves", "type": "integer", "minimum": 1 }, "ingredients": { "description": "The ingredients needed to complete the recipe", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "instructions": { "description": "The steps needed to make the dish", "type": "array", "items": { "type": "string" } } } }