# openapi-ts/openapi-typescript

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/openapi-ts-openapi-typescript).**

7,922 stars · 618 forks · TypeScript · mit

## Links

- GitHub: https://github.com/openapi-ts/openapi-typescript
- Homepage: https://openapi-ts.dev
- awesome-repositories: https://awesome-repositories.com/repository/openapi-ts-openapi-typescript.md

## Topics

`openapi` `openapi3` `openapi3-1` `swagger` `typescript`

## Description

openapi-typescript is an OpenAPI TypeScript type generator and schema transformer. It converts JSON or YAML OpenAPI specification files into static TypeScript type definitions to provide end-to-end API type safety.

The tool functions as a static type generator that transforms external API definitions into interfaces and types. It focuses on zero-runtime type enforcement, ensuring that data consistency is maintained via the TypeScript type system without adding overhead to production bundles.

The project covers API type safety and schema conversion, facilitating the validation of request bodies and responses against a defined schema. It supports client-side validation and frontend API integration by verifying that network calls and mock data adhere to the structures defined in an OpenAPI document.

## Tags

### Development Tools & Productivity

- [Static Type Generators](https://awesome-repositories.com/f/development-tools-productivity/static-type-generators.md) — Generates static TypeScript definition files from API schemas to provide compile-time safety without runtime overhead.
- [OpenAPI to Type Conversions](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/openapi-to-type-conversions.md) — Transforms JSON or YAML API specifications into static type definitions for frontend and backend use.
- [OpenAPI Specification Parsers](https://awesome-repositories.com/f/development-tools-productivity/openapi-specification-parsers.md) — Provides the core logic for ingesting and normalizing OpenAPI JSON or YAML specification files.

### Programming Languages & Runtimes

- [Type Safety](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-safety/end-to-end/type-safety.md) — Implements architectural patterns that propagate API type definitions across the entire application stack.
- [Zero-Runtime Enforcement](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/type-system-tools/type-safety/type-integrity-enforcement/zero-runtime-enforcement.md) — Ensures data consistency by relying on the TypeScript type system instead of executing validation in production.
- [Schema-to-Type Transformations](https://awesome-repositories.com/f/programming-languages-runtimes/multi-pass-compiler-pipelines/schema-transformation-pipelines/schema-to-type-transformations.md) — Transforms JSON or YAML OpenAPI schemas into typed definitions without adding runtime overhead to bundles.

### Software Engineering & Architecture

- [Type Definition Generators](https://awesome-repositories.com/f/software-engineering-architecture/type-definition-generators.md) — Automatically synthesizes static type declaration files from API schemas for use in development. ([source](https://cdn.jsdelivr.net/gh/openapi-ts/openapi-typescript@main/README.md))
- [TypeScript Type Synthesis](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/static-type-checking/typescript-type-synthesis.md) — Synthesizes static TypeScript interfaces from OpenAPI schema definitions for end-to-end type safety.
- [Schema-Based Type Synthesis](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/static-type-checking/typescript-type-synthesis/schema-based-type-synthesis.md) — Automatically synthesizes TypeScript interfaces and types directly from structured OpenAPI schema documents.
- [Data Schema Validation](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-validation.md) — Enforces type safety and data consistency by verifying that request and response bodies match the API schema. ([source](https://openapi-ts.dev/introduction))
- [Recursive Type Resolution](https://awesome-repositories.com/f/software-engineering-architecture/generic-type-definitions/generic-type-resolution/recursive-type-resolution.md) — Implements recursive traversal of schema hierarchies to resolve nested and circular type references.

### Web Development

- [OpenAPI to TypeScript Converters](https://awesome-repositories.com/f/web-development/restful-apis/documentation-schemas/openapi-to-typescript-converters.md) — Transforms local or remote OpenAPI specification files into typed definitions for application-wide consistency. ([source](https://openapi-ts.dev/6.x/introduction))
- [API Integration Layers](https://awesome-repositories.com/f/web-development/api-integration-layers.md) — Provides a typed network layer that synchronizes backend schema definitions with frontend clients.
- [Type-Safe API Integrations](https://awesome-repositories.com/f/web-development/type-safe-api-integrations.md) — Synchronizes API schemas with TypeScript types to ensure safe data exchange across network boundaries. ([source](https://openapi-ts.dev/6.x/introduction))

### Data & Databases

- [OpenAPI Processors](https://awesome-repositories.com/f/data-databases/openapi-processors.md) — Processes OpenAPI specification files to verify that request and response structures are correct.
