openapi-typescript-codegen is a code generator that produces TypeScript or JavaScript HTTP clients from OpenAPI specifications.
The tool solves the problem of manually writing API client code by automatically generating type-safe clients from OpenAPI schema definitions. It parses OpenAPI v2.0 and v3.0 specifications in JSON or YAML format and outputs ready-to-use TypeScript or JavaScript client libraries. The generated clients can use multiple HTTP backends including Fetch, Node-Fetch, Axios, Angular, or XHR, allowing developers to choose the transport layer that fits their project.
The tool is lightweight and framework-agnostic, making it suitable for frontend projects that want to avoid Java-based code generation in their build pipelines. It supports generation through multiple interfaces: CLI, Node.js API, and NPX. The generated clients include features like request cancellation through a cancelable promise pattern and support for external schema references via JSON Schema reference resolution. Developers should be aware that the original maintainer has announced the project is unmaintained and recommends migrating to the actively maintained fork at hey-api/openapi-ts.
The project shows minimal recent development activity with no active maintenance, and the original author has explicitly directed users toward an alternative maintained fork rather than continuing work on this codebase.