Repository navigation
Update module github.com/oapi-codegen/runtime to v1.9.1 - #257
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
2 times, most recently
from
June 17, 2026 16:41
b3f8efd to
962352b
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
June 20, 2026 08:36
962352b to
b1d18ae
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
2 times, most recently
from
June 23, 2026 15:15
b1d18ae to
74a7d81
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
July 12, 2026 23:55
74a7d81 to
98dfca3
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
July 16, 2026 21:28
98dfca3 to
2e6b024
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
2 times, most recently
from
July 20, 2026 04:43
2e6b024 to
a0a2501
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
August 16, 2026 08:58
a0a2501 to
4c0bdbd
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
October 23, 2026 09:59
4c0bdbd to
06840d1
Compare
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
November 11, 2026 00:46
06840d1 to
0e1d5d9
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
renovate
Bot
force-pushed
the
renovate/github.com-oapi-codegen-runtime-1.x
branch
from
November 20, 2026 17:06
0e1d5d9 to
c85f400
Compare
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.4.0→v1.9.1Release Notes
oapi-codegen/runtime (github.com/oapi-codegen/runtime)
v1.9.1: : Bugfix updateCompare Source
This is a bugfix release.
MarshalFormnow honors thestyleandexplodeof a form property's encoding, anddeepObjectbinding rejects integers that overflow their destination instead of wrapping them. There are no API changes, and code generated by current oapi-codegen releases behaves as before.Notable Changes
MarshalFormhonorsstyleandexplodeMarshalFormonly readContentTypefrom a property'sRequestBodyEncoding, so an array was always written with indexed keys,topic[0]=a&topic[1]=b, even when the encoding declaredstyle: form, explode: true, which serializes as repeated keys,topic=a&topic=b. A property whose encoding setsStyleorExplodeis now serialized as a query parameter of that style would be:form,spaceDelimitedandpipeDelimitedrepeat the key when exploded and write one delimited value otherwise, anddeepObjectis the existing bracketed form.Explodedefaults to true forformand false for the other styles, as in the specification.Properties with no encoding, or with one that sets neither field, are unchanged. Generated clients pass no encodings today, so their output is the same; a future oapi-codegen release will pass the spec's encodings through (oapi-codegen/oapi-codegen#2604). The
application/jsoncontent type branch, which returnedunsupported encodingfor every content type including JSON, now works too (#187, closes #186).deepObjectintegers that overflow are rejectedUnmarshalDeepObjectparsed integer fields as 64-bit and assigned them without checking that the value fit, so?filter[count]=4294967297bound into anint32as1with no error. Out-of-range values now fail with anoverflows destinationerror, as they already did for the form style and the JSON binders. Thanks to @youdie006 (#185).🐛 Bug fixes
📦 Dependency updates
Sponsors
We would like to thank our sponsors for their support during this release.
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 importinggithub.com/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
v1.8.0: : Bind the request body value the validator sawCompare Source
This release adds a request body binder that reuses the value a kin-openapi validation middleware already decoded, so strict servers no longer decode the body a second time with different matching rules. It also rounds out
types.Date's text encoding and fixes adeepObjectserialization quirk. Existing binding and serialization behaviour is unchanged unless generated code calls the new function. The root module's dependencies are unchanged; the separatestrictmiddleware/echo-v5module now requires Echo v5.4.2.Notable Changes
BindJSONBody: bind exactly what the validator validatedStrict servers generated by
oapi-codegendecode the JSON request body withencoding/jsonafter a validation middleware has already decoded and validated it. The two decoders do not agree on member names:encoding/jsonmatches struct fields case-insensitively, so a body like{"role":"user","ROLE":"admin"}validates asrole: userand then binds asRole: "admin". Anything the validator checked can be bypassed by a differently-cased duplicate.BindJSONBody(r *http.Request, v any) errorcloses that gap. When the request has passed through a validator built on kin-openapi v0.151.0 or later withopenapi3filter.Options.KeepValidatedValueset, the body carries the value the validator decoded, andBindJSONBodybinds that value into the destination withBindJSONValue(value, v any) errorinstead of reading the body again. Binding followsencoding/json's rules (struct tags, embedded structs,json.Unmarshalerandencoding.TextUnmarshaler, base64 for[]byte,float64forany,json.Numberpreserved) with one deliberate difference: member names are matched to struct fields exactly.Without a validated value, or when the value cannot be bound into the destination type,
BindJSONBodyfalls back tojson.NewDecoder(r.Body).Decode(v), so error responses are unchanged for everyone who is not running a validator. The oapi-codegen validation middlewares enableKeepValidatedValueby default as of nethttp-middleware v1.3.1, echo-middleware v1.2.1, echo-v5-middleware v0.2.1, gin-middleware v1.2.1 and iris-middleware v1.2.1. The net/http strict server template that callsBindJSONBodyis landing inoapi-codegenseparately (oapi-codegen/oapi-codegen#2605); the runtime side ships first so generated code can rely on it.types.Dateimplementsencoding.TextMarshalerDatehad anUnmarshalTextthat parses2006-01-02but noMarshalText, so it inheritedtime.Time's RFC 3339 one. Any codec that pairsTextMarshalerwithTextUnmarshaler(encoding/xml, DynamoDB mappers, and others) therefore wrote aDateit could not read back.MarshalTextnow formats withDateFormat, matchingMarshalJSON,StringandUnmarshalText. Thanks to @jusabe-kreditz.deepObjectno longer emitsparam[]=nullfor nil maps and slicesMarshalling a
deepObjectparameter whose field held a typed nil map or nil slice produced aparam[]=nullpair, because the intermediatejson.Marshalturned the nil intonull. Such fields are now omitted, as an empty map or slice already was. Nil pointers are still serialized asnull, as before. Thanks to @SKalt (#160).🚀 New features and improvements
🐛 Bug fixes
📦 Dependency updates
6 changes
Sponsors
We would like to thank our sponsors for their support during this release.
New contributors
v1.7.0: : Extensions for OpenAPI 3.1 parameter bindingCompare Source
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
typeto be a list, such astype: [string, integer]. Go has no type meaning "one of these", so generated code maps such parameters toany— which the binders previously rejected outright withcan not bind to destination of type: interface, making these parameters unusable.The binder options structs (
BindStyledParameterOptions,BindQueryParameterOptions,BindStringToObjectOptions) gain aTypes []stringfield carrying the union's member list. It is only consulted when the destination is anany; binding into every concrete Go type is completely unchanged. The value binds to the first member that parses, tryingboolean,integer,number, thenstring— most restrictive first, since a string always parses. Member detection follows the JSON number grammar (RFC 8259), so values like007or+1bind as strings rather than being silently reinterpreted as numbers.The bound value's dynamic type is always one of
bool,int64,float64,string, or (withformat: byte)[]byte, so a handler's type switch is stable regardless of what the spec'sformatsays. Applications that wantformat: int32/format: floatto narrow the produced types toint32/float32can opt in via a new package-level setting, following the same pattern asDefaultQueryEncoderfrom v1.6.0:Generator support for emitting
Typesis landing inoapi-codegenseparately; the runtime side ships first so generated code can rely on it. Arrays of unions anddeepObject-style parameters are not covered yet — see theTypesfield 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-
[]byteslice destination panicked withreflect: call of reflect.Value.OverflowInt on slice Value, instead of returning an error. This was reachable from generated code on the request path: anullable.Nullable[[]string]query parameter using the default form/explode serialization would panic on?p=123while returning a normal binding error on?p=abc. These cases now return a cleancan not bind to destination of type: sliceerror.🚀 New features and improvements
🐛 Bug fixes
✍ Other changes
📦 Dependency updates
6 changes
Sponsors
We would like to thank our sponsors for their support during this release.
v1.6.0: Allow customization of parameter encodingCompare Source
This is a small release which adds a global encoding setting on the runtime, to allow users to customize how to handle spaces in query arguments. This is a new minor release, since we're adding new API, even though this is a very minor feature. I imagine that in the future, we will add more settings, rather than making behavior assumptions.
🚀 New features and improvements
📦 Dependency updates
Sponsors
We would like to thank our sponsors for their support during this release.
Sponsors
We would like to thank our sponsors for their support during this release.
v1.5.0: : RFC3339 durations, and bug fixesCompare Source
This is mainly a bugfix release, but we're bumping the minor version since we also introduce a new type,
Durationinto ourtypes/package, which allows for parsing and emitting RFC3339 durations. Rather than trying to parse a duration string into atime.Duration, which requires assumptions that may not be right for everyone, we decided not to make those decisions and just store all possible fields as provided. Users can convert this to Go Duration as they see fit.🚀 New features and improvements
🐛 Bug fixes
📝 Documentation updates
📦 Dependency updates
6 changes
Sponsors
We would like to thank our sponsors for their support during this release.
v1.4.2: Bug fix for required parametersCompare Source
This is a bug fix to address a regression introduced in oapi-codegen v2.7.0
🐛 Bug fixes
Sponsors
We would like to thank our sponsors for their support during this release.
v1.4.1: Bug fixesCompare Source
This is a bug fix release.
Changes in
v1.4.0, coupled with changes inv2.7.0of oapi-codegen exposed some new problems.deepObjectstyle marshaling behavior now supports encoding unicode. UTF-8 can't be directly included in parameters, so we need to%escape it.Form binding now detects maps, which makes binding to a Nullable possible. We can't use generics around
Nullable[T], so we handle maps generically, assuming they're a Nullable with its behavior assumptions.🐛 Bug fixes
📦 Dependency updates
Sponsors
We would like to thank our sponsors for their support during this release.
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.