Skip to content

fix: resolve relative refs against a root BaseURL - #688

Merged
daveshanley merged 2 commits into
mainfrom
fix/asyncapi-followups
Nov 1, 2026
Merged

daveshanley merged 2 commits into
mainfrom
fix/asyncapi-followups

Conversation

@daveshanley

Copy link
Copy Markdown
Member

With a BaseURL at a host root (for example http://host), the base path is empty. filepath.Abs then fills in the local working directory, so a relative $ref can fail to resolve and the local path is sent to the remote server.

This roots an empty base path at /. Reproduced first with a failing test against a real HTTP server.

Go version unchanged.

🤖 Generated with Claude Code

An empty base path made filepath.Abs resolve refs against the working directory, so refs failed and the local path was sent to the remote server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ae1153a) to head (1c90e0b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #688   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          313       313           
  Lines        39557     39560    +3     
=========================================
+ Hits         39557     39560    +3     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Coverage is measured per package, so the root package test did not count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@daveshanley
daveshanley merged commit 285721f into main Nov 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant