Skip to content

danielgek/openapi-ts

Repository files navigation

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);

About

OpenApi/Swagger to Typescript defenitions!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published