{ "$id": "recipes", "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "required": [ "title", "description" ], "properties": { "title": { "type": "string", "minLength": 1 }, "description": { "type": "string" }, "prepTime": { "type": "integer", "minimum": 0 }, "cookTime": { "type": "integer", "minimum": 0 }, "servings": { "type": "integer", "minimum": 1 }, "image": { "type": "string" }, "instructions": { "type": "string" }, "difficulty": { "type": "string", "enum": [ "easy", "medium", "hard" ] }, "author": { "type": "string", "x-relation": { "collection": "users", "type": "single" } }, "cuisine": { "type": "string", "x-relation": { "collection": "cuisines", "type": "single" } }, "tags": { "type": "array", "items": { "type": "string" }, "x-relation": { "collection": "tags", "type": "multiple", "maxItems": 10 } } } }