openapi-ts
TypeScript icon, indicating that this package has built-in type declarations

0.3.4 • Public • Published

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

Package Sidebar

Install

npm i openapi-ts

Weekly Downloads

34

Version

0.3.4

License

none

Unpacked Size

59.1 kB

Total Files

28

Last publish

Collaborators

  • danielgek