OpenAPI TypeScript provides comprehensive examples demonstrating integration with various frameworks, libraries, and HTTP clients. All examples use the Swagger Petstore API and include complete, working code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hey-api/openapi-ts/llms.txt
Use this file to discover all available pages before exploring further.
Available Examples
Angular
Integration with Angular using @angular/common/http
React Query
React with TanStack Query for data fetching
Next.js
Next.js App Router with server and client components
Nuxt
Nuxt 3 with official @hey-api/nuxt plugin
Additional Framework Examples
The repository includes many more examples:- Vue - TanStack Query, Pinia Colada state management
- Svelte - TanStack Svelte Query
- HTTP Clients - Axios, Fetch, Ky, ofetch
- Backend - Fastify server integration
- OpenAI - OpenAI API integration
Example Structure
Each example includes:- Configuration -
openapi-ts.config.tswith framework-specific setup - Generated Code - Type-safe clients, SDKs, and schemas
- Usage Examples - Real components showing API integration
- Complete Project - Runnable application with dependencies
Running Examples Locally
All examples are in the GitHub repository:Regenerating Client Code
To regenerate the API client code for all examples:openapi-ts for each example based on their openapi-ts.config.ts configuration.