How to run swagger-codegen for OpenAPI 3.0.0

22,287

Solution 1

OpenAPI Generator (found by top contributors of Swagger Codegen) supports both OpenAPI specification v2 and v3.

You can use the docker images, Java JAR (SNAPSHOT), Brew or npm to give it a try.

For more information about OpenAPI Generator, please refer to the project's README

If you need any help, please open an issue and we'll look into it.

UPDATE: 1st stable version 3.0.0 has been released: https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.0

Solution 2

Swagger-codegen 3.0.0 snapshots now include a limited number of targets for code generation from OpenAPI 3.0 definitions. https://github.com/swagger-api/swagger-codegen/issues/6598#issuecomment-333428808

There is an alternative experimental implementation of the codegen engine, using the original swagger-codegen 2.x templates, written in Node.js: https://github.com/mermade/openapi-codegen - if your language is not yet supported, a config file just needs to be created for it mapping the template files to outputs.

Share:
22,287

Related videos on Youtube

some bits flipped
Author by

some bits flipped

learn things

Updated on July 09, 2022

Comments