Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oapi-codegen/runtime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7afeea8
Choose a base ref
...
head repository: oapi-codegen/runtime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 540d34a
Choose a head ref
  • 11 commits
  • 15 files changed
  • 3 contributors

Commits on Jul 12, 2026

  1. 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]>
    mromaszewicz and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    ee085ff View commit details
    Browse the repository at this point in the history
  2. chore(deps): update github/codeql-action action to v4.37.0 (#123)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    a6d718f View commit details
    Browse the repository at this point in the history
  3. 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>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    a90c79a View commit details
    Browse the repository at this point in the history
  4. 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>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    df140cb View commit details
    Browse the repository at this point in the history
  5. chore(deps): update oapi-codegen/actions action to v0.8.0 (#130)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    67e86fd View commit details
    Browse the repository at this point in the history
  6. chore(deps): update golang/govulncheck-action action to v1.1.0 (#137)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    d0d5c3a View commit details
    Browse the repository at this point in the history
  7. 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]>
    mromaszewicz and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    7c889f3 View commit details
    Browse the repository at this point in the history
  8. 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]>
    mromaszewicz and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    95c13c0 View commit details
    Browse the repository at this point in the history
  9. 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]>
    mromaszewicz and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    324e57f View commit details
    Browse the repository at this point in the history
  10. 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]>
    mromaszewicz and claude authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    e89dbb8 View commit details
    Browse the repository at this point in the history
  11. 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>
    renovate[bot] authored Jul 12, 2026
    Configuration menu
    Copy the full SHA
    540d34a View commit details
    Browse the repository at this point in the history
Loading