This project contains custom generators for swagger-codegen and is based on the swagger-codegen-generators project which contains a set of generators developed by the swagger community.
For further details about the custom generators included in this project see the Generators section.
This project wraps the official swagger-codegen-cli the usage and the available command line parameters are the same as the official tool for further details see: https://github.com/swagger-api/swagger-codegen#getting-started
Add the package as a development dependency to your package.json
Add a script to package.json to execute the generator:
{
"scripts": {
"generate:api": "codegen generate -l typescript-server -o src/api/ -i openapi.yaml"
}
}To reduce the data transfer costs in CI/CD please consider configuring a JRE for the build projects which are using this package, depending on the platform each on-demand JRE download can take up to 100 MBytes of data transfer.
| Name | Implementation | Description |
|---|---|---|
typescript-server |
TypeScriptServerCodegen |
Generates simple TypeScript models only without comments |
typescript-client |
TypeScriptClientCodegen |
Generates simple TypeScript models with a client implementation |
To use the client generated by typescript-client, your project will need the following dependencies:
axiosaws4if you require request signing with AWS Signature V4@types/requestif you require request signing with AWS Signature V4
- JDK 8+
- Maven 3
Build and create the package using the standard Maven commands:
mvn -q clean packageOr use the wrapper scripts from package.json:
npm run buildBump the version using the npm version command, it will update both the package.json and the pom.xml files and commit the changes along with the generated CHANGELOG.md.