Skip to content

tourware/swagger-codegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swagger-codegen

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.

Usage

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.

Generators

Name Implementation Description
typescript-server TypeScriptServerCodegen Generates simple TypeScript models only without comments
typescript-client TypeScriptClientCodegen Generates simple TypeScript models with a client implementation

Typescript-client

To use the client generated by typescript-client, your project will need the following dependencies:

  • axios
  • aws4 if you require request signing with AWS Signature V4
  • @types/request if you require request signing with AWS Signature V4

Development

Requirements

  • JDK 8+
  • Maven 3

Build

Build and create the package using the standard Maven commands:

mvn -q clean package

Or use the wrapper scripts from package.json:

npm run build

Release

Bump 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published