Skip to content

chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.9.0 in the dependencies group across 1 directory - #5

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/dependencies-b13d533a50
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/dependencies-b13d533a50

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Bumps the dependencies group with 1 update in the / directory: github.com/oapi-codegen/oapi-codegen/v2.

Updates github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.9.0

Release notes

Sourced from github.com/oapi-codegen/oapi-codegen/v2's releases.

v2.9.0: OpenAPI 3.2 methods, smarter schema merging, more naming control

This is another large release. Most of the work went into three areas: a rewrite of how allOf, anyOf and oneOf become Go types (available as an option for now), more configuration for things we used to hard-code (names, struct tags, content types, JSON encoding), and a long list of bug fixes, many of them from first-time contributors. Thank you all.

The security fixes from v2.8.1 and v2.8.2 are included here as well. Those two releases were made from a separate branch, so if you're coming from v2.8.0, you get them now.

As always, the full automatically-generated changelog is at the bottom. The sections below cover what you should read before upgrading.

Before you upgrade

  • Go 1.26 is now required, both to build oapi-codegen and to build the code it generates. Go 1.27 is out, so 1.26 is the oldest supported Go release.
  • Use generated code with runtime v1.9.1 or newer. Generated code now calls JSON functions that were added in github.com/oapi-codegen/runtime v1.9.0, so it won't compile against an older runtime. v1.9.1 is needed for the form body fix described below.
  • Regenerate before you upgrade the runtime, not after. Runtime v1.9.0 removed the strictmiddleware packages. Code generated by oapi-codegen v2.6.0 or earlier still imports them, so regenerate with this release first, then update the runtime.
  • Read the breaking changes section. A few defaults changed on purpose, and the runtime changes how it encodes spaces in query parameters.

🎉 Major features

A new way of merging allOf, anyOf and oneOf, as an option (#2563, #2581, and many in between)

Turning schema composition into Go types has been our largest source of bugs for years. Fixing those bugs properly often changes the generated code, which we can't do to people whose specs already work. So we now have versions of the merging behavior, and you choose one:

compatibility:
  schema-merging-behavior: v3
  • v1 is the original behavior, which embeds the types of allOf members in a struct. It's what old-merge-schemas: true did; that option still works, and prints a deprecation warning.
  • v2 is what you have today, and it's still the default in this release.
  • v3 is new. It merges allOf members according to what allOf actually means, reports conflicting members as errors instead of quietly picking one, and generates union types that follow the spec more closely. For example, a oneOf that only adds constraints no longer produces a union, and an allOf that only adds a description to a $ref is simply that $ref's type.

v1 and v2 keep receiving bug fixes, but nothing that would break code that already works with them. The differences between the versions, with the code each one generates, are described in docs/schema-merging.md, including what to check when moving from v2 to v3.

Please try v3 and tell us what breaks. It becomes the default in the next release (see the end of these notes).

Dozens of allOf/anyOf/oneOf fixes, backed by a test matrix (#2562)

Alongside the versioning work, we built a test matrix that puts every schema shape we know of in every position where we generate code (a component, a property, array items, request and response bodies, and so on), sends it through a generated client and strict server, and checks that it comes back unchanged. This found a lot of bugs, all fixed in this release:

  • Specs that failed to generate: an allOf where any member had a default, or added only readOnly/writeOnly; OpenAPI 3.1 type: [object, "null"] members; a schema with both anyOf and oneOf.
  • Generated code that didn't compile: reusable responses with inline schemas, and unions with a non-string discriminator.
  • Data that was lost or changed on the wire: non-string discriminator values, union properties that overwrote a variant's values, reusable responses whose body is an array or map, and inline request bodies with additionalProperties.
  • oneOf/anyOf parameters can now be built by callers and bound by servers.

This closes some of our oldest open issues, including #839, #1147, #1379 and #1619.

More control over generated names (#2683)

Three new opt-in settings under output-options.naming answer several long-standing requests. Each one changes a single, narrow behavior, and nothing changes unless you set it:

output-options:
</tr></table> 

... (truncated)

Commits
  • 9606063 fix: use the field's element type in additional properties accessors (#2684)
  • 6d8ff0f feat: add opt-in naming options for enum constants, fields and explicit names...
  • d27c033 test: add resetGlobalState helper for codegen unit tests (#2680)
  • c4e7f51 Preserve enum values with colliding Go names (#2678)
  • 799e618 Make codegen utility tests independent (#2679)
  • b5847d1 fix: send exploded form arrays as repeated keys in client form bodies (#2677)
  • 1449d8b chore(deps): update github/codeql-action action to v4.39.4 (.github/workflows...
  • c18161b fix: keep every enum value when a deduplicated name collides with another (#2...
  • 8f73e1e fix: give inline-enum items of a oneOf/anyOf array branch their own type name...
  • 6f29146 Name whole-file $ref union branches like inline ones (#2642)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Nov 6, 2026
@dependabot dependabot Bot changed the title chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.8.2 in the dependencies group chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.8.2 in the dependencies group across 1 directory Nov 13, 2026
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/dependencies-b13d533a50 branch from 70586e5 to f8d9345 Compare November 13, 2026 01:05
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/dependencies-b13d533a50 branch from f8d9345 to 56944e0 Compare November 20, 2026 01:05
Bumps the dependencies group with 1 update in the / directory: [github.com/oapi-codegen/oapi-codegen/v2](https://github.com/oapi-codegen/oapi-codegen).


Updates `github.com/oapi-codegen/oapi-codegen/v2` from 2.8.1 to 2.9.0
- [Release notes](https://github.com/oapi-codegen/oapi-codegen/releases)
- [Commits](oapi-codegen/oapi-codegen@v2.8.1...v2.9.0)

---
updated-dependencies:
- dependency-name: github.com/oapi-codegen/oapi-codegen/v2
  dependency-version: 2.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.8.2 in the dependencies group across 1 directory chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.8.1 to 2.9.0 in the dependencies group across 1 directory Nov 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/dependencies-b13d533a50 branch from 56944e0 to 2c02354 Compare November 27, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants