Quicktype generates types — TypeScript, Effect Schema, Zod, Go, and more — from JSON Schema and OpenAPI components. When the output is wrong or generation fails, the cause is almost always in the input schemas. Validate your spec here and see exactly what to fix.
Quicktype infers types from what the schema says, not what your API does. If a schema marks a field required but the API returns null, or a $ref silently resolves to nothing, the generated Effect Schema / Zod validators will reject real responses — or Quicktype fails to generate at all. Cleaning up the source schemas is the fix; a strict validator shows you every inconsistency with line numbers.
A field sits in the required array while its type allows null — or is nullable in practice but not in the schema. Generated runtime validators (Effect Schema, Zod) then fail on real payloads. Make the schema tell the truth: either drop the nullability or drop the field from required.
References to components that don't exist or live in external files that weren't bundled. Quicktype can't infer a type from a dangling pointer. Bundle the spec into a single file (or fix the reference paths) before feeding it to the generator.
Overlapping oneOf/anyOf branches, or unions without a discriminator. Quicktype merges them into overly-loose types or picks the wrong branch. Add a discriminator or tighten the branches so each case is distinguishable.
type: object with no properties or additionalProperties becomes unknown/any in the output — which defeats the point of generating types. Spell out the shape, or declare an explicit map type.
npx quicktype -s schema schemas.json -o types.ts --lang typescript-effect-schemaTell us which generator or importer your spec has to satisfy — the most-requested target gets first-class support next.
Validate the source spec first, fix the flagged schemas, and Quicktype's output takes care of itself. Free, no account needed.
Validate My Spec Now