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: v1.8.0
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: v1.9.0
Choose a head ref
  • 12 commits
  • 25 files changed
  • 7 contributors

Commits on Nov 5, 2026

  1. chore(deps): update github/codeql-action action to v4.39.3 (#174)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    1e9bbf2 View commit details
    Browse the repository at this point in the history
  2. chore(deps): update oapi-codegen/actions action to v0.9.3 (#173)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    8fc7a68 View commit details
    Browse the repository at this point in the history
  3. fix(deps): update module github.com/labstack/echo/v5 to v5.4.4 (#172)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    e8d61e2 View commit details
    Browse the repository at this point in the history
  4. fix(deps): update module github.com/stretchr/testify to v1.12.1 (#170)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    a99390d View commit details
    Browse the repository at this point in the history
  5. chore(deps): update module github.com/klauspost/compress to v1.18.7 […

    …security] (#167)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    694cd4a View commit details
    Browse the repository at this point in the history
  6. fix(deps): update module github.com/oapi-codegen/nullable to v1.2.0 (#…

    …169)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    b2e1019 View commit details
    Browse the repository at this point in the history
  7. fix(deps): update module github.com/gin-gonic/gin to v1.11.0 (#168)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2026
    Configuration menu
    Copy the full SHA
    ce3e04f View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2026

  1. Update Go to 1.26 and all dependencies to their latest versions (#178)

    Raises the module's minimum Go version from 1.24 to 1.26, the oldest
    supported Go release, and updates every direct and indirect dependency to
    its latest version that still builds on Go 1.26.
    
    A few indirect dependencies are held back on purpose:
    
    - kataras/pio v0.0.13, kataras/golog v0.1.11 and kataras/blocks v0.0.8 are
      the versions iris v12.2.11 was built against. Newer pio moved the
      RichOption type and breaks the iris build, and newer blocks requires
      Go 1.27.
    - gin-contrib/sse v1.1.0 is what gin v1.12.0 requires; v1.2.1 would raise
      the minimum Go version to 1.26.10.
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
    mromaszewicz and claude authored Nov 9, 2026
    Configuration menu
    Copy the full SHA
    108a45d View commit details
    Browse the repository at this point in the history
  2. Stop splitting label and matrix scalar path parameters (#182)

    Closes: #175
    
    `BindStyledParameterWithOptions` rejected valid scalar string values
    under the `label` and `matrix` styles whenever the value contained the
    style's delimiter, failing with "expected single value, got N parts".
    A client that percent-encodes `big,red` as `.big%2Cred` and a router
    that decodes the segment before binding (`ValueIsUnescaped`) could not
    round-trip the value. This was the remaining primitive branch not
    covered by the #114 fix, which only stopped splitting for `simple`.
    
    The primitive branch now strips only the style prefix and never splits:
    label requires and removes a leading `.`, non-exploded matrix requires
    and removes `;name=`, and exploded matrix requires a leading `;` and
    removes `name=` when present, keeping the leniency the exploded splitter
    always had. Error messages are unchanged. Arrays, structs and maps still
    go through `splitStyledParameter` as before.
    
    Two tests pin the surrounding behavior so this branch cannot drift: an
    end-to-end table over label/matrix × explode × {primitive, slice, struct,
    map, malformed prefix} through the public entry point, and a path
    round-trip table that styles, router-decodes and binds every value the
    client can emit, including the delimiter-bearing scalars from the issue.
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
    mromaszewicz and claude authored Nov 9, 2026
    Configuration menu
    Copy the full SHA
    754d5c0 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2026

  1. feat: add process-wide JSON codec (#183)

    * feat: add process-wide JSON codec
    
    Add a JSONCodec that generated code and this package share, so the JSON implementation can be replaced in one place.
    
    - Add JSONCodec, StdJSONCodec, SetJSONCodec, JSONMarshal and JSONUnmarshal.
    - Route the json.Marshal and json.Unmarshal calls in bindform.go, bindjson.go, bindparam.go and deepobject.go through the codec.
    - Route the MarshalJSON and UnmarshalJSON methods in types/ through the codec.
    - Keep the codec in internal/jsoncodec, because runtime imports types and types cannot import runtime.
    
    Co-Authored-By: Claude Fable 5.2 <[email protected]>
    
    * feat: stream bodies through the JSON codec, re-export the internal package
    
    Follow-up to the process-wide JSON codec, per the review on #183.
    
    Re-export rather than duplicate: the internal/jsoncodec package now also
    holds the default implementation, and the top-level file is type aliases
    and one-line wrappers, so neither the interface nor the default is
    defined twice.
    
    Add StreamingJSONCodec, optionally implemented by a JSONCodec, with
    MarshalWrite(io.Writer, any) and UnmarshalRead(io.Reader, any), and the
    helpers JSONMarshalWrite and JSONUnmarshalRead that use those methods
    when present and otherwise buffer through Marshal and Unmarshal. One
    SetJSONCodec registration covers both, so a codec that implements only
    the byte pair behaves coherently everywhere, and one that also streams
    is picked up automatically. The method names are encoding/json/v2's.
    
    StdJSONCodec implements only the byte pair. A codec that embeds it and
    overrides Marshal must not have encoding/json's Encoder promoted past
    that override for bodies. The default codec, which SetJSONCodec(nil)
    restores, is unexported and adds encoding/json's Encoder and Decoder,
    so behaviour without SetJSONCodec is unchanged.
    
    BindJSONBody decodes through JSONUnmarshalRead. Generated handlers take
    io.EOF as an optional body left out, and neither json.Unmarshal nor v2
    reports empty input that way, so BindJSONBody checks for an empty or
    white-space-only body itself and returns io.EOF before the codec is
    involved.
    
    Co-Authored-By: Claude Fable 5.1 <[email protected]>
    
    * fix: make io.EOF for an empty body the codec helper's contract
    
    Review follow-ups to the streaming codec.
    
    JSONUnmarshalRead, not only BindJSONBody, now returns io.EOF when its
    input is nil, empty or only JSON white space, whichever codec is in use
    and without involving it. The helper is exported for generated code, and
    a handler that checks errors.Is(err, io.EOF) must not depend on how the
    registered codec reports an empty input: encoding/json's Decoder says
    io.EOF, json.Unmarshal says "unexpected end of JSON input", and v2 says
    something else again. The bytes read to find the first non-white-space
    byte are replayed in front of the reader, so the codec sees the input
    unchanged and a syntax error's offset is what it was before.
    
    SetJSONCodec(StdJSONCodec{}) restores the default, as nil does. StdJSONCodec
    is the default's byte half, and passing it reads as "encoding/json", not
    as a request for the buffered stream path with its missing trailing
    newline and trailing-data rejection. The StdJSONCodec doc now spells out
    those two differences for codecs that embed it.
    
    Document the codec contract: it must be re-entrant, since the MarshalJSON
    methods in runtime/types and in generated union and additionalProperties
    types call back into it from inside its own Marshal; SetJSONCodec is for a
    program's main package, being process-wide and unsynchronised; and the
    codec doesn't reach JSON a web framework's binder or JSON method handles,
    nor a validated body bound without decoding it again.
    
    Fix two stale comments, and test a read error, the empty-input contract
    under nil, byte-only and streaming codecs, and the default path with
    leading white space.
    
    ---------
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
    Co-authored-by: Marcin Romaszewicz <[email protected]>
    3 people authored Nov 10, 2026
    Configuration menu
    Copy the full SHA
    2de32b1 View commit details
    Browse the repository at this point in the history
  2. Remove strictmiddleware type definitions (#181)

    Closes: #180
    
    This really trims down everyone's transitive dependencies, and we don't need these
    definitions as of oapi-codegen v2.7.0
    mromaszewicz authored Nov 10, 2026
    Configuration menu
    Copy the full SHA
    171731d View commit details
    Browse the repository at this point in the history
  3. fix: bind uuid.UUID fields in deepObject parameters (#171)

    uuid.UUID is a [16]byte array, so it never reached the TextUnmarshaler check that #45 added to the struct branch and still failed with "unhandled type: uuid.UUID". Handle array kinds that implement encoding.TextUnmarshaler, as BindStringToObject already does.
    
    Co-authored-by: youdie006 <[email protected]>
    youdie006 and youdie006 authored Nov 10, 2026
    Configuration menu
    Copy the full SHA
    1b74ca8 View commit details
    Browse the repository at this point in the history
Loading