Generate Zod schemas from any JSON API — no OpenAPI spec required

📰 Dev.to · Jayesh Bansal

Generate Zod schemas from any JSON API without an OpenAPI spec using apitype

intermediate Published 11 Jun 2026
Action Steps
  1. Use apitype to infer Zod schemas from live API responses
  2. Configure apitype to target specific JSON APIs
  3. Run apitype to generate Zod schemas
  4. Test the generated schemas with sample API data
  5. Apply the generated schemas to validate API requests and responses
Who Needs to Know This

Backend developers and API designers can benefit from this technique to generate schemas for APIs without OpenAPI specs, streamlining their development process

Key Insight

💡 apitype can infer Zod schemas from live API responses, eliminating the need for an OpenAPI spec

Share This
🚀 Generate Zod schemas from any JSON API with apitype! No OpenAPI spec required 🤯

Key Takeaways

Generate Zod schemas from any JSON API without an OpenAPI spec using apitype

Full Article

Most APIs don't ship an OpenAPI spec. apitype infers Zod, TypeBox, TS, and JSON Schema straight from live responses.
Read full article → ← Back to Reads