Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

chore(deps): bump github.com/oapi-codegen/oapi-codegen/v2 from 2.6.0 to 2.8.2 - #29

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/oapi-codegen/oapi-codegen/v2-2.8.2
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/oapi-codegen/oapi-codegen/v2-2.8.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 12, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/oapi-codegen/oapi-codegen/v2 from 2.6.0 to 2.8.2.

Release notes

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

v2.8.2: Security fixes for code generation

🎉 Notable changes

This is a security release on top of v2.8.1. It addresses two further security findings reported against oapi-codegen, both in code generation:

Both only matter when you generate code from a specification, or a document it references, that you do not control. Thanks to @​manus-use for reporting them.

Implicit discriminator mapping keys are validated

When a discriminated oneOf or anyOf lists a $ref variant that the mapping does not name, the generator maps it under the schema's name and writes that name into the generated ValueByDiscriminator switch. Explicit mapping keys were already checked, but the implicit ones were not, and a schema name is otherwise allowed to contain quotes. The derived key is now validated like an explicit one, including when the union is assembled by an allOf merge from a member holding the variants and another holding the discriminator, and a backslash is now rejected in any mapping key, since it would start an escape sequence in the generated case label. A null-typed branch, which the generator skips as a nullability marker, is left alone.

The contents of whole-document $refs are validated

A $ref without a fragment, such as $ref: ./other.yaml, has no name the generated code could refer to, so the generator inlines the referenced document as if it were written in place. Spec validation stopped at every $ref on the assumption that external content is never copied into the output, so the property names, parameter names and header names of such a document reached struct tags and string literals unchecked. The validator now walks a whole-document reference's contents for schemas, parameters, request bodies, responses, headers and callbacks, visiting each document once. References with a fragment are still not followed, and a document replaced by an x-go-type override is not walked either, since none of it reaches the generated code.

As with v2.8.1, valid specifications generate byte-for-byte the same code as before; a specification that would have produced code it had no business producing is now rejected with an error that points at the offending value.

🐛 Bug fixes

  • Validate implicit discriminator mapping keys and the contents of whole-document $refs (2.8.x backport) (#2649) @​mromaszewicz

Sponsors

We would like to thank our sponsors for their support during this release.

We'd also like to thank Greptile for allowing our project to use their code review system.

... (truncated)

Commits
  • a2b197f Validate implicit discriminator mapping keys and the contents of whole-docume...
  • 068f1bc Quote or validate every spec string that reaches generated Go source (2.8.x b...
  • cedb781 Apply the "*" default to the loader used after an overlay (#2624)
  • b4ddde8 Refuse remote $refs unless their host is in allow-remote-refs-from (2.8.x bac...
  • 7e9bbce Bind the validated request body value in all strict servers (2.8.x backport) ...
  • de2d8b2 Add sort-handler-registrations flag to opt out of spec-order registration (#2...
  • bd52535 Name shared path parameter helper types once, hashing cross-path collisions (...
  • ce2e068 feat(#1726): add literal colon support for gin, echo, fiber (#1879)
  • 1457922 Fix ValueByDiscriminator() with external refs (#2474)
  • 6d3c864 Fix allOf/nullable detection and recursion (#2473)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/oapi-codegen/oapi-codegen/v2](https://github.com/oapi-codegen/oapi-codegen) from 2.6.0 to 2.8.2.
- [Release notes](https://github.com/oapi-codegen/oapi-codegen/releases)
- [Commits](oapi-codegen/oapi-codegen@v2.6.0...v2.8.2)

---
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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Nov 12, 2026
@kwent kwent closed this Nov 12, 2026
@dependabot @github

dependabot Bot commented on behalf of github Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/go_modules/github.com/oapi-codegen/oapi-codegen/v2-2.8.2 branch November 12, 2026 03:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

1 participant