1.1.0 • Published 6 years ago

bolighed-swagger2ts v1.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Swagger2TS

Tool for generate TS definitions from Swagger

Install

npm i swagger2ts

Example

index.js

const s2ts = require('swagger2ts');
const path = require('path');
const CONFIG = {
    api_url: 'http://localhost:18000/api/schema/1.0/?format=openapi',
    swagger_file: path.resolve(__dirname, './api_schema.json'),
    interfaces_dist_folder: path.resolve(__dirname, './src/interfaces/')
}

s2ts(CONFIG);

if api_url is missing it will use the swagger_file path to retrieve the file

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago