sw2

sw2ngx

Generate Angular API module from swagger.json

Showing:

Popularity

Downloads/wk

1

GitHub Stars

4

Maintenance

Last Commit

1mo ago

Contributors

4

Package

Dependencies

6

License

WTFPL

Type Definitions

Built-In

Tree-Shakeable

Yes?

Categories

Readme

CI npm npm

SW2NGX - Swagger to Angular

sw2ngx logo

Generate Angular API services from swagger.json or openapi.json

💥 ATTENTION 💥: in version 6 and later breaking changes

if your project only uses swagger (openapi v2.x), use version no higher than 5.2.0

    // for example
    npx sw2ngx@5.2.0 -c https://petstore.swagger.io/v2/swagger.json -o ./path/to/api/module/folder

1. no need to install, just use!

    // use preset
    npx sw2ngx@latest -preset ./path/to/sw2ngx.json
    
    // use cli params
    npx sw2ngx@latest -preset ./path/to/sw2ngx.json

2. preset schema

cli keypropertyrequireddefaultdescription
-cconfigpath to configuration swagger/openapi json file
-ooutputPath./apipath to folder where create generated api files
-baseHrefbaseHref/override base href constant for api services
-presetpreset/override base href constant for api services
-tmpltemplates/folder for templates default use /templates/default from library files
-provide-inprovideIn'root'define default provideIn in services
-srv-interfacebaseHreffalseadd interfaces to service generation
-parser-custom-method-nameparserMethodNamedefaultMethodNameParserfile for parsing method name function
-parser-custom-model-nameparserModelNamedefaultModelNameParserfile for parsing model name function

3. customization

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial