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.7
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.8
Choose a head ref
  • 1 commit
  • 2 files changed
  • 2 contributors

Commits on Jul 20, 2026

  1. feat(expander): add ExpandSchemaWithOptions for confined schema expan…

    …sion (#291)
    
    ExpandSchema expands a schema against an in-memory root but takes no
    ExpandOptions, so it always uses the package default (unsandboxed) document
    loader. Downstream consumers that expand a schema whose $ref may come from an
    untrusted source — go-openapi/analysis (schema analysis, flatten) and
    go-openapi/validate — had no way to inject a confined loader on this path, and
    could not reassemble the equivalent themselves because the root-to-base priming
    (baseForRoot / normalizeBase) is unexported.
    
    Add ExpandSchemaWithOptions(schema, root, cache, opts): the option-aware form of
    ExpandSchema. It preserves the in-memory-root behavior (base derived from root,
    schemas always expanded) while honoring the caller's options — in particular
    PathLoaderWithOptions / PathLoader for a confined loader, plus ContinueOnError,
    AbsoluteCircularRef and MaxExpansionNodes. ExpandSchema is reimplemented as
    ExpandSchemaWithOptions(schema, root, cache, nil), so its 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
    9bfe732 View commit details
    Browse the repository at this point in the history
Loading
⌂ 换网址