Repository navigation
Conversation
…ttings Add `output-options.json-encoding` configuration block with three fields: - `escape-html` (bool, default true): controls SetEscapeHTML on the encoder - `indent-prefix` (string): prefix per indentation level (SetIndent arg 1) - `indent` (string): indent string per nesting level (SetIndent arg 2) When any option differs from the json.Marshal defaults, generated MarshalJSON methods (union, additional-properties, union-and-additional-properties) and JSON request body serialization in the client use json.NewEncoder with the configured settings instead of json.Marshal. Default behavior is unchanged. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Extend the json-encoding output option to also cover the json.NewEncoder used in Visit*Response methods generated from strict-interface.tmpl. Add a jsonNewEncoder template function that returns either the plain json.NewEncoder(&buf) expression (default, backward-compatible) or an immediately-invoked function that creates the encoder and applies SetEscapeHTML / SetIndent before returning it. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Verify that: - default (no options) generates json.Marshal without encoder setup - escape-html: false generates SetEscapeHTML(false) - indent generates SetIndent with the configured string - both options together produce both calls - explicit escape-html: true behaves the same as the default Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…template_helpers.go Extract the code-generation logic from the closures in codegen.go into named functions in template_helpers.go, where all other template helper implementations live. codegen.go retains only the thin closure wrappers that bind globalState, consistent with how the opts function is handled. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Greptile SummaryAdds a new opt-in
Confidence Score: 4/5Safe to merge; the default code path is unchanged and custom encoding is entirely opt-in. The change is well-scoped and configuration/schema parity is maintained. The new test only exercises model generation, leaving the client and strict-server IIFE paths without syntax validation under custom encoding. Additionally, when indent is used with additionalProperties types, per-field values encoded to json.RawMessage are embedded verbatim, causing misaligned indentation for any field that renders as multi-line JSON. pkg/codegen/codegen_test.go (missing client and strict-server coverage), pkg/codegen/templates/additional-properties.tmpl and union-and-additional-properties.tmpl (double-encode indentation behaviour with complex field types)
|
| Filename | Overview |
|---|---|
| configuration-schema.json | JSON schema updated to include the new json-encoding block with all three properties (escape-html, indent-prefix, indent), matching the Go struct changes in configuration.go. |
| pkg/codegen/configuration.go | Adds JSONEncodingOptions struct with EscapeHTML *bool, IndentPrefix string, and Indent string fields, plus helper methods EscapeHTMLValue() and NeedsCustomEncoding(); the struct is wired into OutputOptions.JSONEncoding. |
| pkg/codegen/template_helpers.go | Adds jsonMarshalExpr and jsonNewEncoderExpr helpers that emit either a plain json.Marshal/json.NewEncoder call (default path) or an IIFE that configures the encoder; the bytes import is already in imports.tmpl so no import gap exists, but the double-encode under SetIndent for intermediate json.RawMessage values is a latent inconsistency. |
| pkg/codegen/codegen.go | Registers jsonMarshalExpr and jsonNewEncoder as template functions via closures that capture globalState.options.OutputOptions.JSONEncoding at generation time — matches the existing pattern for opts. |
| pkg/codegen/codegen_test.go | New TestJSONEncodingOptions covers default, escape-html: false, indent, combined, and explicit true cases for model generation only; client and strict-server code paths with custom encoding are not exercised. |
| pkg/codegen/templates/additional-properties.tmpl | Replaces direct json.Marshal calls with {{jsonMarshalExpr}}, including for intermediate per-field marshaling to json.RawMessage; when indent is enabled, fields with complex types will be double-encoded and embedded verbatim, causing inconsistent indentation. |
| pkg/codegen/templates/client.tmpl | Only the JSON request body marshal is replaced with {{jsonMarshalExpr}}; path/query/header/cookie parameter marshaling is intentionally left as-is, consistent with the PR rationale. |
| pkg/codegen/templates/strict/strict-interface.tmpl | Single json.NewEncoder call replaced with {{jsonNewEncoder "buf"}}; no other strict templates contain JSON encoding calls (verified), so coverage is complete across the strict layer. |
| pkg/codegen/templates/union-and-additional-properties.tmpl | Same per-field and final-object jsonMarshalExpr substitution as additional-properties.tmpl; same double-encode indentation caveat applies. |
| pkg/codegen/templates/union.tmpl | Replaces json.Marshal(v) in From* and Merge* methods and json.Marshal(object) in MarshalJSON with {{jsonMarshalExpr}}; the bytes.TrimRight in the IIFE correctly strips the trailing newline added by json.Encoder.Encode. |
Reviews (1): Last reviewed commit: "refactor: move jsonMarshalExpr/jsonNewEn..." | Re-trigger Greptile
| assert.Contains(t, code, "roleName string") | ||
| } | ||
|
|
||
| func TestJSONEncodingOptions(t *testing.T) { | ||
| // Spec with a oneOf type (triggers union.tmpl MarshalJSON) and a type | ||
| // with additionalProperties (triggers additional-properties.tmpl MarshalJSON). | ||
| const spec = ` | ||
| openapi: "3.0.0" | ||
| info: | ||
| version: 1.0.0 | ||
| title: JSON encoding test | ||
| components: | ||
| schemas: | ||
| Cat: | ||
| type: object | ||
| properties: | ||
| name: | ||
| type: string | ||
| Dog: | ||
| type: object | ||
| properties: | ||
| breed: | ||
| type: string | ||
| Pet: | ||
| oneOf: | ||
| - $ref: '#/components/schemas/Cat' | ||
| - $ref: '#/components/schemas/Dog' | ||
| Metadata: | ||
| type: object | ||
| properties: | ||
| name: | ||
| type: string | ||
| additionalProperties: | ||
| type: string | ||
| paths: {} | ||
| ` | ||
| loader := openapi3.NewLoader() | ||
| swagger, err := loader.LoadFromData([]byte(spec)) | ||
| require.NoError(t, err) | ||
|
|
||
| boolPtr := func(b bool) *bool { return &b } | ||
|
|
||
| tests := []struct { | ||
| name string | ||
| encoding JSONEncodingOptions | ||
| wantContain []string | ||
| wantAbsent []string | ||
| }{ | ||
| { | ||
| name: "default: uses json.Marshal", | ||
| encoding: JSONEncodingOptions{}, | ||
| wantContain: []string{"json.Marshal(v)"}, | ||
| wantAbsent: []string{"SetEscapeHTML", "SetIndent"}, | ||
| }, | ||
| { | ||
| name: "escape-html false: uses encoder with SetEscapeHTML(false)", | ||
| encoding: JSONEncodingOptions{EscapeHTML: boolPtr(false)}, | ||
| wantContain: []string{"json.NewEncoder", "SetEscapeHTML(false)"}, | ||
| wantAbsent: []string{"json.Marshal(v)", "SetIndent"}, | ||
| }, | ||
| { | ||
| name: "indent set: uses encoder with SetIndent", | ||
| encoding: JSONEncodingOptions{Indent: "\t"}, | ||
| wantContain: []string{"json.NewEncoder", `SetIndent("", "\t")`}, | ||
| wantAbsent: []string{"json.Marshal(v)", "SetEscapeHTML"}, | ||
| }, | ||
| { | ||
| name: "both options: encoder with SetEscapeHTML and SetIndent", | ||
| encoding: JSONEncodingOptions{EscapeHTML: boolPtr(false), Indent: " "}, | ||
| wantContain: []string{"json.NewEncoder", "SetEscapeHTML(false)", `SetIndent("", " ")`}, | ||
| wantAbsent: []string{"json.Marshal(v)"}, | ||
| }, | ||
| { | ||
| name: "escape-html true explicit: same as default", | ||
| encoding: JSONEncodingOptions{EscapeHTML: boolPtr(true)}, | ||
| wantContain: []string{"json.Marshal(v)"}, | ||
| wantAbsent: []string{"SetEscapeHTML", "SetIndent"}, | ||
| }, | ||
| } | ||
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.name, func(t *testing.T) { | ||
| opts := Configuration{ | ||
| PackageName: "testpkg", | ||
| Generate: GenerateOptions{Models: true}, | ||
| OutputOptions: OutputOptions{ | ||
| SkipPrune: true, | ||
| JSONEncoding: tt.encoding, | ||
| }, | ||
| } | ||
| code, err := Generate(swagger, opts) | ||
| require.NoError(t, err) | ||
| assert.NotEmpty(t, code) | ||
|
|
||
| _, err = format.Source([]byte(code)) | ||
| require.NoError(t, err, "generated code must be valid Go") | ||
|
|
||
| for _, want := range tt.wantContain { | ||
| assert.Contains(t, code, want) | ||
| } | ||
| for _, absent := range tt.wantAbsent { | ||
| assert.NotContains(t, code, absent) | ||
| } | ||
| }) | ||
| } | ||
| } | ||
|
|
||
| //go:embed test_spec.yaml | ||
| var testOpenAPIDefinition string |
There was a problem hiding this comment.
Test coverage gap for client and strict-server paths
TestJSONEncodingOptions only enables GenerateOptions{Models: true}, so the changes to client.tmpl (jsonMarshalExpr "body" on the request body path) and strict-interface.tmpl (jsonNewEncoder "buf" on the response encoding path) are never exercised with custom encoding settings. If an IIFE-based expression were syntactically invalid in either context, this test would not catch it. Adding sub-cases with Generate.Client: true and Generate.StrictServer: true (paired with a minimal spec that has a JSON request body / JSON response) would close the gap.
| object := make(map[string]json.RawMessage) | ||
| {{range .Schema.Properties}} | ||
| {{if .RequiresNilCheck}}if a.{{.GoFieldName}} != nil { {{end}} | ||
| object["{{.JsonFieldName}}"], err = json.Marshal(a.{{.GoFieldName}}) | ||
| object["{{.JsonFieldName}}"], err = {{jsonMarshalExpr (printf "a.%s" .GoFieldName)}} | ||
| if err != nil { | ||
| return nil, fmt.Errorf("error marshaling '{{.JsonFieldName}}': %w", err) | ||
| } | ||
| {{if .RequiresNilCheck}} }{{end}} | ||
| {{end}} | ||
| for fieldName, field := range a.AdditionalProperties { | ||
| object[fieldName], err = json.Marshal(field) | ||
| object[fieldName], err = {{jsonMarshalExpr "field"}} | ||
| if err != nil { | ||
| return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err) | ||
| } | ||
| } | ||
| return json.Marshal(object) | ||
| return {{jsonMarshalExpr "object"}} | ||
| } |
There was a problem hiding this comment.
Double-encode with
indent produces inconsistent indentation for complex field types
When indent is configured, jsonMarshalExpr is called once per property (each individual field value is encoded into a json.RawMessage with indentation applied), and then once more for the outer object map. Because json.RawMessage is embedded verbatim by encoding/json, any field whose type marshals to a multi-line JSON (a nested object or array) will be embedded as an already-indented blob inside the outer pretty-printed map. The resulting JSON is still valid, but the indentation of inner fields will not align with the outer structure's depth.
The same pattern applies in union-and-additional-properties.tmpl. For the common additionalProperties: type: string case this is invisible, but users adding indent for human-readable output over complex models will see misaligned nesting.
- introduce jsonMarshalFieldExpr that strips indentation for intermediate per-field marshaling in additionalProperties / union templates, preventing double-indentation of nested values when indent is configured - extend TestJSONEncodingOptions with client and strict-server sub-cases to cover the json-encoding branches in client.tmpl and strict-interface.tmpl Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
I think @mromaszewicz we should look at how we want to expose more control ie with the underlying encoder/decoder we use, especially helping with ie |
|
Yes, this is a good question. I'd love to move entirely to Empty arrays in v2 are always marshaled as As for this PR, it looks good. It's a fine extension. |
| if !enc.NeedsCustomEncoding() { | ||
| return "json.Marshal(" + varName + ")" | ||
| } | ||
| var sb strings.Builder |
There was a problem hiding this comment.
This is really hard to read. Can we just use a multi-line string literal?
There was a problem hiding this comment.
Fixed in the latest commit ― replaced the strings.Builder approach with fmt.Sprintf and raw string literals. Thanks for the suggestion!
|
I've been wanting a feature like this for some time actually, but I'm on the fence about how it should be done nicely. This PR will generate a JSON marshaler inline where needed based on configuration options. Another option would be to allow users, at the code level, to hook into encoder creation, which I think is a cleaner option. Instead of calling |
…shalExpr/jsonNewEncoderExpr Improves readability of the IIFE template bodies by using fmt.Sprintf with raw string literals instead of repeated WriteString calls. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Thank you for the feedback and for the alternative idea. The Would you prefer to pivot this PR to the hook-based design, or would it make more sense to merge the current config-driven approach and track the hook idea as a separate follow-up? Happy to go either direction. |
|
@CRaLFa thanks for your patience, and sorry for the long gap. I've spent some time on this and would like to pivot to the hook-based design rather than a config block. Since you offered to go either way: the implementation is yours if you still want it. What we'd like insteadA single process-wide JSON codec, owned by In // JSONCodec encodes and decodes JSON for generated code and for this package.
type JSONCodec interface {
Marshal(v any) ([]byte, error)
Unmarshal(data []byte, v any) error
}
// StdJSONCodec is the default, backed by encoding/json. Embed it to replace one method.
type StdJSONCodec struct{}
func (StdJSONCodec) Marshal(v any) ([]byte, error) { return json.Marshal(v) }
func (StdJSONCodec) Unmarshal(data []byte, v any) error { return json.Unmarshal(data, v) }
var jsonCodec JSONCodec = StdJSONCodec{}
// SetJSONCodec replaces the codec used by every generated package in the process and by
// this package. Call it during initialisation; it is not synchronised. nil restores the default.
func SetJSONCodec(c JSONCodec)
func JSONMarshal(v any) ([]byte, error) { return jsonCodec.Marshal(v) }
func JSONUnmarshal(data []byte, v any) error { return jsonCodec.Unmarshal(data, v) }The runtime's own In generated code: every
User side: func init() {
runtime.SetJSONCodec(myCodec{}) // e.g. one with SetEscapeHTML(false), or encoding/json/v2
}Why this approachYour What it deliberately gives up for a first cut: per-site control (indentation applies everywhere, including the intermediate Sequencing
If you'd like to take this on, feel free to open the |
|
@mromaszewicz Thanks for the detailed write-up. The hook-based design works for me, and I'd like to take it on. I've opened the Two things differ from your sketch, both explained in that PR:
Once that is merged and released, I'll follow up here with the template swap and regenerated fixtures. |
|
Ok, we've got a new version of runtime with these changes: https://github.com/oapi-codegen/runtime/releases/tag/v1.9.0 @CRaLFa here is where we'd like the generated code to use each half of the codec. The split is simple: anything that already holds the JSON as
|
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | | [github.com/pressly/goose/v3](https://redirect.github.com/pressly/goose) | `v3.29.0` → `v3.30.0` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> <details> <summary>pressly/goose (github.com/pressly/goose/v3)</summary> ### [`v3.30.0`](https://redirect.github.com/pressly/goose/blob/HEAD/CHANGELOG.md#v3300---2026-11-10) [Compare Source](https://redirect.github.com/pressly/goose/compare/v3.29.0...v3.30.0) ##### Added - Container image at `ghcr.io/pressly/goose` for `linux/amd64` and `linux/arm64`, published on each release. The image is based on distroless static, runs as a nonroot user, and supports `.sql` migrations only ([#​1093](https://redirect.github.com/pressly/goose/issues/1093)) ##### Changed - Various dependency upgrades - SQL parser: reduce memory use when parsing migration files, and make parsing much faster when the race detector is on ([#​1155](https://redirect.github.com/pressly/goose/issues/1155), [#​1156](https://redirect.github.com/pressly/goose/issues/1156)) ##### Fixed - CLI: `goose validate` failed on Go migrations that register an inlined function ([#​1110](https://redirect.github.com/pressly/goose/issues/1110)) - Provider: SQL-only migrations with unpadded versions (`1_`, `2_`, `10_`) were sorted by filename instead of version. This affected `ListSources` and `GetVersions`, as well as `Up` when versioning was disabled ([#​1124](https://redirect.github.com/pressly/goose/issues/1124)) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/London) - Branch creation - Only on Monday, Wednesday, and Saturday (`* * * * 1,3,6`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/canonical/tenant-service). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/stefanhoth/paperless-ngx-cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…153) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/nightah/encore). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…155) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/nightah/encore). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
@mromaszewicz Thanks for finishing the runtime side and for the call-site breakdown. I've opened the replacement PR: #2665 It follows the split in your comment above: the byte functions everywhere the JSON is already held as This PR can be closed in favour of #2665. |
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: docrphil-renovate[bot] <249494028+docrphil-renovate[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/aws/aws-sdk-go-v2](https://redirect.github.com/aws/aws-sdk-go-v2) | `v1.47.8` → `v1.48.0` |  |  | | [github.com/aws/aws-sdk-go-v2/config](https://redirect.github.com/aws/aws-sdk-go-v2) | `v1.33.17` → `v1.33.18` |  |  | | [github.com/aws/aws-sdk-go-v2/credentials](https://redirect.github.com/aws/aws-sdk-go-v2) | `v1.20.17` → `v1.21.0` |  |  | | [github.com/aws/aws-sdk-go-v2/service/s3](https://redirect.github.com/aws/aws-sdk-go-v2) | `v1.114.9` → `v1.114.10` |  |  | | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.8.0` → `v1.9.0` |  |  | | [github.com/posthog/posthog-go](https://redirect.github.com/posthog/posthog-go) | `v1.42.2` → `v1.42.3` |  |  | --- ### Release Notes <details> <summary>aws/aws-sdk-go-v2 (github.com/aws/aws-sdk-go-v2)</summary> ### [`v1.48.0`](https://redirect.github.com/aws/aws-sdk-go-v2/blob/HEAD/CHANGELOG.md#Release-2026-11-10) #### General Highlights - **Dependency Update**: Update to smithy-go v1.28.9. - **Dependency Update**: Updated to the latest SDK module versions #### Module Highlights - `github.com/aws/aws-sdk-go-v2`: v1.48.0 - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/credentials`: [v1.21.0](credentials/CHANGELOG.md#v1210-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue`: [v1.21.21](feature/dynamodb/attributevalue/CHANGELOG.md#v12121-2026-11-10) - **Bug Fix**: Fix a panic in `Marshal` and `MarshalMap` when a typed nil pointer with a pointer-receiver `Marshaler` is held in an interface or is the inner pointer of a double pointer. These values are encoded as `AttributeValueMemberNULL` again. - `github.com/aws/aws-sdk-go-v2/feature/dynamodbstreams/attributevalue`: [v1.20.21](feature/dynamodbstreams/attributevalue/CHANGELOG.md#v12021-2026-11-10) - **Bug Fix**: Fix a panic in `Marshal` and `MarshalMap` when a typed nil pointer with a pointer-receiver `Marshaler` is held in an interface or is the inner pointer of a double pointer. These values are encoded as `AttributeValueMemberNULL` again. - `github.com/aws/aws-sdk-go-v2/service/arcregionswitch`: [v1.23.0](service/arcregionswitch/CHANGELOG.md#v1230-2026-11-10) - **Feature**: Adds RetryableConflictException to UpdatePlan so AWS SDKs automatically retry updates that conflict with a concurrent change. - `github.com/aws/aws-sdk-go-v2/service/autoscaling`: [v1.81.0](service/autoscaling/CHANGELOG.md#v1810-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/bedrockagentcorecontrol`: [v1.79.0](service/bedrockagentcorecontrol/CHANGELOG.md#v1790-2026-11-10) - **Feature**: Amazon Bedrock AgentCore Gateway now supports domainOverride so JWT-authorized gateways can advertise your public domain in OAuth discovery behind a proxy or custom domain. AgentCore Runtime adds warmup lifecycle hooks and specifying runtime memory via hooksConfiguration and resourceConfigurations. - `github.com/aws/aws-sdk-go-v2/service/cloudformation`: [v1.83.0](service/cloudformation/CHANGELOG.md#v1830-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/cloudsearch`: [v1.41.0](service/cloudsearch/CHANGELOG.md#v1410-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/cloudwatchomni`: [v1.3.0](service/cloudwatchomni/CHANGELOG.md#v130-2026-11-10) - **Feature**: Release of GetSpaceDataAccess API - Used to get temporary credentials, limited to the requested actions, for working with data in a space. - `github.com/aws/aws-sdk-go-v2/service/connect`: [v1.214.0](service/connect/CHANGELOG.md#v12140-2026-11-10) - **Feature**: Amazon Connect now returns Contact Lens conversational analytics configuration in the DescribeContact API. Customers can retrieve a contact's analytics, redaction, summarization, and sentiment settings, consistent with the configuration already available in contact trace records and contact events. - `github.com/aws/aws-sdk-go-v2/service/devicefarm`: [v1.53.0](service/devicefarm/CHANGELOG.md#v1530-2026-11-10) - **Feature**: Adds the NONE insights type to disable insights generation for a run, a testPackageArn field in run details, and a new artifact type for device connect command logs. - `github.com/aws/aws-sdk-go-v2/service/docdb`: [v1.59.0](service/docdb/CHANGELOG.md#v1590-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/dynamodb`: [v1.74.0](service/dynamodb/CHANGELOG.md#v1740-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/service/dynamodbstreams`: [v1.47.0](service/dynamodbstreams/CHANGELOG.md#v1470-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/service/elasticache`: [v1.65.0](service/elasticache/CHANGELOG.md#v1650-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk`: [v1.45.0](service/elasticbeanstalk/CHANGELOG.md#v1450-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing`: [v1.42.0](service/elasticloadbalancing/CHANGELOG.md#v1420-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2`: [v1.64.0](service/elasticloadbalancingv2/CHANGELOG.md#v1640-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/gamelift`: [v1.69.0](service/gamelift/CHANGELOG.md#v1690-2026-11-10) - **Feature**: Amazon GameLift Servers adds game session placement insights. Logs show how the queue's priority configuration, along with player latency and cost data, are applied to each placement request. Use game session placement insights to diagnose why game session placements succeed, fail, or time out. - `github.com/aws/aws-sdk-go-v2/service/iam`: [v1.65.0](service/iam/CHANGELOG.md#v1650-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/lakeformation`: [v1.58.0](service/lakeformation/CHANGELOG.md#v1580-2026-11-10) - **Feature**: Adds support for governing AWS Glue user-defined functions with Lake Formation permissions. This release adds the UserDefinedFunction and AnyResource resources, the EXECUTE permission, and the GetTemporaryGlueFunctionCredentials and GetGlueFunctionSessionContext APIs. - `github.com/aws/aws-sdk-go-v2/service/marketplaceagreement`: [v1.31.0](service/marketplaceagreement/CHANGELOG.md#v1310-2026-11-10) - **Feature**: This release adds the freeTrialSummary.trialEndTime field to DescribeAgreement and the freeTrialEndTime field to SearchAgreements results, so you can see when an agreement's free trial ends. - `github.com/aws/aws-sdk-go-v2/service/neptune`: [v1.54.0](service/neptune/CHANGELOG.md#v1540-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/networkfirewall`: [v1.78.0](service/networkfirewall/CHANGELOG.md#v1780-2026-11-10) - **Feature**: Firewall Policy V2 for Network Firewall - `github.com/aws/aws-sdk-go-v2/service/pcs`: [v1.33.0](service/pcs/CHANGELOG.md#v1330-2026-11-10) - **Feature**: Added support for configuring AMIs, Amazon EC2 security groups, SSH key pairs, and launch template modes when creating or updating AWS PCS compute node groups. - `github.com/aws/aws-sdk-go-v2/service/rds`: [v1.133.0](service/rds/CHANGELOG.md#v11330-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/redshift`: [v1.72.0](service/redshift/CHANGELOG.md#v1720-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/route53profiles`: [v1.19.0](service/route53profiles/CHANGELOG.md#v1190-2026-11-10) - **Feature**: Adds support for having multiple profiles on one VPC. This is done using a priority system to handle conflicts on the dataplane. - `github.com/aws/aws-sdk-go-v2/service/s3`: [v1.114.10](service/s3/CHANGELOG.md#v111410-2026-11-10) - **Bug Fix**: Sign the S3 Express CreateSession call with the same credentials used to build the session cache key, and give each derived client its own bound S3 Express credentials provider. - `github.com/aws/aws-sdk-go-v2/service/s3tables`: [v1.26.0](service/s3tables/CHANGELOG.md#v1260-2026-11-10) - **Feature**: Adds support for server access logging for Amazon S3 table buckets with the new PutTableBucketLogging and GetTableBucketLogging APIs. - `github.com/aws/aws-sdk-go-v2/service/ses`: [v1.43.0](service/ses/CHANGELOG.md#v1430-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/sfn`: [v1.53.0](service/sfn/CHANGELOG.md#v1530-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/service/sns`: [v1.48.0](service/sns/CHANGELOG.md#v1480-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/sqs`: [v1.53.0](service/sqs/CHANGELOG.md#v1530-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/service/sts`: [v1.52.0](service/sts/CHANGELOG.md#v1520-2026-11-10) - **Feature**: Enable schema-based (de)serialization for this service. - `github.com/aws/aws-sdk-go-v2/service/swf`: [v1.44.0](service/swf/CHANGELOG.md#v1440-2026-11-10) - **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. - `github.com/aws/aws-sdk-go-v2/service/verifiedpermissions`: [v1.44.0](service/verifiedpermissions/CHANGELOG.md#v1440-2026-11-10) - **Feature**: Inconsequential changes to model formatting </details> <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) </details> <details> <summary>posthog/posthog-go (github.com/posthog/posthog-go)</summary> ### [`v1.42.3`](https://redirect.github.com/PostHog/posthog-go/releases/tag/v1.42.3): 1.42.3 [Compare Source](https://redirect.github.com/posthog/posthog-go/compare/v1.42.2...v1.42.3) #### Unreleased </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/fclairamb/solidping). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuNSIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.7.0` → `v1.9.1` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.1`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.1): : Bugfix update [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.9.0...v1.9.1) This is a bugfix release. `MarshalForm` now honors the `style` and `explode` of a form property's encoding, and `deepObject` binding 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 ##### `MarshalForm` honors `style` and `explode` `MarshalForm` only read `ContentType` from a property's `RequestBodyEncoding`, so an array was always written with indexed keys, `topic[0]=a&topic[1]=b`, even when the encoding declared `style: form, explode: true`, which serializes as repeated keys, `topic=a&topic=b`. A property whose encoding sets `Style` or `Explode` is now serialized as a query parameter of that style would be: `form`, `spaceDelimited` and `pipeDelimited` repeat the key when exploded and write one delimited value otherwise, and `deepObject` is the existing bracketed form. `Explode` defaults to true for `form` and 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](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2604)). The `application/json` content type branch, which returned `unsupported encoding` for every content type including JSON, now works too ([#​187](https://redirect.github.com/oapi-codegen/runtime/issues/187), closes [#​186](https://redirect.github.com/oapi-codegen/runtime/issues/186)). ##### `deepObject` integers that overflow are rejected `UnmarshalDeepObject` parsed integer fields as 64-bit and assigned them without checking that the value fit, so `?filter[count]=4294967297` bound into an `int32` as `1` with no error. Out-of-range values now fail with an `overflows destination` error, as they already did for the form style and the JSON binders. Thanks to [@​youdie006](https://redirect.github.com/youdie006) ([#​185](https://redirect.github.com/oapi-codegen/runtime/issues/185)). #### 🐛 Bug fixes - fix: honour style and explode in MarshalForm encodings ([#​187](https://redirect.github.com/oapi-codegen/runtime/issues/187)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix: reject deepObject integers that overflow the destination ([#​185](https://redirect.github.com/oapi-codegen/runtime/issues/185)) [@​youdie006](https://redirect.github.com/youdie006) #### 📦 Dependency updates - chore(deps): update release-drafter/release-drafter action to v7.11.0 ([#​184](https://redirect.github.com/oapi-codegen/runtime/issues/184)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> - No new contributors ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) ### [`v1.8.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.8.0): : Bind the request body value the validator saw [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.7.0...v1.8.0) 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 a `deepObject` serialization quirk. Existing binding and serialization behaviour is unchanged unless generated code calls the new function. The root module's dependencies are unchanged; the separate `strictmiddleware/echo-v5` module now requires Echo v5.4.2. ##### Notable Changes ##### `BindJSONBody`: bind exactly what the validator validated Strict servers generated by `oapi-codegen` decode the JSON request body with `encoding/json` after a validation middleware has already decoded and validated it. The two decoders do not agree on member names: `encoding/json` matches struct fields case-insensitively, so a body like `{"role":"user","ROLE":"admin"}` validates as `role: user` and then binds as `Role: "admin"`. Anything the validator checked can be bypassed by a differently-cased duplicate. `BindJSONBody(r *http.Request, v any) error` closes that gap. When the request has passed through a validator built on kin-openapi v0.151.0 or later with `openapi3filter.Options.KeepValidatedValue` set, the body carries the value the validator decoded, and `BindJSONBody` binds that value into the destination with `BindJSONValue(value, v any) error` instead of reading the body again. Binding follows `encoding/json`'s rules (struct tags, embedded structs, `json.Unmarshaler` and `encoding.TextUnmarshaler`, base64 for `[]byte`, `float64` for `any`, `json.Number` preserved) 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, `BindJSONBody` falls back to `json.NewDecoder(r.Body).Decode(v)`, so error responses are unchanged for everyone who is not running a validator. The oapi-codegen validation middlewares enable `KeepValidatedValue` by 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 calls `BindJSONBody` is landing in `oapi-codegen` separately ([oapi-codegen/oapi-codegen#2605](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2605)); the runtime side ships first so generated code can rely on it. ##### `types.Date` implements `encoding.TextMarshaler` `Date` had an `UnmarshalText` that parses `2006-01-02` but no `MarshalText`, so it inherited `time.Time`'s RFC 3339 one. Any codec that pairs `TextMarshaler` with `TextUnmarshaler` (`encoding/xml`, DynamoDB mappers, and others) therefore wrote a `Date` it could not read back. `MarshalText` now formats with `DateFormat`, matching `MarshalJSON`, `String` and `UnmarshalText`. Thanks to [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz). ##### `deepObject` no longer emits `param[]=null` for nil maps and slices Marshalling a `deepObject` parameter whose field held a typed nil map or nil slice produced a `param[]=null` pair, because the intermediate `json.Marshal` turned the nil into `null`. Such fields are now omitted, as an empty map or slice already was. Nil pointers are still serialized as `null`, as before. Thanks to [@​SKalt](https://redirect.github.com/SKalt) ([#​160](https://redirect.github.com/oapi-codegen/runtime/issues/160)). ##### 🚀 New features and improvements - Add BindJSONBody to bind the request body value kin-openapi validated ([#​165](https://redirect.github.com/oapi-codegen/runtime/issues/165)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - Add MarshalText to types.Date ([#​162](https://redirect.github.com/oapi-codegen/runtime/issues/162)) [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) ##### 🐛 Bug fixes - fix: omit nil maps and slices from deepObject marshalling ([#​161](https://redirect.github.com/oapi-codegen/runtime/issues/161)) [@​SKalt](https://redirect.github.com/SKalt), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) ##### 📦 Dependency updates <details> <summary>6 changes</summary> - fix(deps): update module github.com/labstack/echo/v5 to v5.4.2 ([#​166](https://redirect.github.com/oapi-codegen/runtime/issues/166)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update release-drafter/release-drafter action to v7.10.0 ([#​164](https://redirect.github.com/oapi-codegen/runtime/issues/164)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.1 ([#​163](https://redirect.github.com/oapi-codegen/runtime/issues/163)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.1 ([#​159](https://redirect.github.com/oapi-codegen/runtime/issues/159)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.2 ([#​158](https://redirect.github.com/oapi-codegen/runtime/issues/158)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/golangci/golangci-lint to v2.15.0 ([#​157](https://redirect.github.com/oapi-codegen/runtime/issues/157)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> ##### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> ##### New contributors - [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz) made their first contribution in [#​162](https://redirect.github.com/oapi-codegen/runtime/issues/162) - [@​SKalt](https://redirect.github.com/SKalt) made their first contribution in [#​161](https://redirect.github.com/oapi-codegen/runtime/issues/161) </details> --- ### Configuration 📅 **Schedule**: (in timezone Asia/Tokyo) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/civitaspo/terraform-provider-sigma). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzYuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/oapi-codegen/runtime](https://redirect.github.com/oapi-codegen/runtime) | `v1.7.0` → `v1.9.1` |  |  | --- ### Release Notes <details> <summary>oapi-codegen/runtime (github.com/oapi-codegen/runtime)</summary> ### [`v1.9.1`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.1): : Bugfix update [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.9.0...v1.9.1) This is a bugfix release. `MarshalForm` now honors the `style` and `explode` of a form property's encoding, and `deepObject` binding 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 ##### `MarshalForm` honors `style` and `explode` `MarshalForm` only read `ContentType` from a property's `RequestBodyEncoding`, so an array was always written with indexed keys, `topic[0]=a&topic[1]=b`, even when the encoding declared `style: form, explode: true`, which serializes as repeated keys, `topic=a&topic=b`. A property whose encoding sets `Style` or `Explode` is now serialized as a query parameter of that style would be: `form`, `spaceDelimited` and `pipeDelimited` repeat the key when exploded and write one delimited value otherwise, and `deepObject` is the existing bracketed form. `Explode` defaults to true for `form` and 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](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2604)). The `application/json` content type branch, which returned `unsupported encoding` for every content type including JSON, now works too ([#​187](https://redirect.github.com/oapi-codegen/runtime/issues/187), closes [#​186](https://redirect.github.com/oapi-codegen/runtime/issues/186)). ##### `deepObject` integers that overflow are rejected `UnmarshalDeepObject` parsed integer fields as 64-bit and assigned them without checking that the value fit, so `?filter[count]=4294967297` bound into an `int32` as `1` with no error. Out-of-range values now fail with an `overflows destination` error, as they already did for the form style and the JSON binders. Thanks to [@​youdie006](https://redirect.github.com/youdie006) ([#​185](https://redirect.github.com/oapi-codegen/runtime/issues/185)). #### 🐛 Bug fixes - fix: honour style and explode in MarshalForm encodings ([#​187](https://redirect.github.com/oapi-codegen/runtime/issues/187)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix: reject deepObject integers that overflow the destination ([#​185](https://redirect.github.com/oapi-codegen/runtime/issues/185)) [@​youdie006](https://redirect.github.com/youdie006) #### 📦 Dependency updates - chore(deps): update release-drafter/release-drafter action to v7.11.0 ([#​184](https://redirect.github.com/oapi-codegen/runtime/issues/184)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> - No new contributors ### [`v1.9.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.9.0): : Slimmer dependencies and a pluggable JSON codec [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.8.0...v1.9.0) This release removes the `strictmiddleware` packages, 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, binds `uuid.UUID` fields in `deepObject` parameters, and fixes `label` and `matrix` path parameters whose value contains the style's delimiter. The minimum Go version is now 1.26. #### Notable Changes ##### ☢️ Breaking: the `strictmiddleware` packages are gone The `strictmiddleware/{echo,echo-v5,gin,iris,nethttp}` packages held a handful of `StrictHandlerFunc` and `StrictMiddlewareFunc` type definitions, and nothing else. To define them, the runtime had to import Echo, Gin and Iris, so every program importing `github.com/oapi-codegen/runtime` dragged all three frameworks and their transitive dependencies into its `go.mod`, whether it used them or not. Removing the packages ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181), closes [#​180](https://redirect.github.com/oapi-codegen/runtime/issues/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 separate `strictmiddleware/echo-v5` module 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 get` and a `go mod tidy` that 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. > \[!IMPORTANT] > If your project uses generated code from oapi-codegen v2.6.0 or earlier, stay on runtime v1.8.0 until you have regenerated with v2.7.0 or later. Do not upgrade the runtime first. ##### Pluggable JSON codec Everything the runtime encodes or decodes as JSON now goes through a single, process-wide codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)). The default is `encoding/json`, unchanged, and a program can replace it in its `main` package: ```go runtime.SetJSONCodec(myCodec) // any value with Marshal(any) ([]byte, error) and Unmarshal([]byte, any) error ``` The API is: - `JSONCodec`: the two-method interface a replacement implements. `StdJSONCodec` is `encoding/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)` and `UnmarshalRead(io.Reader, any)`, for codecs that can stream request and response bodies instead of buffering them. A codec without it is buffered through `Marshal` and `Unmarshal`. - `JSONMarshal`, `JSONUnmarshal`, `JSONMarshalWrite` and `JSONUnmarshalRead`: the functions that generated code and the runtime itself call. `JSONUnmarshalRead` returns `io.EOF` for 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, `deepObject` and form parameter encoding, `BindJSONBody`, and the `types` package's `Date`, `Duration`, `Email` and `File` all use the codec already. Generated code still calls `encoding/json` directly today. oapi-codegen v2.9.0 will switch every generated `json.Marshal`, `json.Unmarshal` and strict response encoder over to these functions, at which point one `SetJSONCodec` call covers a whole program: models, clients and servers. This replaces the per-package `json-encoding` configuration proposed in [oapi-codegen/oapi-codegen#2371](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2371), where the design discussion lives, and it is the intended path to `encoding/json/v2`. Thanks to [@​CRaLFa](https://redirect.github.com/CRaLFa) for the implementation. ##### `uuid.UUID` fields bind in `deepObject` parameters A `deepObject` query parameter with a `format: uuid` field, such as `?filter[entity]=6ba7b810-9dad-11d1-80b4-00c04fd430c8`, failed with `unhandled type: uuid.UUID`. `uuid.UUID` is a `[16]byte`, so it never reached the branch that checks for `encoding.TextUnmarshaler`. Array-kind types that implement `UnmarshalText` now 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](https://redirect.github.com/youdie006) ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)). ##### `label` and `matrix` scalar path parameters are no longer split A scalar `label` or `matrix` path parameter whose value contained the style's delimiter, such as `big,red` sent 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](https://redirect.github.com/oapi-codegen/runtime/issues/114) made for the `simple` style. Arrays, structs and maps are unchanged ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182), closes [#​175](https://redirect.github.com/oapi-codegen/runtime/issues/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](https://redirect.github.com/oapi-codegen/runtime/issues/178)). #### ☢️ Breaking changes - Remove strictmiddleware type definitions ([#​181](https://redirect.github.com/oapi-codegen/runtime/issues/181)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🚀 New features and improvements - fix: bind uuid.UUID fields in deepObject parameters ([#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171)) [@​youdie006](https://redirect.github.com/youdie006) - feat: add process-wide JSON codec ([#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183)) [@​CRaLFa](https://redirect.github.com/CRaLFa), [@​claude](https://redirect.github.com/claude), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - Stop splitting label and matrix scalar path parameters ([#​182](https://redirect.github.com/oapi-codegen/runtime/issues/182)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### 📦 Dependency updates <details> <summary>8 changes</summary> - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) - fix(deps): update module github.com/gin-gonic/gin to v1.11.0 ([#​168](https://redirect.github.com/oapi-codegen/runtime/issues/168)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 ([#​169](https://redirect.github.com/oapi-codegen/runtime/issues/169)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/klauspost/compress to v1.18.7 \[security] ([#​167](https://redirect.github.com/oapi-codegen/runtime/issues/167)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/stretchr/testify to v1.12.1 ([#​170](https://redirect.github.com/oapi-codegen/runtime/issues/170)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 ([#​172](https://redirect.github.com/oapi-codegen/runtime/issues/172)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.3 ([#​173](https://redirect.github.com/oapi-codegen/runtime/issues/173)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.3 ([#​174](https://redirect.github.com/oapi-codegen/runtime/issues/174)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### 🔐 Security - Update Go to 1.26 and all dependencies to their latest versions ([#​178](https://redirect.github.com/oapi-codegen/runtime/issues/178)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz), [@​claude](https://redirect.github.com/claude) #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​CRaLFa](https://redirect.github.com/CRaLFa) made their first contribution in [#​183](https://redirect.github.com/oapi-codegen/runtime/issues/183) - [@​youdie006](https://redirect.github.com/youdie006) made their first contribution in [#​171](https://redirect.github.com/oapi-codegen/runtime/issues/171) ### [`v1.8.0`](https://redirect.github.com/oapi-codegen/runtime/releases/tag/v1.8.0): : Bind the request body value the validator saw [Compare Source](https://redirect.github.com/oapi-codegen/runtime/compare/v1.7.0...v1.8.0) 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 a `deepObject` serialization quirk. Existing binding and serialization behaviour is unchanged unless generated code calls the new function. The root module's dependencies are unchanged; the separate `strictmiddleware/echo-v5` module now requires Echo v5.4.2. #### Notable Changes ##### `BindJSONBody`: bind exactly what the validator validated Strict servers generated by `oapi-codegen` decode the JSON request body with `encoding/json` after a validation middleware has already decoded and validated it. The two decoders do not agree on member names: `encoding/json` matches struct fields case-insensitively, so a body like `{"role":"user","ROLE":"admin"}` validates as `role: user` and then binds as `Role: "admin"`. Anything the validator checked can be bypassed by a differently-cased duplicate. `BindJSONBody(r *http.Request, v any) error` closes that gap. When the request has passed through a validator built on kin-openapi v0.151.0 or later with `openapi3filter.Options.KeepValidatedValue` set, the body carries the value the validator decoded, and `BindJSONBody` binds that value into the destination with `BindJSONValue(value, v any) error` instead of reading the body again. Binding follows `encoding/json`'s rules (struct tags, embedded structs, `json.Unmarshaler` and `encoding.TextUnmarshaler`, base64 for `[]byte`, `float64` for `any`, `json.Number` preserved) 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, `BindJSONBody` falls back to `json.NewDecoder(r.Body).Decode(v)`, so error responses are unchanged for everyone who is not running a validator. The oapi-codegen validation middlewares enable `KeepValidatedValue` by 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 calls `BindJSONBody` is landing in `oapi-codegen` separately ([oapi-codegen/oapi-codegen#2605](https://redirect.github.com/oapi-codegen/oapi-codegen/issues/2605)); the runtime side ships first so generated code can rely on it. ##### `types.Date` implements `encoding.TextMarshaler` `Date` had an `UnmarshalText` that parses `2006-01-02` but no `MarshalText`, so it inherited `time.Time`'s RFC 3339 one. Any codec that pairs `TextMarshaler` with `TextUnmarshaler` (`encoding/xml`, DynamoDB mappers, and others) therefore wrote a `Date` it could not read back. `MarshalText` now formats with `DateFormat`, matching `MarshalJSON`, `String` and `UnmarshalText`. Thanks to [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz). ##### `deepObject` no longer emits `param[]=null` for nil maps and slices Marshalling a `deepObject` parameter whose field held a typed nil map or nil slice produced a `param[]=null` pair, because the intermediate `json.Marshal` turned the nil into `null`. Such fields are now omitted, as an empty map or slice already was. Nil pointers are still serialized as `null`, as before. Thanks to [@​SKalt](https://redirect.github.com/SKalt) ([#​160](https://redirect.github.com/oapi-codegen/runtime/issues/160)). #### 🚀 New features and improvements - Add BindJSONBody to bind the request body value kin-openapi validated ([#​165](https://redirect.github.com/oapi-codegen/runtime/issues/165)) [@​mromaszewicz](https://redirect.github.com/mromaszewicz) - Add MarshalText to types.Date ([#​162](https://redirect.github.com/oapi-codegen/runtime/issues/162)) [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 🐛 Bug fixes - fix: omit nil maps and slices from deepObject marshalling ([#​161](https://redirect.github.com/oapi-codegen/runtime/issues/161)) [@​SKalt](https://redirect.github.com/SKalt), [@​mromaszewicz](https://redirect.github.com/mromaszewicz) #### 📦 Dependency updates <details> <summary>6 changes</summary> - fix(deps): update module github.com/labstack/echo/v5 to v5.4.2 ([#​166](https://redirect.github.com/oapi-codegen/runtime/issues/166)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update release-drafter/release-drafter action to v7.10.0 ([#​164](https://redirect.github.com/oapi-codegen/runtime/issues/164)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - fix(deps): update module github.com/labstack/echo/v5 to v5.4.1 ([#​163](https://redirect.github.com/oapi-codegen/runtime/issues/163)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update github/codeql-action action to v4.39.1 ([#​159](https://redirect.github.com/oapi-codegen/runtime/issues/159)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update oapi-codegen/actions action to v0.9.2 ([#​158](https://redirect.github.com/oapi-codegen/runtime/issues/158)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) - chore(deps): update module github.com/golangci/golangci-lint to v2.15.0 ([#​157](https://redirect.github.com/oapi-codegen/runtime/issues/157)) [@​renovate\[bot\]](https://redirect.github.com/apps/renovate) </details> #### Sponsors We would like to thank our sponsors for their support during this release. <p align="center"> <a href="https://www.devzero.io/lp/dev-environment?utm_campaign=github&utm_source=oapi-codegen%20repo&utm_medium=github%20sponsorship"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-light.svg"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg"> <img alt="DevZero logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/devzero-dark.svg" height="100px"> </picture> </a> </p> <p align="center"> <a href="https://cybozu.co.jp/?utm_source=oapi-codegen+repo&utm_medium=github+sponsorship"> <img alt="Cybozu logo" src="https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/v2.8.0/.github/sponsors/cybozu.svg" height="100px"> </a> </p> #### New contributors - [@​jusabe-kreditz](https://redirect.github.com/jusabe-kreditz) made their first contribution in [#​162](https://redirect.github.com/oapi-codegen/runtime/issues/162) - [@​SKalt](https://redirect.github.com/SKalt) made their first contribution in [#​161](https://redirect.github.com/oapi-codegen/runtime/issues/161) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rootlyhq/terraform-provider-rootly). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjQ0LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jian Yuan Lee <[email protected]>
Summary
Add
output-options.json-encodingconfiguration block to control JSON encoding behavior in generated code.escape-html(bool, defaulttrue): maps tojson.Encoder.SetEscapeHTML. When set tofalse, HTML special characters (<,>,&) are output as-is instead of being escaped to Unicode sequences.indent-prefix(string, default""): maps to the first argument ofjson.Encoder.SetIndent.indent(string, default""): maps to the second argument ofjson.Encoder.SetIndent. When non-empty, indented output is produced.Example config
Affected generated code
MarshalJSON()in union typesjson.Marshal(v)→ encoder with configured settingsMarshalJSON()in types withadditionalPropertiesMarshalJSON()in union +additionalPropertiestypesjson.Marshal(body)→ encoder with configured settingsVisit*Response()in strict serverjson.NewEncoder(&buf)→ encoder with configured settingsWhen no options are set (default),
json.Marshal/json.NewEncoderare emitted as before — fully backward-compatible.Parameter serialization (path, query, header, cookie) is intentionally excluded: applying
SetIndentthere would embed whitespace into URL/header values and break requests.Test plan
TestJSONEncodingOptionscovers: default,escape-html: false,indent, both options combined, and explicitescape-html: truego/formatvalidation in all cases🤖 Generated with Claude Code