orval makes generated output a snapshot contract, and version 8 is a migration
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. 🍺
At a glance
- What is it?
- orval turns an OpenAPI v3 or Swagger v2 document into TypeScript clients for sixteen client targets, plus hooks and mocks. The cost is a Node 22.18 floor, a major version the project itself flags as a migration, and generated files held in place by snapshot tests rather than read by hand.
- Who is it for?
- orval suits a TypeScript team that already owns an OpenAPI document and would rather generate clients, hooks, and mocks than hand-write them. It does not suit a project stuck on an older Node LTS without Docker, and it does not suit anyone unwilling to absorb a major upgrade that the project labels a migration.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- orval-labs/orval6,659 ★ · +186
| Repository | 2026-09-23 | 2026-11-25 |
|---|---|---|
| orval-labs/orval | 6.5k | 6.7k |
186 Stars in the last 63 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Fifteen client targets come out of one generate step
One command produces models, requests, hooks, mocks, and more, and the client target is chosen rather than hand-assembled. The supported list is React, React Query, React with swr, Vue Query, Pinia Colada, Svelte Query, Solid Query, SolidStart, Angular, Angular Query, Hono, zod, Effect, Valibot, native fetch, and mcp. That range is wider than the usual query-library set: zod and Effect are schema and effect layers rather than frameworks, and native fetch means no HTTP library is imposed on you. Mocks are part of the same generate call and target Mock Service Worker, which means a component test can run against recorded handlers without a second tool. The samples directory carries sample projects for many of the targets, so the practical difference between React Query and Angular Query is something you read rather than guess.
Version 8 is labelled a migration, not a routine bump
The README puts this in an important callout before it says anything else about the tool. Version 8.0.0 and later come with a lot of improvements and changes, and the note points at a migration guide. Three releases arrived in the space the release record covers, at v8.44.0 on October 21, 2026, v8.45.0 on October 25, and v8.46.0 on October 30, so the project ships minor releases every few days within the major line it warns about. The repository is not archived and its last push is dated November 2, 2026, meaning the branch is at or just past the newest tag. The practical read for a team is that a generated client is code you now own, and adopting a major version means regenerating and reviewing the diff rather than bumping a dependency and moving on.
Node 22.18 is the floor, and the container installs orval globally
There is a hard runtime requirement and a stated escape hatch. Orval 8 and later require Node.js 22.18 or newer, and projects on an older Node LTS are told they can still run code generation with the official Docker image. The image itself is a plain npm install, not a compiled bundle:
FROM node:22-alpine
ARG ORVAL_VERSION=latest
RUN npm install -g "orval@${ORVAL_VERSION}" \
&& addgroup -g 1001 -S orval \
&& adduser -S orval -u 1001 -G orval
ENV NODE_PATH=/usr/local/lib/node_modules
WORKDIR /app
RUN chown -R orval:orval /app
USER orval
ENTRYPOINT ["orval"]Two things follow. ORVAL_VERSION defaults to latest, so the same image name resolves to whatever the registry last published unless you pin it at build time. And the base tag is node:22-alpine rather than a fixed patch level, so the image floats within Node 22 even as orval itself is versioned.
The container mounts your project at /app and renames localhost
Basic usage on macOS and Linux is one line:
# macOS / Linux
docker run --rm -v "$(pwd):/app" -w /app ghcr.io/orval-labs/orvalWindows needs three different variants of the same mount because each shell rewrites paths differently: Git Bash prefixes MSYS_NO_PATHCONV=1, CMD uses %cd% after a cd /d, and PowerShell uses ${PWD}. The longer form exists because a spec served from your machine is unreachable from inside a container by its old name:
# macOS / Linux
docker run --rm -v "$(pwd):/app" -w /app -e ORVAL_SWAGGER_URL="https://host.docker.internal:7142/swagger/v1/swagger.json" -e NODE_TLS_REJECT_UNAUTHORIZED=0 ghcr.io/orval-labs/orval --config ./orval.config.ts
# Linux (native Docker)
docker run --rm --add-host=host.docker.internal:host-gateway -v "$(pwd):/app" -w /app -e ORVAL_SWAGGER_URL="https://host.docker.internal:7142/swagger/v1/swagger.json" -e NODE_TLS_REJECT_UNAUTHORIZED=0 ghcr.io/orval-labs/orval --config ./orval.config.tsThe URL is handed over as an environment variable, the config is selected with --config, and native Linux needs the explicit host mapping because host.docker.internal is not built in there. NODE_TLS_REJECT_UNAUTHORIZED=0 is there for a development certificate, and it is worth noticing in a command that people paste into terminals.
Snapshot tests are the contract, and refreshing them is a deliberate step
The test scripts describe a project where generated output is treated as an artifact under assertion. vp run test:snapshots verifies that generated sample outputs match the committed snapshots and fails if any generated file differs. Its counterpart, vp run test:snapshots:update, regenerates those files, and the guidance is explicit that you run it when the output has intentionally changed. In between, vp run update-samples regenerates the samples using the newly built version, and vp run test:samples then runs the samples against that output. One script covers a different question: vp run test:cli tests that the generated output is valid TypeScript, validating its compilation rather than its content. That combination catches both failure modes worth caring about, a wrong shape and code that does not compile.
Bun and vp drive a workspace, and the root manifest is private
The project uses Bun for package management and building, and the repository carries bun.lock and bunfig.toml to match. The root manifest describes a workspace rather than the shipped package:
{
"name": "orval-workspaces",
"version": "8.46.0",
"private": true,
"license": "MIT",
"workspaces": [
"packages/*",
"samples/**",
"tests"
],
"type": "module",private: true and the name orval-workspaces mark this as the development root. Everything downstream hangs off it, including a postinstall that runs a script to link workspace binaries, and every task is namespaced to a filter such as packages or samples. The generated samples are therefore workspace members, which is how test:snapshots can build the packages, regenerate the samples, and compare them in one command chain. The lint story is split the same way, with separate entries for packages, samples, and tests.
Nineteen sample directories exist, fourteen are advertised
The README links fourteen sample projects: a react app, react query, svelte query, vue query, pinia colada, solid query, solid start, a react app with swr, an angular app, angular query, hono, swr with effect, a next app with fetch, and an mcp server. The repository holds more directories than that. Alongside the advertised ones there are samples/basic, samples/dynamic-ref, samples/paginated-response, samples/paginated-response-tags-split, samples/swr-with-zod, and samples/zod. There is also a playground at orval.dev/playground for trying a specification without installing anything.
Contributions have to be explainable in your own words
The contribution policy is unusual enough to state plainly. The project does not reject the use of AI agents outright, but it asks that you not submit AI-generated output in a pull request without reviewing it yourself. Every change must have a clear intent and purpose, and you should not submit changes you cannot explain in your own words. The stated division of labour is that understanding orval's codebase, TypeScript, and API clients beforehand, then reviewing what the tool produced, is the contributor's responsibility and not the reviewer's. The same section says new contributors will continue to be welcomed and supported through review and iteration. The repository layout backs that up with CONTRIBUTING.md, AGENTS.md, CODE_OF_CONDUCT.md, SECURITY.md, DEBUGGING.md, commitlint.config.mjs, a skills/ directory, and editor and automation configuration in .vscode/, .devcontainer/, and .claude-plugin/.
Editorial conclusion
orval suits a TypeScript team that already owns an OpenAPI document and would rather generate clients, hooks, and mocks than hand-write them. It does not suit a project stuck on an older Node LTS without Docker, and it does not suit anyone unwilling to absorb a major upgrade that the project labels a migration. Before adopting, read the version 8 migration guide, decide whether snapshot updates get reviewed or rubber-stamped, and confirm your Node version clears 22.18.
Frequently asked questions
what is orval
It generates type-safe JavaScript clients in TypeScript from any valid OpenAPI v3 or Swagger v2 specification, in either yaml or json format, producing models, requests, hooks, and mocks.
how to use orval
You need Node.js 22.18 or newer for version 8 and later, or you can run generation through the Docker image ghcr.io/orval-labs/orval with your project mounted at /app and your config selected with --config.
Which client targets does orval support?
React, React Query, React with swr, Vue Query, Pinia Colada, Svelte Query, Solid Query, SolidStart, Angular, Angular Query, Hono, zod, Effect, Valibot, native fetch, and mcp. Mocks target Mock Service Worker.
Why does my orval build fail inside Docker on a local API?
A spec served from your machine is not reachable as localhost from inside a container. The documented fix passes the URL through ORVAL_SWAGGER_URL pointing at host.docker.internal, and on native Linux Docker you also need --add-host=host.docker.internal:host-gateway.
How does orval verify that its generated code is correct?
vp run test:snapshots fails if any generated file differs from its committed snapshot, and vp run test:cli checks that the generated output is valid TypeScript. Refreshing snapshots is a separate deliberate step, vp run test:snapshots:update.
Does orval need Docker to run?
No. Docker is offered for projects on an older Node LTS, since orval 8 and later require Node.js 22.18 or newer when run directly.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/orval-labs-orval)Star history chart for your README
[](https://hysenlabs.com/projects/orval-labs-orval)Was this useful?