// the find
orval-labs/orval
orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Orval generates type-safe TypeScript API clients from OpenAPI v3/Swagger v2 specs, targeting React Query, SWR, Angular, Svelte, Vue, Solid, Hono, and more. It also generates MSW mocks and Zod schemas from the same spec, making it a one-stop codegen tool for frontend teams. If your team is tired of hand-rolling fetch wrappers every time the backend ships a new endpoint, this is the category of tool you reach for.
The breadth of output targets is genuinely impressive — one config file, same spec, and you get React Query hooks, MSW handlers for tests, and Zod validators without writing any of it yourself. The monorepo structure with per-client packages (packages/angular, packages/axios, etc.) means you only pull in what you need rather than a single bloated bundle. The playground at orval.dev lets you paste a spec and see generated output immediately, which dramatically reduces the evaluation cost for new adopters. The snapshot test suite (test:snapshots) catches silent regressions in generated code — a real problem in codegen tools that most skip.
The config surface area is enormous and the docs don't always make clear which options interact with which output targets — you will end up reading source code to understand edge cases with custom mutators or split-mode output. Real-world OpenAPI specs that use allOf/oneOf/anyOf heavily tend to produce awkward TypeScript unions or flat types that lose the discriminator information; this is a fundamental hard problem but orval's handling is not better than competitors. The mock generation via faker is shallow — it generates structurally valid data but semantically meaningless values, so mocks are fine for unit tests but useless for demos or realistic dev environments. There is no first-class story for runtime validation of API responses (the Zod output is opt-in and separate from the client), so type safety at the boundary is still on you to wire up.