|
| 1 | +[](https://badge.fury.io/js/orval) |
| 2 | +[](https://opensource.org/licenses/MIT) |
| 3 | +[](https://github.com/orval-labs/orval/actions/workflows/tests.yaml) |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <img src="./logo/orval-logo-horizontal.svg?raw=true" width="500" height="160" alt="orval - Restfull Client Generator" /> |
| 7 | +</p> |
| 8 | +<h1 align="center"> |
| 9 | + Visit <a href="https://orval.dev" target="_blank">orval.dev</a> for docs, guides, API and beer! |
| 10 | +</h1> |
| 11 | + |
| 12 | +### Code Generation |
| 13 | + |
| 14 | +`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. |
| 15 | + |
| 16 | +`Generate`, `valid`, `cache` and `mock` in your React, Vue, Svelte and Angular applications all with your OpenAPI specification. |
| 17 | + |
| 18 | +### How to use the generated mcp server |
| 19 | + |
| 20 | +Add a setting to the mcp client to launch the generated `server.ts`. |
| 21 | +For example, like this: |
| 22 | + |
| 23 | +``` |
| 24 | +"pet-store-server": { |
| 25 | + "command": "docker", |
| 26 | + "args": [ |
| 27 | + "run", |
| 28 | + "-i", |
| 29 | + "--rm", |
| 30 | + "pet-store-mcp", |
| 31 | + "bash", |
| 32 | + "-c", |
| 33 | + "ts-node", |
| 34 | + "src/gen/server.ts" |
| 35 | + ], |
| 36 | + "disabled": false, |
| 37 | + "alwaysAllow": [] |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +Here, `src/gen/server.ts` is started using `Docker`. |
| 42 | + |
| 43 | +### Samples |
| 44 | + |
| 45 | +You can find below some samples |
| 46 | + |
| 47 | +- [react app](https://github.com/orval-labs/orval/tree/master/samples/react-app) |
| 48 | +- [react query](https://github.com/orval-labs/orval/tree/master/samples/react-query) |
| 49 | +- [svelte query](https://github.com/orval-labs/orval/tree/master/samples/svelte-query) |
| 50 | +- [vue query](https://github.com/orval-labs/orval/tree/master/samples/vue-query) |
| 51 | +- [react app with swr](https://github.com/orval-labs/orval/tree/master/samples/react-app-with-swr) |
| 52 | +- [angular app](https://github.com/orval-labs/orval/tree/master/samples/angular-app) |
| 53 | +- [hono](https://github.com/orval-labs/orval/tree/master/samples/hono) |
| 54 | +- [next app with fetch](https://github.com/orval-labs/orval/tree/master/samples/next-app-with-fetch) |
0 commit comments