GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

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. 🍺

  • 语言TypeScript
  • 默认分支master
  • 大小39.9 MB
  • 更新1 天前
  • Issues15
在 GitHub 打开
avatarorval-labs

项目介绍

orval-labs/orval 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 6.6k 个 Star、702 次 Fork。

仓库全名
orval-labs/orval

README 摘要

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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

orval 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 6.6k 个 Star。

orval 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 orval 的源码?

可以直接克隆仓库:git clone https://github.com/orval-labs/orval.git,默认分支为 master;安装与运行步骤见仓库 README。

orval 最近还在维护吗?

仓库最近一次更新为 1 天前,当前有 15 个未关闭 Issue;Star 数为 6.6k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

freeCodeCamp/freeCodeCamp avatar
freeCodeCampfreeCodeCamp
1 小时前
458.8k
47.2k
89

freeCodeCamp.org 的开源代码库和课程体系。免费学习数学、编程和计算机科学。

learn-to-codenonprofitsprogramming+7
TypeScript
571.9 MB
9
详情
morluto/rea avatar
reamorluto
27 分钟前
445.8k
109.8k
869

借助智能体逆向分析任何内容,从应用行为直至原生二进制文件。

agent-skillsaiandroid+17
TypeScript
143.5 MB
0
详情
openclaw/openclaw avatar
openclawopenclaw
9 分钟前
394.2k
82.9k
8.1k

真正做实事的 AI。任何 OS。任何平台。龙虾之道。🦞

aiassistantcrustacean+4
TypeScript
12.9 GB
18
详情
nilbuild/developer-roadmap avatar
developer-roadmapnilbuild
6 小时前
371.6k
45.7k
5

交互式路线图、指南及其他教育内容,帮助开发者在职业生涯中成长。

computer-scienceroadmapdeveloper-roadmap+7
TypeScript
356.1 MB
2
详情
deepseek-ai/deepseek-harness avatar
deepseek-harnessdeepseek-ai
5 天前
277.2k
34.0k
0

DeepSeek Harness:一切皆插件。

ai-agentscordisdsh+1
TypeScript
351.8 MB
3
详情
anomalyco/opencode avatar
opencodeanomalyco
39 分钟前
225.7k
30.5k
4.2k

开源编码代理。

TypeScript
671.7 MB
0
详情
vuejs/vue avatar
vuevuejs
2024年10月10日
212.6k
33.8k
368

这是 Vue 2 的仓库。如需 Vue 3,请前往 https://github.com/vuejs/core

frameworkfrontendjavascript+1
TypeScript
31.4 MB
0
详情
n8n-io/n8n avatar
n8nn8n-io
51 分钟前
209.9k
61.4k
1.2k

具备原生 AI 能力的公平代码工作流自动化平台。将可视化构建与自定义代码相结合,支持自托管或云端部署,提供 400+ 种集成。

automationipaasn8n+7
TypeScript
783.9 MB
3
详情

关于

angularaxios-clientcodegenfakermockmswopenapi-specificationorvalreactreact-queryswaggertypescript
  • MIT License
  • 6.6k Stars
  • 702 Forks
  • 13 Watching

简要分析

热度分
8015
价值分
4169
活跃状态
活跃
GitHub

语言占比

Dockerfile
JavaScript
SCSS
TypeScript

Release

  • Release v8.47.01 天前
  • Release v8.46.01 周前
  • Release v8.45.02 周前
  • Release v8.44.02 周前
  • Release v8.43.03 周前

贡献者

anymaniaxanymaniaxdependabot[bot]dependabot[bot]mellowaremellowaresoartec-labsoartec-labsnebjornsnebjornwadakatuwadakatuAllieJonssonAllieJonssongithub-actions[bot]github-actions[bot]the-ultthe-ultzeriongzeriongErfanBagheri404ErfanBagheri404dependabot-preview[bot]dependabot-preview[bot]

npm version NPM Downloads License: MIT Gurubase pkg.pr.new

orval - Restfull Client Generator

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
  • Valibot
  • 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

# 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)

# 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.ts

# Windows Git Bash
MSYS_NO_PATHCONV=1 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

# Windows CMD
cd /d "C:\path\to\your-project"
docker run --rm -v "%cd%:/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

# Windows PowerShell
cd "C:\path\to\your-project"
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

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.

Become a sponsor

Backers

Thank you to all our backers! 🙏

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

Backer Backer Backer tatsuya-asami

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

All Thanks To Our Contributors:

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
5.1万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。