Repository navigation
fix(deps): update module github.com/oapi-codegen/runtime to v1.9.0 - #2011
Open
red-hat-konflux[bot] wants to merge 1 commit into
Open
red-hat-konflux[bot] wants to merge 1 commit into
red-hat-konflux[bot] wants to merge 1 commit into
Conversation
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
red-hat-konflux
Bot
requested review from
amalimov and
turjemantal
and removed request for
a team
November 14, 2026 04:32
Contributor
Author
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.8.0→v1.9.0Release Notes
oapi-codegen/runtime (github.com/oapi-codegen/runtime)
v1.9.0: : Slimmer dependencies and a pluggable JSON codecCompare Source
This release removes the
strictmiddlewarepackages, which pulled every supported web framework into the dependency graph of every program that imports the runtime, and which generated code has not used since oapi-codegen v2.7.0. It adds a process-wide JSON codec that the upcoming oapi-codegen v2.9.0 will route all generated JSON encoding and decoding through, bindsuuid.UUIDfields indeepObjectparameters, and fixeslabelandmatrixpath parameters whose value contains the style's delimiter. The minimum Go version is now 1.26.Notable Changes
☢️ Breaking: the
strictmiddlewarepackages are goneThe
strictmiddleware/{echo,echo-v5,gin,iris,nethttp}packages held a handful ofStrictHandlerFuncandStrictMiddlewareFunctype definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importinghub.lumenfield.work/oapi-codegen/runtimedragged all three frameworks and their transitive dependencies into itsgo.mod, whether it used them or not. Removing the packages (#181, closes #180) takes the root module from 5 direct and 66 indirect requirements down to 4 direct and 1 indirect, with no web framework among them. The separatestrictmiddleware/echo-v5module is removed as well.Code generated by oapi-codegen v2.7.0 and later declares these types itself and never imports the packages, so for anyone on a current generator the upgrade is a
go getand ago mod tidythat deletes a lot of lines. Code generated by oapi-codegen v2.6.0 or earlier still imports them and will not compile against this release.Pluggable JSON codec
Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec (#183). The default is
encoding/json, unchanged, and a program can replace it in itsmainpackage:The API is:
JSONCodec: the two-method interface a replacement implements.StdJSONCodecisencoding/json's pair, and can be embedded to override just one method, for instance to turn off HTML escaping.StreamingJSONCodec: an optional second interface,MarshalWrite(io.Writer, any)andUnmarshalRead(io.Reader, any), for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered throughMarshalandUnmarshal.JSONMarshal,JSONUnmarshal,JSONMarshalWriteandJSONUnmarshalRead: the functions that generated code and the runtime itself call.JSONUnmarshalReadreturnsio.EOFfor an empty body whichever codec is in use, which is how strict servers detect an optional body that was left out.SetJSONCodec(nil)restores the default.Within the runtime,
deepObjectand form parameter encoding,BindJSONBody, and thetypespackage'sDate,Duration,EmailandFileall use the codec already. Generated code still callsencoding/jsondirectly today. oapi-codegen v2.9.0 will switch every generatedjson.Marshal,json.Unmarshaland strict response encoder over to these functions, at which point oneSetJSONCodeccall covers a whole program: models, clients and servers. This replaces the per-packagejson-encodingconfiguration proposed in oapi-codegen/oapi-codegen#2371, where the design discussion lives, and it is the intended path toencoding/json/v2. Thanks to @CRaLFa for the implementation.uuid.UUIDfields bind indeepObjectparametersA
deepObjectquery parameter with aformat: uuidfield, such as?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8, failed withunhandled type: uuid.UUID.uuid.UUIDis a[16]byte, so it never reached the branch that checks forencoding.TextUnmarshaler. Array-kind types that implementUnmarshalTextnow bind, as they already did everywhere else in the runtime;uuid.UUID,*uuid.UUID, slices and map values all work. Other fixed-size arrays are still rejected as before. Thanks to @youdie006 (#171).labelandmatrixscalar path parameters are no longer splitA scalar
labelormatrixpath parameter whose value contained the style's delimiter, such asbig,redsent as.big%2Cred, was rejected with "expected single value, got N parts" once the router had decoded the segment. The primitive branch now strips only the style prefix and never splits the value, matching the fix #114 made for thesimplestyle. Arrays, structs and maps are unchanged (#182, closes #175).Go 1.26
The module now requires Go 1.26, the oldest supported Go release, and all remaining dependencies are at their latest versions (#178).
☢️ Breaking changes
🚀 New features and improvements
🐛 Bug fixes
📦 Dependency updates
8 changes
🔐 Security
Sponsors
We would like to thank our sponsors for their support during this release.
New contributors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.