swaggy-c
v0.1.0
Published
Builder for Swagger CodeGen-generated API clients in multiple languages
Downloads
5
Maintainers
Readme
Swaggy C
Swaggy C is a builder for Swagger CodeGen-generated API clients in multiple languages.
It's handy for generating multiple API clients, along with documentations and package artifacts, from an OpenAPI spec in one go.
(WIP) This builder provides convenient commands for executing the following actions:
- -gen: generating API client using Swagger CodeGen
- -deps: resolving dependencies
- -test: running generated unit tests
- -package: building package artifact
- -install: installing package locally
- -doc: generating documentation
- -publish: publishing package to public repository
Have a look at Swaggy Jenkins as an example project that was built using Swaggy C.
Installation
npm install -g swaggy-c
Usage
Build a JavaScript API client with a given spec:
swaggy-c --api-spec /path/to/spec.yaml javascript
The generated JavaScript client will then be written to output directory specified in --out-dir
flag.
Build the client using Swagger CodeGen CLI jar, handy for using custom built jar (e.g. from master branch):
swaggy-c --jar /path/to/swagger-codegen-cli.jar --api-spec /path/to/spec.yaml javascript
Build the client using specific configuration, output, and log directories:
swaggy-c --conf-file /path/to/conf.json --out-dir /path/to/generated/ --log-dir /path/to/log --api-spec /path/to/spec.yaml javascript
Build the client and supress Swagger CodeGen CLI command output:
swaggy-c --quiet --api-spec /path/to/spec.yaml javascript
List all available commands for all supported languages:
swaggy-c --help
Configuration
The configuration file that's specified in --conf-file
flag should be Swagger CodeGen language configuration file.
Colophon
Build reports:
- Code complexity report
- Unit tests report
- Test coverage report
- Integration tests report
- API Documentation
Related Projects:
- packer-swaggy-c - Packer builder of a Docker image that contains most languages supported by Swagger CodeGen
- swaggy-jenkins - A set of Jenkins API clients in multiple languages generated from Swagger / Open API specification