Skip to content

v2.2.0: Pure-Go 1.22+ server, documentation overhaul. JSON schema and several bug fixes

Choose a tag to compare
@github-actions github-actions released this 04 Jun 06:15

Big announcements

In case you've missed it, we've got a few big announcements as maintainers of oapi-codegen which we'd recommend you read in more depth.

We'd also like to thank our sponsors for this release:

DevZero logo

🔊 Notable features

The v2.2.0 release was largely focussed on the following big changes, alongside a number of other bug fixes.

Generate a pure Go 1.22+ net/http server

With Go 1.22+'s enhanced routing, it's now easier than ever to be able to write a pure-Go HTTP service, and thanks to a contribution from @thedadams we now have a std-http-server, further documented in the Supported Servers section in the README.


Not seeing this working, i.e. seeing a 404 page not found? Make sure that the go directive in your project's go.mod is updated!

In the future we're going to see if we can preemptively warn you if you're not quite set up correctly.

Documentation overhaul

A significant undertaking in this release was to rewrite pretty much every line of documentation we had, as well as introducing a number of additional examples and test cases.

We're excited to hear your feedback on the new structure of the README, the additional docs added, and whether there are any additional examples that may be of use.

JSON Schema configuration

In the spirit of documentation, we now also have a JSON schema which can be found further documented in the Usage section in the README.

This not only gives a separate definition of fields and their meaning, but it can be used with IDEs for autocompletion and validation, allowing for a much better Developer Experience.

kin-openapi upgrade

A few big upgrades have come in kin-openapi, which we use for the underlying OpenAPI parsing and validation, which included a significant breaking change that meant that consumers of oapi-codegen couldn't upgrade the kin-openapi version until we had made changes in oapi-codegen.

This has additionally been set up as an FAQ as it's one we commonly get.

🚀 New features and improvements

  • feat: add ability to tweak generated names (including use of initialisms) (#1041) @wtertius
  • docs: revamp README, add a and add a JSON Schema for configuration files (#1485) @jamietanna
  • feat: add support for Go 1.22+ net/http routing (#1475) @thedadams

🐛 Bug fixes

📝 Documentation updates

👻 Maintenance

📦 Dependency updates

16 changes
  • fix(deps): update module to v0.21.0 (#1601) @renovate
  • fix(deps): update module to v0.124.0 (#1532) @renovate
  • chore(deps): update module to v1.59.0 (#1625) @renovate
  • chore(deps): update module to v1.58.2 (#1618) @renovate
  • chore(deps): update module to v1.58.1 (#1603) @renovate
  • fix(deps): update module to v0.15.0 (#1591) @renovate
  • chore(deps): update module to v1.58.0 (#1586) @renovate
  • fix(deps): update module to v0.20.0 (#1531) @renovate
  • fix(deps): update module to v0.19.0 (#1289) @renovate
  • fix(deps): update module to v0.123.0 (#1431) @renovate
  • chore(deps): update module to v1.57.2 (#1466) @renovate
  • fix(deps): update module to v1.9.0 (#1479) @renovate
  • chore(deps): update actions/checkout action to v4 (#1290) @renovate
  • chore(deps): update actions/setup-go action to v5 (#1375) @renovate
  • Update release-drafter/release-drafter action to v6 (#1453) @renovate
  • Update module to v1.56.1 (#1455) @renovate