Skip to content

deps: Bump github.com/oapi-codegen/runtime from 1.6.0 to 1.7.0 - #26

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/oapi-codegen/runtime-1.7.0
Open

deps: Bump github.com/oapi-codegen/runtime from 1.6.0 to 1.7.0#26
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/oapi-codegen/runtime-1.7.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 21, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/oapi-codegen/runtime from 1.6.0 to 1.7.0.

Release notes

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

v1.7.0: Extensions for OpenAPI 3.1 parameter binding

This release teaches the parameter binders about OpenAPI 3.1 multi-type unions, and fixes a long-standing panic on the request binding path. As with v1.6.0, new behavior is controlled by explicit settings rather than assumptions: binding stays exactly as it was unless the new options are used.

Notable Changes

Binding OpenAPI 3.1 multi-type union parameters

OpenAPI 3.1 allows a parameter's type to be a list, such as type: [string, integer]. Go has no type meaning "one of these", so generated code maps such parameters to any — which the binders previously rejected outright with can not bind to destination of type: interface, making these parameters unusable.

The binder options structs (BindStyledParameterOptions, BindQueryParameterOptions, BindStringToObjectOptions) gain a Types []string field carrying the union's member list. It is only consulted when the destination is an any; binding into every concrete Go type is completely unchanged. The value binds to the first member that parses, trying boolean, integer, number, then string — most restrictive first, since a string always parses. Member detection follows the JSON number grammar (RFC 8259), so values like 007 or +1 bind as strings rather than being silently reinterpreted as numbers.

The bound value's dynamic type is always one of bool, int64, float64, string, or (with format: byte) []byte, so a handler's type switch is stable regardless of what the spec's format says. Applications that want format: int32 / format: float to narrow the produced types to int32 / float32 can opt in via a new package-level setting, following the same pattern as DefaultQueryEncoder from v1.6.0:

func init() {
    runtime.NarrowUnionNumericFormats = true
}

Generator support for emitting Types is landing in oapi-codegen separately; the runtime side ships first so generated code can rely on it. Arrays of unions and deepObject-style parameters are not covered yet — see the Types field documentation for the exact scope.

Fix for a panic when binding numeric values into slice destinations

Since v1.2.0, binding a string that happens to parse as an integer into a non-[]byte slice destination panicked with reflect: call of reflect.Value.OverflowInt on slice Value, instead of returning an error. This was reachable from generated code on the request path: a nullable.Nullable[[]string] query parameter using the default form/explode serialization would panic on ?p=123 while returning a normal binding error on ?p=abc. These cases now return a clean can not bind to destination of type: slice error.

🚀 New features and improvements

🐛 Bug fixes

✍ Other changes

📦 Dependency updates

... (truncated)

Commits
  • 25e2d35 Fix panic binding numeric values into non-byte slice destinations (#156)
  • f2e468c Bind OpenAPI 3.1 multi-type union parameters into any destinations (#154)
  • 611503e chore(deps): update github/codeql-action action to v4.37.7 (#152)
  • d8c6443 chore(deps): update release-drafter/release-drafter action to v7.7.0 (#151)
  • 0caa035 chore(deps): update github/codeql-action action to v4.37.5 (#150)
  • 95ed734 fix(deps): update module github.com/labstack/echo/v5 to v5.3.1 (#149)
  • 2f68f55 chore: use go mod tidy instead of tidied (#148)
  • 03f0d06 chore(deps): update release-drafter/release-drafter action to v7.6.0 (#147)
  • 99e61d7 chore(deps): update github/codeql-action action to v4.37.2 (#146)
  • See full diff in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Aug 21, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner August 21, 2026 22:55
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Aug 21, 2026
Bumps [github.com/oapi-codegen/runtime](https://github.com/oapi-codegen/runtime) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/oapi-codegen/runtime/releases)
- [Commits](oapi-codegen/runtime@v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/oapi-codegen/runtime
  dependency-version: 1.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/github.com/oapi-codegen/runtime-1.7.0 branch from be89ff7 to b45e9b2 Compare August 25, 2026 10:43
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