For people searching batch JSON schema generator, this page matches the intent well. It is not a generic utility; JSON Schema Generator is built around draft-07; it avoids writing a one-off script, and the result is easy to keep working with.
What this does
- Walks the sample JSON recursively and emits a Draft-07 schema
- Picks the right
typefor each leaf: string / integer / number / boolean / null - For arrays, infers the items schema by sampling all elements (uses oneOf if heterogeneous)
- For objects, generates
propertiesand (optionally)requiredfrom observed keys - Detects common string formats (email, uri, date, date-time, uuid, ipv4)
Workflow
- Paste a representative API response or config sample
- Tweak
requiredandadditionalPropertiesbased on your contract - Copy into your repo as a schema file or paste into an OpenAPI
components.schemasblock - Use with
ajv,jsonschema(Python),gojsonschemaor any validator