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/validate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.25.3
Choose a base ref
...
head repository: go-openapi/validate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.26.0
Choose a head ref
  • 6 commits
  • 14 files changed
  • 4 contributors

Commits on Jun 5, 2026

  1. chore(deps): bump the go-openapi-dependencies group with 4 updates

    Bumps the go-openapi-dependencies group with 4 updates: [github.com/go-openapi/analysis](https://github.com/go-openapi/analysis), [github.com/go-openapi/errors](https://github.com/go-openapi/errors), [github.com/go-openapi/loads](https://github.com/go-openapi/loads) and [github.com/go-openapi/spec](https://github.com/go-openapi/spec).
    
    
    Updates `github.com/go-openapi/analysis` from 0.25.1 to 0.25.2
    - [Release notes](https://github.com/go-openapi/analysis/releases)
    - [Commits](go-openapi/analysis@v0.25.1...v0.25.2)
    
    Updates `github.com/go-openapi/errors` from 0.22.7 to 0.22.8
    - [Release notes](https://github.com/go-openapi/errors/releases)
    - [Commits](go-openapi/errors@v0.22.7...v0.22.8)
    
    Updates `github.com/go-openapi/loads` from 0.23.3 to 0.23.4
    - [Release notes](https://github.com/go-openapi/loads/releases)
    - [Commits](go-openapi/loads@v0.23.3...v0.23.4)
    
    Updates `github.com/go-openapi/spec` from 0.22.4 to 0.22.5
    - [Release notes](https://github.com/go-openapi/spec/releases)
    - [Commits](go-openapi/spec@v0.22.4...v0.22.5)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/go-openapi/analysis
      dependency-version: 0.25.2
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: go-openapi-dependencies
    - dependency-name: github.com/go-openapi/errors
      dependency-version: 0.22.8
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: go-openapi-dependencies
    - dependency-name: github.com/go-openapi/loads
      dependency-version: 0.23.4
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: go-openapi-dependencies
    - dependency-name: github.com/go-openapi/spec
      dependency-version: 0.22.5
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: go-openapi-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and github-actions[bot] committed Jun 5, 2026
    Configuration menu
    Copy the full SHA
    a62829b View commit details
    Browse the repository at this point in the history
  2. doc: aligned with org docs (#256)

    Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
    fredbi authored Jun 5, 2026
    Configuration menu
    Copy the full SHA
    0fa122c View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2026

  1. doc: updated contributors file

    Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    bot-go-openapi[bot] authored and github-actions[bot] committed Jun 6, 2026
    Configuration menu
    Copy the full SHA
    64e54b4 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2026

  1. feat(spec): warn on dubious $ref locations (#258)

    Adds a warning-only check (validateDubiousRefs) over the unexpanded spec's
    $refs, to flag location patterns that may indicate an unsafe or adversarial
    spec when running spec validation:
    
    - Rule 1: an absolute local $ref (file://, Unix /abs, Windows C:\, UNC) is
      flagged when it escapes the spec's base path. Absolute refs that stay
      beneath the base path are legitimate (flatten/expand introduces such
      anchors for cyclical $refs) and are not flagged. Relative and
      fragment-only refs are exempt.
    - Rule 2: when remote (http/https or protocol-relative) $refs resolve to
      two or more distinct hosts, a single aggregate warning lists them. A
      single consistent remote host is not flagged.
    
    Findings are warnings only and do not affect validity. The check inspects
    refs as authored via analyzer.AllRefs(), before expansion.
    
    The go-openapi/spec path normalization helpers are unexported, so a minimal
    slash/drive-letter normalize and a lexical "beneath base" containment check
    are replicated locally (cleanRefPath, isBeneathBase, localBaseDir).
    
    Windows drive paths need care so the "beneath base" comparison holds across
    every form they can be authored in. All of: bare C:\ / C:/, the canonical
    file:///C:/ URL, and the (invalid but tolerated) hybrid file://C:/ form
    (whose drive letter parses into the URL host) normalize to the same drive
    path with no leading slash, matching the base derived from SpecFilePath.
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    fredbi and claude authored Jun 10, 2026
    Configuration menu
    Copy the full SHA
    84c917d View commit details
    Browse the repository at this point in the history
  2. test: stop executing the live remote-URL doc examples (#259)

    ExampleSpec_second and ExampleSpecValidator_Validate_url load a spec from
    http://petstore.swagger.io/v2/swagger.json, a live host that intermittently
    returns HTTP 403, making the suite flaky.
    
    Drop their "// Output:" directives so Go still compiles them (they remain in
    godoc with the real URL and cannot bit-rot) but no longer runs them under
    go test. The remote path exercises loads.JSONSpec + network rather than
    validate logic, which is already covered by the file-based examples and
    tests, so executed coverage is not lost. A note on each example explains why
    the directive is intentionally absent.
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    fredbi and claude authored Jun 10, 2026
    Configuration menu
    Copy the full SHA
    e5b5ca2 View commit details
    Browse the repository at this point in the history
  3. fix(race): read result validity before Merge redeems it to the pool (#…

    …260)
    
    validateRequiredDefinitions read red.IsValid() *after* res.Merge(red).
    Merge redeems a result whose wantsRedeemOnMerge is set (true for any
    pool-borrowed result) back into the process-global sync.Pool. Reading
    red after that point races with a concurrent Spec() goroutine borrowing
    the same *Result and calling cleared() on it.
    
    This surfaced as a rare data race under -race in Test_ParallelPool:
    
      Write at ... Result.cleared() <- resultsPool.BorrowResult()
      Previous read ... Result.IsValid() <- validateRequiredDefinitions
    
    Capture validity into a local before merging, matching the read-before-
    merge pattern used everywhere else (e.g. validateRequiredProperties,
    default/example validators).
    
    Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
    Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    fredbi and claude authored Jun 10, 2026
    Configuration menu
    Copy the full SHA
    799b897 View commit details
    Browse the repository at this point in the history
Loading
⌂ 换网址