openapi-to-ts-definitions
v1.0.4
Published
Transforms OpenAPI components into TypeScript interfaces
Downloads
2
Readme
openapi-to-ts-definitions
Transforms OpenAPI 3.1 component schemas into TypeScript definitions.
Usage
npx openapi-to-ts-definitions --input-file api/my-openapi-spec.yaml --output-file models.ts
Note that it's expected that your API YAML meets OpenAPI 3.1 specifications or the results may be unexpected.
Command line arguments
--input-file
Description: The path to the input file that contains the OpenAPI YAML.
--output-file
Description: The path to where the results should be written.
Default value: models.ts