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: 247b459
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: 2755f15
Choose a head ref
  • 6 commits
  • 12 files changed
  • 3 contributors

Commits on Apr 9, 2026

  1. chore(deps): update release-drafter/release-drafter action to v7.2.0 (#…

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

Commits on Apr 11, 2026

  1. Configuration menu
    Copy the full SHA
    19040cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6fd6c25 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2026

  1. Configuration menu
    Copy the full SHA
    d2b7c4c View commit details
    Browse the repository at this point in the history

Commits on May 19, 2026

  1. Percent-encode deepObject parameter wire output (#132)

    Closes: #131
    
    MarshalDeepObject emitted raw bytes for values, map keys, and paramName.
    Previously masked by oapi-codegen v2.6.0's client re-encoding via
    url.Values.Encode(); v2.7.0 stopped re-encoding (PR #2307), exposing
    the bug as 400s against RFC3986-compliant servers and silent
    query-string injection from '&' in values.
    
    The fix passes values, each path segment, and the paramName through
    url.QueryEscape, matching the v2.6.0-effective behavior. Adds
    TestDeepObject_URLEncoding (51 sub-cases) covering reserved chars,
    non-ASCII, emoji, control bytes across values, map keys, and param
    names. Documents the unmarshal-side ambiguity for literal [ ] in keys
    (inherent to the deepObject format, matches qs/Rails behavior).
    mromaszewicz authored May 19, 2026
    Configuration menu
    Copy the full SHA
    17de1dd View commit details
    Browse the repository at this point in the history
  2. Fix form binding of Nullables (#133)

    Closes: #129
    
    `nullable.Nullable[T]` is defined as `map[bool]T`, but neither
    `bindFormImpl` nor `BindStringToObjectWithOptions` had a `reflect.Map`
    branch, so any Nullable field in a form body failed with
    "error binding string parameter: can not bind to destination of type: map".
    
    This change adds Map handling at both layers:
    
    - `BindStringToObjectWithOptions` (bindstring.go): a bool-keyed map
      destination is treated as a Nullable wrapper -- bind `src` into a
      fresh value of the map's element type, then store it under
      `map[bool]T{true: value}`. This covers query, path, and header
      parameters in addition to forms.
    - `bindFormImpl` (bindform.go): a bool-keyed map field recurses
      through `bindFormImpl` on the element type and wraps the result, so
      `Nullable[ComplexStruct]` works alongside scalars. A non-bool-keyed
      map field routes to a new `bindFormMap` helper that binds entries
      of the form `name[key]=value` into a generic `map[K]V`.
    
    The structural `map[bool]T` check keeps `runtime` decoupled from
    `github.com/oapi-codegen/nullable`; the data shape is the whole type,
    so detecting it by reflection is equivalent to importing the package.
    
    An absent form field still produces an unspecified (zero) Nullable,
    matching the pre-fix behavior. Form payloads have no way to encode
    an explicit null, so `name=` binds as the inner type's zero value
    (specified), symmetric with non-nullable form binding.
    
    Tests cover scalar Nullable, generic `map[K]V`, and the
    absent-field-stays-unspecified path.
    
    Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
    mromaszewicz and claude authored May 19, 2026
    Configuration menu
    Copy the full SHA
    2755f15 View commit details
    Browse the repository at this point in the history
Loading