Skip to content

Swagger Codegen 3.0.0-rc0 has been released!

Pre-release
Pre-release
Compare
Choose a tag to compare
@HugoMario HugoMario released this 25 Jan 21:15
· 1324 commits to 3.0.0 since this release

This is our first official release of swagger-codegen with OpenAPI 3 support!

Being a first release (and during the RC (release candidate) releases), we highly depend on the community to provide us with feedback. There are some major changes in this release, so help us test it out. For any issues or concerns, please file a ticket so we can start a discussion. Also, first releases being RC releases - you should expect there to be breaking changes, based on feedback and further development.

Read the FAQ at the end of the release notes for more information about the changes in this version and how you can help!

This release has been implemented for java and inflector languages as a start of OpenAPI 3.0 support.

General enhancements based on issues #6041 and #6077

  • OpenAPI 3.0 support.
  • Switched to Handlebars template engine.
  • Removed all is, isNot, hasand hasNot properties from codegen pojos and use extensions instead.
  • Added helpers to replace the removed properties. i.e {{is this 'enum'}}, {{has this 'more'}} {{isNot this 'form-param'}}, etc.
  • Remote arguments loading for swagger codegen-cli and swagger generator modules.
  • Requires Java 8 for operation.
  • The templates will now be managed in a separate repository swagger-codegen-generators and will be released independently of the engine itself.
  • swagger-generator works with 'inflector 2.0', check open api spec to know endpoint details.

Known Limitations

  • java and inflector are the only supported languages.
  • No supported languages templates are no longer available in this repo. They are going to be eventually moved to swagger-codegen-generators.
  • It's likely that many parts of the documentation are not up to date yet.

FAQ

  • Q: What does support for OAS3 mean?

  • A: API definitions of previous versions of the spec will be automatically converted to OAS3, and only then the code will be generated. Since our conversion is also in RC mode right now, we expect there to be broken conversions, and with your tickets we can have those issues resolved.

  • Q: Switched to Handlebars?! Why?

  • A: Handlebars is mostly compatible with Mustache, meaning migration is not always required, or if so, changes should be minimal. On the other hand, Handlebars offers more flexibility in the templates, which would end up simplifying the templates and the generators.

  • Q: Why have the generators (templates) been separated to a new repository?

  • A: The codegen engine and the generators advance in a significantly different pace. In order to allow for more frequent releases of either, the separation made sense. It's likely that in future RC releases, each generator would be versioned independently allowing for even further release flexibility. This does introduce some challenges, read ahead in the FAQ.

  • Q: What happened to all the existing generators? Why only 2 were migrated?

  • A: We needed an initial start with the new version, and some of the Java templates made sense to us as the codegen itself is written in Java. As you know, the majority of the generators are made by our awesome community of contributors! We'll need the community's help with migrating and testing further templates.

  • Q: What are the main current challenges?

  • A: There are two main challenges. The first - migrating the long list of templates that we have and test them. The second - separating the generators to a new repository has made the build process slightly more complicated. We have thoughts on how to improve it, and would love the community input on it as well.

  • Q: Are there any other major changes coming?

  • A: Maybe, and they may or may not come as part of the 3.0 release. We have some thoughts on improving version management for the generators and the engine to ensure compliance.

  • Q: How can we, as a community, help?

  • A: The codegen community is very active and vibrant, and we're very appreciative of the help we've gotten over the years. As you would expect, with a new major version, the help can come in with testing, migrating templates, filing issues, giving suggestions, and providing feedback to the changes. We'll do our best to listen and incorporate those into the project.

  • Q: swagger-codegen-generators's README is empty?

  • A: Yes, we know. It needs some love. We'll get there by RC1!