Package Exports
- openapi-ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openapi-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenApi/Swagger to TypeScript definitions!
This tool generates TypeScript interfaces/Enums to all entities that you specified on swagger/openapi spec.
Note: this generates only interfaces and Enums
Installation
npm install --save-dev openapi-ts
Generating types (CLI)
npx openapi-ts -i ./src/api-docs.json -o ./gen.d.ts
Generating types (javascript module)
const { generate } = require('openapi-ts');
generate(openAPISpecPath, outputPath);