{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/yawplet/main/json-schema/yawplet-classified-input-schema.json", "title": "Classified ad (hagglebee.com)", "x-generated": "2026-09-26", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/yawplet-openapi.yml#/components/schemas/ClassifiedInput", "type": "object", "required": [ "title", "body", "category", "topics", "location" ], "properties": { "title": { "type": "string", "maxLength": 120 }, "body": { "type": "string", "maxLength": 4000, "description": "No email addresses or phone numbers; buyers use the contact relay." }, "category": { "type": "string", "enum": [ "for-sale", "wanted", "services", "free", "community", "vehicles", "tickets" ] }, "price": { "type": "object", "required": [ "amount", "currency" ], "properties": { "amount": { "type": "number", "minimum": 0 }, "currency": { "type": "string", "pattern": "^[A-Z]{3}$" } } }, "condition": { "type": "string", "enum": [ "new", "like-new", "good", "fair", "for-parts" ] }, "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 } } } }