Skip to content

Releases: oapi-codegen/oapi-codegen

v1.13.4

07 Aug 15:04
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.13.3...v1.13.4

v1.13.3

03 Aug 09:32
f20166f
Compare
Choose a tag to compare

What's Changed

  • fix: correct marshalling for +json types for strict servers by @reinkrul in #1171

Full Changelog: v1.13.2...v1.13.3

Fix: Allow multiple JSON types to be generated

31 Jul 20:17
4b0df49
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.13.1...v1.13.2

v1.13.1: Various fixes post-release

31 Jul 10:43
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.13.0...v1.13.1

Fiber support, many PR's merged for bug fixes and improvements

02 Jun 22:57
7aa85bb
Compare
Choose a tag to compare

New Functionality

Support has been added for a new router, Fiber

Notable Changes

These changes may affect your code, and possibly some incompatibilities where boilerplate had to be changed to fix issues.

The Rest

New Contributors

Read more

Ensure Scopes context key are generated as valid Go names

01 Dec 14:00
a444d30
Compare
Choose a tag to compare

As highlighted by @KenxinKun in #874, gorilla/mux (as well as some other servers) were affected by an invalid Scopes context key.

This makes them valid Go names.

Fix the generated error handling for Gin

21 Nov 20:34
0138e13
Compare
Choose a tag to compare

In v1.12.0 we added support for custom error handling to be used in the generated Gin code.

Unfortunately, we didn't produce the right code, so this would cause (compilation) errors.

Fix big issue with marshaling binary strings

29 Oct 00:43
Compare
Choose a tag to compare

v1.12.0 introduced a File type which intercepts schemas of type:string, format:binary, but it incorrectly implemented the json.Marshaler interface and was lacking tests to catch the problem. This version fixes the marshaling of fields of that type.

Prior versions of oapi-codegen turned those into a []byte, and you can still annotate your spec with x-go-type if you need []byte

Fix an issue with command line parsing

28 Oct 00:49
Compare
Choose a tag to compare
  • The -o flag specifying the output filename was being ignore in very simple invocations of oapi-codegen without a configuration file. This is fallout from trying to be compatible with old and new style configs.

Many bug fixes

28 Oct 00:25
cf23455
Compare
Choose a tag to compare

Major changes to functionality

  • In the last release, we changed the configuration file format to a new syntax, and added flags to read the old version, but it turns out that this default-on change broke a lot of automation, sorry about that. In this release, we've done our best to auto-detect the configuration version, so both styles of config options should work. The explicit version selection flags have not been removed.
  • Gorilla router (#594)
  • "strict" server generation, meaning one which is much more pedantic about input and output types, which allows for making API clients and servers that look more like Go functions than HTTP handlers (#499)
  • Fields can be marked with x-json-ignore to omit in JSON serialization (#390)
  • Many fixes to unions for oneOf and anyOf handling, thank you committers.
  • Enums can be prefixed with their typename in all cases, versus only on collisions previously. This is a configurable option (#662)
  • The Client interface in generated code was named awfully generically. You can now override the name (#788)
  • Generate code can be optionally formatted using more initialisms. It's default-off to not break existing code (#749)
  • Gin code can be configured with a custom error handler, versus generating error responses inline. Default behavior is the same as before (#587)
  • Gin middleware evaluation order can be reversed to be consistent with common Gin usage, it's default-off to not break previous behavior. ( #787)

Everything that has changed

This is a very large release with many bug fixes. Thanks to all contributors.

Read more