Repository navigation
Comparing changes
Open a pull request
base repository: oapi-codegen/runtime
base: v1.4.2
head repository: oapi-codegen/runtime
compare: v1.5.0
- 11 commits
- 15 files changed
- 3 contributors
Commits on Jul 12, 2026
-
Support binding deepObject parameters into map[string]interface{} (#139)
Closes: #138 Binding a deepObject query parameter into map[string]interface{} — the type generated for a schema with `additionalProperties: true` — failed with "unhandled type: interface {}" because assignPathValues had no case for interface destinations. An empty interface destination now receives the generic value shapes encoding/json uses, synthesized from the shape of the parsed fragment: leaves are typed by JSON-scalar inference ("true" -> bool, "12.5" -> float64, "null" -> nil, anything else stays a string — the JSON number grammar rejects leading zeros, so values like "00714" keep their exact form), consecutive integer subscripts "0".."n-1" become []interface{}, and other nodes become map[string]interface{}, recursively. Non-empty interface destinations still report an unhandled type. This also makes MarshalDeepObject output for a map[string]interface{} round-trip through binding, up to the inherent ambiguities of the untyped wire format, which are documented on the new helpers. Co-authored-by: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ee085ff - Browse repository at this point
Copy the full SHA ee085ffView commit details -
chore(deps): update github/codeql-action action to v4.37.0 (#123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a6d718f - Browse repository at this point
Copy the full SHA a6d718fView commit details -
chore(deps): update release-drafter/release-drafter action to v7.5.1 (#…
…124) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a90c79a - Browse repository at this point
Copy the full SHA a90c79aView commit details -
fix(deps): update module github.com/labstack/echo/v5 to v5.2.1 (#126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for df140cb - Browse repository at this point
Copy the full SHA df140cbView commit details -
chore(deps): update oapi-codegen/actions action to v0.8.0 (#130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 67e86fd - Browse repository at this point
Copy the full SHA 67e86fdView commit details -
chore(deps): update golang/govulncheck-action action to v1.1.0 (#137)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for d0d5c3a - Browse repository at this point
Copy the full SHA d0d5c3aView commit details -
Prefer the form struct tag over json for form encoding (#140)
Closes: #128 MarshalForm decided field names, "-" skips and omitempty from the json struct tag, and BindForm and the nested form marshal/bind helpers did the same, so a form tag on a field was ignored entirely — including the omitempty case reported in the issue. Tag resolution for form encoding now goes through formFieldTag, which prefers the form tag when present and non-empty and falls back to the json tag. The fallback keeps structs that only carry json tags — older generated code, multipart bodies, hand-written types — behaving exactly as before, while structs with a form tag get it honored consistently across BindForm, MarshalForm and the nested helpers, so form data round-trips under one set of names. Co-authored-by: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7c889f3 - Browse repository at this point
Copy the full SHA 7c889f3View commit details -
Explain how to send nested objects when style serialization fails (#141)
Refs: #52 Styling a parameter whose object schema contains a nested object failed with a bare "unsupported type Header", which gives no hint that the spec itself defines no wire format for this. OpenAPI style-based serialization covers only primitives, arrays, and flat objects; complex values are meant to use the parameter's content form (e.g. `content: application/json`). When a struct or map reaches primitiveToString without satisfying any of the serialization escape hatches, the error now says exactly that and points at declaring the parameter with `content: application/json` (or mapping the schema to a Go type implementing fmt.Stringer). Behavior is otherwise unchanged: nested objects still fail to serialize, by design. Co-authored-by: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 95c13c0 - Browse repository at this point
Copy the full SHA 95c13c0View commit details -
Let generated code declare whether styled parameter values are escaped (
#143) Closes: #35 BindStyledParameterWithOptions unconditionally unescaped values by parameter location, but routers differ in whether they deliver path parameters raw or already decoded. For frameworks that decode (e.g. Echo), this double-decoded values containing literal percent signs: "discount%20" arrived as "discount " and "15%off" failed binding entirely. BindStyledParameterOptions gains ValueIsUnescaped: when true, the value has already been decoded (typically by the router) and binds verbatim. The zero value preserves the historical unescape-by-location behavior, so all existing callers — including the deprecated BindStyledParameter and BindStyledParameterWithLocation entry points and current generated code — are unaffected. Generated server wrappers will set the flag to match what their framework actually delivers, tracked in oapi-codegen/oapi-codegen#2455. Co-authored-by: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 324e57f - Browse repository at this point
Copy the full SHA 324e57fView commit details -
Add types.Duration for the RFC 3339 duration format (#144)
Closes: #66 The OpenAPI "duration" format references the RFC 3339 appendix A duration grammar, which the Go standard library does not implement, and the available third-party parsers are unmaintained or parse-only. types.Duration stores the parsed components (years, months, weeks, days, hours, minutes, seconds), so any spec-valid duration round-trips losslessly through ParseDuration and String — calendar components have no fixed length in wall-clock time and cannot be represented by a time.Duration. The parser follows the RFC grammar strictly (component order and uniqueness, weeks exclusive, no negatives), with one documented interoperability deviation: fractional seconds are accepted (period or comma) and emitted when present. TimeDuration and FromTimeDuration bridge to time.Duration where the conversion is well-defined: years and months error, weeks and days convert at the fixed 7-day/24-hour convention. JSON and text marshaling plus a Binder implementation make Duration a scalar binding target for parameters, like types.Date. Co-authored-by: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e89dbb8 - Browse repository at this point
Copy the full SHA e89dbb8View commit details -
fix(deps): update module github.com/labstack/echo/v5 to v5.3.0 (#142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 540d34a - Browse repository at this point
Copy the full SHA 540d34aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.4.2...v1.5.0