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: 540d34a
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: 01be2fa
Choose a head ref
  • 2 commits
  • 9 files changed
  • 4 contributors

Commits on Jul 15, 2026

  1. Allow customizing default query encoder (#145)

    Addresses oapi-codegen/oapi-codegen#2051
    
    Go's net/url encodes a space in query strings as '+' (the form-urlencoded
    convention), which is not RFC 3986 compliant. Some servers (e.g. OData
    endpoints expecting ?filter=name%20eq%20'x') reject '+'-encoded spaces with
    400 Bad Request, while others require '+'. Since neither encoding is
    universally correct, this makes the behavior configurable rather than
    changing the default.
    
    Introduce a QueryEncoder interface (a single EscapeQueryValue method) with two
    built-in implementations in a new encoder.go: NetURLQueryEncoder (the default,
    '+' for space, preserving current behavior) and RFC3986QueryEncoder ('%20' for
    space). A package-level DefaultQueryEncoder (mirroring http.DefaultClient) lets
    callers opt in during program initialization. Names and map keys are escaped as
    values with allowReserved=false, which allowReserved never applies to.
    
    All query escaping in styleparam.go and deepobject.go now routes through
    DefaultQueryEncoder, so both styled and deepObject query parameters honor the
    choice. Path escaping and x-www-form-urlencoded request bodies are left
    unchanged, where '+' for a space is the correct, media-type-defined behavior.
    
    Documented under the README "Encoding" section; tests in encoder_test.go.
    
    Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
    mromaszewicz and claude authored Jul 15, 2026
    Configuration menu
    Copy the full SHA
    1463938 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2026

  1. chore(deps): update module github.com/golangci/golangci-lint to v2.12…

    ….2 (#112)
    
    * chore(deps): update module github.com/golangci/golangci-lint to v2.12.2
    
    * Update lint settings
    
    The linter was being pulled incorrectly, and run it on Go 1.26 like
    in the main repo.
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Marcin Romaszewicz <[email protected]>
    renovate[bot] and mromaszewicz authored Jul 16, 2026
    Configuration menu
    Copy the full SHA
    01be2fa View commit details
    Browse the repository at this point in the history
Loading