0.1.8 • Published 2 years ago
arthrex-openapigen v0.1.8
OpenApi Generator
This nodejs tool generates an API client from a API specification, with a focus on simplicity and code size for the generated code.
Usage
Usage:
npm run generate -- <generator> <swaggerFile or URL> <output file>
Available generators:
- angularjs
- angular
Example:
npm run generate -- angularjs https://val-productbrowser.azurewebsites.net/swagger/v1/swagger.json product-browser-client.ts
Development
Setup
npm i # alias for npm install
npm run watch # Run tsc --watch
Adding a generator
- Copy
src/generators/angular.ts
as a base - Modify the code to your liking
Note: Please keep the generator code as simple as possible
TODO
- Webpack plugin?
- Generate multiple clients in one file
- (Authentication?)