This package contains TypeScript definitions for OpenAPI. It may be useful in all kind of TypeScript projects that work with OpenAPI directly, for example, in code generators, in documentation generators and other kinds of projects.
Supported OpenAPI versions:
Since OpenAPI specification relies on JSON Schema specification, this package also has @fosfad/json-schema-typescript-definitions package in its dependencies which provides type definitions for JSON Schema.
Install the definitions:
npm install @fosfad/openapi-typescript-definitions
Import OpenAPI
(and other needed types):
import { OpenAPI } from '@fosfad/openapi-typescript-definitions/3.1.0';