Orval API Client Generator
Generates type-safe TypeScript API clients, hooks, and schemas from OpenAPI or Swagger specifications.
Orval is a powerful tool designed to bridge the gap between backend API specifications and frontend development by automatically generating robust, type-safe clients. It supports a wide range of popular libraries including TanStack Query, SWR, Axios, and Zod, while providing built-in support for MSW mock generation and Hono server handlers. By automating the creation of boilerplate code from OpenAPI v3 or Swagger v2 specs, Orval ensures that your frontend and backend stay perfectly in sync, reducing runtime errors and improving developer productivity across React, Vue, Svelte, Angular, and SolidJS projects.
主要功能
015,556 GitHub stars
02Type-safe client generation for React Query, SWR, Axios, and Fetch.
03Automatic Zod schema and MSW mock generation for validation and testing.
04Support for multiple output modes including single-file, split, or tag-based organization.
05Highly configurable with custom HTTP mutators and authentication patterns.
06Seamless integration with Hono for server handlers and MCP for AI tools.
使用场景
01Synchronizing frontend types and API hooks with a backend OpenAPI specification.
02Generating MSW mock data automatically for unit and integration testing.
03Building type-safe server-side handlers for Hono using existing API definitions.