# Orval: 7.7 out of 10

A strong pick. 2nd of 9 in [OpenAPI tools](https://elestia.ai/opensource/openapi/index.md).

Orval generates TypeScript clients from an OpenAPI or Swagger spec, along with TanStack Query, SWR and Vue Query hooks, Zod schemas and MSW mocks. It is a strong pick for frontend teams that want all of those from one config. Run version 8.21.0 or later, because older versions have critical code-injection advisories.

**Best for:** Frontend teams that want typed query hooks, Zod schemas and MSW mocks generated from one OpenAPI spec.

## Scores

- **Overall: 7.7** (likely 6.5 to 8.4)
  - Claude Opus 5.5 (7.5): Orval is the best pick for generating frontend data-fetching hooks, validation and mocks from OpenAPI, and it is actively maintained. openapi-typescript is the simpler and more widely used choice when you only need types, and Hey API is growing faster as an SDK generator. The recent run of critical code-injection advisories lowers the score: pin a version of 8.21.0 or later and treat the spec as code.
  - GPT-6.2 Sol (7.8): Orval is a strong new-project choice when a team wants a typed frontend client, query hooks, and test mocks from a spec it controls. Frequent releases and documented production use support that choice, and openapi-typescript has ended updates. Hey API can produce a leaner SDK with interceptors, while Kubb has more complete OpenAPI 3.2 coverage in its published tests. The range reflects the impact of spec complexity, build-time security, and the amount of generated code a team needs.
- **Needed by many: 5.9** (likely 4.8 to 7.1)
  - Claude Opus 5.5 (6.0): Most web apps that call a documented HTTP API can use a generated typed client. Orval covers only the client and mock side of the category, not docs or linting. It leans towards frontend data-fetching libraries.
  - GPT-6.2 Sol (5.8): Generating typed calls from an OpenAPI spec is useful to a sizable group of web teams. Orval supports several frontend frameworks and plain Fetch, but its main workflow starts with an existing spec and centers on TypeScript client code. API and frontend surveys show demand for the surrounding workflow, with limited evidence on how many JS and TS teams maintain a suitable spec.
- **Helps a lot: 8.0** (likely 6.9 to 8.9)
  - Claude Opus 5.5 (8.0): No peer generates as much ready-to-use frontend code: hooks, Zod with runtime validation in v8, and mocks. Independent comparisons say it is faster than Hey API and Kubb, but its output is large. Its limits are fetch defaults that need a workaround and some edge cases such as NullEnum, and it is too heavy for teams that only need types.
  - GPT-6.2 Sol (7.9): Orval 8.48.0 combines typed clients, ready-to-use query hooks, schemas, and mocks, with configuration examples that coding agents can follow. Runtime response validation depends on the client and can require extra work with a custom request function. Kubb's comparison found partial OpenAPI 3.2 coverage and slower generation on its largest test specs. Benchmarks on nearby Orval versions found that generation time and TypeScript errors varied by spec, which widens the range for complex APIs.
- **Holds up over time: 8.0** (likely 6.9 to 9.0)
  - Claude Opus 5.5 (8.0): The project has existed since 2020 and is very active, with 1,222 commits, 74 releases and 426 contributors. Issues are kept under control: 22 open against 1,635 closed. It is community-maintained with no large corporate backer, which keeps the range from going higher.
  - GPT-6.2 Sol (8.0): Orval shipped 74 GitHub releases and logged 1,222 commits in the past year, with several contributors in the latest release. A pull request addressing a reported v8 validation problem merged within a week. The move to ESM, the higher Node.js minimum, and changed defaults made v8 an upgrade that required work. Public sponsorship is modest, and the number of people who can approve an npm release is unclear.
- **Used widely: 5.8** (likely 4.5 to 7.1)
  - Claude Opus 5.5 (6.5): Downloads grew 7.4x in a year, well above the 4.1 median, but behind Hey API (9.9x) and openapi-typescript (9x). ecosyste.ms counts 305 dependent repositories, far fewer than openapi-typescript's 8,379. That suggests tens of thousands of projects use it, with fewer direct choices than the leaders.
  - GPT-6.2 Sol (5.1): Four-week downloads rose from 2.07 million to 15.27 million, about 7.4× the prior year and above the 4.1× catalog median. Hey API and openapi-typescript grew faster over the same period, while Orval grew almost as fast as Kubb from a larger base. Ecosyste.ms found 305 dependent repositories and 39 packages, well below openapi-typescript's indexed repository count. Automated installs, incomplete indexing, and sparse discussion make the number of projects choosing Orval hard to pin down.
- **Vouched for: 6.6** (likely 5.2 to 7.7)
  - Claude Opus 5.5 (6.0): Several independent 2026 comparisons name it the pick for hooks, Zod and mocks, and one user reports using it in production. No large company backs it publicly, and there are no survey results on it. Discussion on Hacker News and Bluesky is thin.
  - GPT-6.2 Sol (7.2): PostHog documents a workflow that uses Orval for API clients, types, and Zod schemas, and Superimpress documents its use for React Query hooks. Studocu reported less boilerplate in its Next.js migration, and independent users report that the generated hooks work well. Comparative tests support Orval's range of outputs but show mixed results for generated size and speed. Broad satisfaction and retention data for Orval itself are sparse.
- **Safe: 5.5** (likely 4.3 to 7.0)
  - Claude Opus 5.5 (5.0): There have been 12 advisories in 24 months. They include critical RCE through crafted specs injected into generated code, earlier command injection, and SSRF through $ref. The fixes shipped (8.21.0 and earlier patches), but the number points to weak escaping in the code generator. The risk applies mainly when the spec is untrusted. The package pulls in 26 dependencies, there is no Scorecard, and the licence is MIT.
  - GPT-6.2 Sol (6.0): The MIT license is permissive, and the generator has 26 direct dependencies. Fixes for the five critical advisories highlighted in the bundle shipped in 8.21.0 before public disclosure, and another critical October advisory was patched in 8.40.0. Repeated code execution bugs in generated output make untrusted specs a material concern. The release workflow checks for unsafe lifecycle scripts and publishes through GitHub Actions using an npm token, and the missing OpenSSF Scorecard leaves some controls unverified.

## Good

- One config file generates the client, TanStack Query, SWR or Vue Query hooks, Zod schemas, and MSW and Faker mocks.
- Custom mutators and per-operation overrides make auth, token refresh and Next.js fetch options easy to add.
- Very active project: about 1,200 commits and 74 releases in the last year, with only 22 open issues.
- Users report the output is more stable than the faster-changing Hey API.

## Bad

- Twelve advisories in 24 months, several of them critical code injection from crafted specs, fixed in 8.21.0.
- Large specs produce thousands of generated files and big diffs on every schema change.
- The default fetch client does not throw on 4xx or 5xx responses, so callers must check the status or add a mutator.
- Too heavy if you only need types; openapi-typescript is faster and simpler for that.

## The numbers

- Downloads, 4 weeks: 15M
- In a year: ×7.4
- GitHub stars: 6.6k
- Commits, 12 months: 1.2k
- Last npm release: Nov 2026
- Advisories, 24 months: 12
- Licence: MIT
- GitHub: https://github.com/orval-labs/orval
- npm: https://www.npmjs.com/package/orval

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
