{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/yarnhen/main/json-schema/yarnhen-story-input-schema.json", "title": "Story (yarnhen.com)", "x-generated": "2026-09-26", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/yarnhen-openapi.yml#/components/schemas/StoryInput", "type": "object", "required": [ "title", "body", "topics" ], "properties": { "title": { "type": "string", "maxLength": 150 }, "body": { "type": "string", "description": "150 to 2", "500 words": null }, "topics": { "$ref": "#/$defs/Topics" }, "location": { "$ref": "#/$defs/Location" } }, "$defs": { "Location": { "type": "object", "required": [ "country" ], "properties": { "country": { "type": "string", "pattern": "^[A-Z]{2}$" }, "state": { "type": "string", "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$" }, "city": { "type": "object", "required": [ "geonames_id", "name" ], "properties": { "geonames_id": { "type": "integer" }, "name": { "type": "string" } } } } }, "Topics": { "type": "array", "minItems": 1, "maxItems": 5, "items": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 } } } }