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: go-openapi/spec
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.8
Choose a base ref
...
head repository: go-openapi/spec
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.22.9
Choose a head ref
  • 1 commit
  • 2 files changed
  • 2 contributors

Commits on Jul 20, 2026

  1. feat(expander): add ExpandParameterWithOptions and ExpandResponseWith…

    …Options (#292)
    
    ExpandParameter/ExpandParameterWithRoot and ExpandResponse/ExpandResponseWithRoot
    expand a parameter or response but take no ExpandOptions, so they always use the
    package default (unsandboxed) document loader — the same gap that motivated
    ExpandSchemaWithOptions. go-openapi/validate expands every parameter and response
    $ref of a spec through these functions, so a $ref from an untrusted source could
    not be confined there.
    
    Add ExpandParameterWithOptions(parameter, root, cache, opts) and
    ExpandResponseWithOptions(response, root, cache, opts): the option-aware forms.
    When root is non-nil, refs resolve against the in-memory root (base derived from
    root); otherwise they resolve relative to opts.RelativeBase. In particular
    opts.PathLoaderWithOptions / PathLoader inject a confined loader. The four
    existing functions are reimplemented in terms of the new ones, so their behavior
    is unchanged.
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    fredbi and claude authored Jul 20, 2026
    Configuration menu
    Copy the full SHA
    e682f66 View commit details
    Browse the repository at this point in the history
Loading
⌂ 换网址