Recipe: OpenAPI component schema to Zod
Start with a small component rather than an entire document. This keeps the generated code readable and makes route-specific limitations easier to isolate.
The workflow
- Select OpenAPI as the source and Zod as the target.
- Choose a component entry point so unrelated paths do not distract from the schema under review.
- Run the conversion and inspect Shape IR, output, and diagnostics together.
What to review
Check object optionality, nullable fields, unions, and referenced components. A successful run means the route completed; it does not mean every OpenAPI annotation has a direct Zod equivalent.
The route directory and Playground stay linked so you can compare the current support contract with the generated code.