Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

orval

> 前端框架
Open source

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 for

6.3K stars0 likes1 views
WebsiteGitHub

About

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 for

Generate Typescript clients from OpenAPI specification!

Code Generation

orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats.

[!IMPORTANT] Version 8.0.0+ comes with a lot of improvements and changes please see the Migration Guide

Supported clients

generate models, requests, hooks, mocks and more, for these supported clients:

  • React
  • React Query
  • React with swr
  • Vue Query
  • Pinia Colada
  • Svelte Query
  • Solid Query
  • SolidStart
  • Angular
  • Angular Query
  • Hono
  • zod
  • Effect
  • native fetch
  • mcp

Samples

You can find some samples below:

  • react app
  • react query
  • svelte query
  • vue query
  • pinia colada
  • solid query
  • solid start
  • react app with swr
  • angular app
  • angular query
  • hono
  • swr with effect
  • next app with fetch
  • mcp server

Playground

Try Orval out for yourself using our Playground application!

Docker

Orval 8+ requires Node.js 22.18 or newer. Projects on an older Node LTS can run code generation with the official Docker image.

Basic usage

bash
# macOS / Linux
docker run --rm -v "$(pwd):/app" -w /app ghcr.io/orval-labs/orval

# Windows Git Bash
MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd):/app" -w /app ghcr.io/orval-labs/orval

# Windows CMD
cd /d "C:\path\to\your-project"
docker run --rm -v "%cd%:/app" -w /app ghcr.io/orval-labs/orval

# Windows PowerShell
cd "C:\path\to\your-project"
docker run --rm -v "${PWD}:/app" -w /app ghcr.io/orval-labs/orval

Local API (localhost → host.docker.internal)

…

Replace ghcr.io/orval-labs/orval with orval:local when testing locally before the official image is published. See the installation docs for details.

A note about AI

First of all, we do not reject the use of AI agents outright. That said, please do not submit AI-generated output in a PR without reviewing it yourself. Every change must have a clear intent and purpose — do not submit changes you cannot explain in your own words. Making the effort to understand orval's codebase, TypeScript, and API clients beforehand, and reviewing what AI produces, is the contributor's responsibility, not the reviewer's. Finally, we will continue to welcome new contributors and actively support you through review and iteration.

See CONTRIBUTING.md for details.

Developers

This project uses Bun for package management and building. Bun install guide.

Build Scripts

  • vp run nuke:all - Completely clean your workspace by removing all build artifacts, node_modules, and cached files. Use this when you want to start fresh.

  • vp run build - Build the project and make changes available to the workspace. Run this after making code changes to compile TypeScript and prepare the project for use.

  • vp run typecheck - Run TypeScript type checking across all packages.

Test Scripts

  • vp run test - Run unit tests in all packages.

  • vp run update-samples - Generate sample outputs using the newly built version of Orval. This regenerates the sample code based on the current build.

  • vp run test:samples - Run tests in the samples directory using the newly generated output from update-samples.

  • vp run test:snapshots - Run snapshot tests to verify generated sample outputs match the committed snapshots. Fails if any generated file differs from its snapshot.

  • vp run test:snapshots:update - Regenerate snapshot files to match the current generated output. Run this after vp run update-samples when the generated output has intentionally changed.

  • vp run test:cli - Test that the generated output (not samples) is valid TypeScript. This validates the TypeScript compilation of the generated code.

Development Workflow

A typical development workflow would be:

  1. Make your code changes
  2. Run vp run build to compile your changes
  3. Run vp run typecheck to verify package typings
  4. Run vp run lint to catch lint issues early
  5. Run vp run test to run unit tests in packages
  6. Run vp run test:snapshots to verify generated output matches snapshots

If step 6 fails because the generated output has intentionally changed, run vp run test:snapshots:update to update the snapshots.

If you encounter issues or want to start completely fresh:

  1. Run vp run nuke:all to clean everything
  2. Reinstall dependencies and rebuild from scratch

Sponsors

Thank you to all our sponsors!

Support orval development by Open Collective and your logo will be displayed here with a link to your website.

Backers

Thank you to all our backers!

Support us with a one-time donation and help us continue our activities on Open Collective.

Note: After becoming a sponsor or backer, please contact us on Discord to upload your logo.

All Thanks To Our Contributors:

Issues· 25 open

View all issuesOpen on GitHub
  • #3832

    feat(core): artifact groups with per-group entry-point barrels

    enhancementUpdated Sep 23, 2026
  • #4188

    feat(angular): add opt-in runtime validation for Angular request bodies with generated Zod schemas

    angularUpdated Sep 22, 2026
  • #3016

    Publish to JSR

    enhancementUpdated Sep 22, 2026
  • #4138

    Zod: Runtime validation and output schemas are missing for primitive response types

    help wantedzodUpdated Sep 22, 2026
  • #3786

    Keep configuration reference aligned with public types and document callback parameters

    documentationUpdated Sep 20, 2026
  • #2256

    Playwright client generation

    enhancementhelp wantedUpdated Sep 20, 2026
  • #1383

    [Feature] Add ability to pass custom types for a string given a format hint

    enhancementUpdated Sep 20, 2026
  • #4151

    Add JSON schema support to the Playground

    documentationhelp wantedUpdated Sep 19, 2026
  • #2432

    Generated branded types for OpenAPI aliases

    enhancementUpdated Sep 15, 2026
  • #3948

    fetch: Up to 85% less generated code with a new fetch client generation style

    fetchUpdated Sep 13, 2026

> Tags

TypeScriptangularaxios-clientcodegenfaker

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 25, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架