@relab/typescript-swagger-client
v1.2.6
Published
Utility package to generate typescript client by Swagger definition
Downloads
145
Readme
@relab/typescript-swagger-client
Utility package to generate typescript client by Swagger/OpenAPI definition.
Usage
npm install --save-dev @relab/typescript-swagger-client
- Add command to
scripts
section ofpackage.json
file
{
"name": "my-app",
"scripts": {
"swagger-client": "typescript-swagger-client --input @api/api.generated.json --output @api/generated"
}
}
npm run swagger-client
Parameters of typescript-swagger-client
:
--input
- JSON-file path in your project that contains OpenAPI definition--output
- Folder for generated code
License
Released under MIT by Sergey Zwezdin.