Skip to content

feat: support relative URI resolution in $dynamicRef (#2928) (#2945)#2961

Merged
baywet merged 1 commit into
support/v2from
feat/external-dynamic-to-v2
Jul 15, 2026
Merged

feat: support relative URI resolution in $dynamicRef (#2928) (#2945)#2961
baywet merged 1 commit into
support/v2from
feat/external-dynamic-to-v2

Conversation

@baywet

@baywet baywet commented Jul 15, 2026

Copy link
Copy Markdown
Member

port of #2945 to v2

* feat: support relative URI resolution in $dynamicRef (#2928)

Set ExternalResource on non-fragment $dynamicRef references so the
workspace loader can discover and fetch external documents. Resolve
relative URIs against hostDocument.BaseUri in Target before calling
FindDocumentByBaseUri.

Tests:
- Fragment-only: ExternalResource is null
- Absolute URI: ExternalResource is set, resolves across documents
- Relative URI: ExternalResource is set, resolves against BaseUri across documents
- V31 and V32 coverage

* test: mirror V31 dynamic ref tests to V32 and fix workspace fallback

Adds 17 missing V32 test mirrors for full parity with V31 coverage.
Replaces dead '?? new OpenApiWorkspace()' fallback with null-forgiving
'!' in both V31 and V32 cross-document tests.

* fix: remove duplicate XML doc and use Uri.TryCreate for relative URI resolution

Addresses Copilot review feedback on #2945.
@baywet baywet requested a review from a team as a code owner July 15, 2026 16:20
@baywet baywet self-assigned this Jul 15, 2026
@baywet baywet enabled auto-merge July 15, 2026 16:20
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall coverage in the branch is 42%. The coverage in the branch is 89%.

Show a code coverage summary of the most impacted files.
File 821053b a8688dc +/-
/home/runner/wo...MapParameter.cs 100% 0% -100%
/home/runner/wo...Deserializer.cs 81% 0% -81%
/home/runner/wo...pyReferences.cs 63% 31% -32%
/home/runner/wo...piJsonReader.cs 100% 72% -28%
/home/runner/wo...Deserializer.cs 90% 62% -28%
/home/runner/wo...s/OpenApiTag.cs 100% 76% -24%
/home/runner/wo...Deserializer.cs 100% 81% -19%
/home/runner/wo...Deserializer.cs 96% 81% -15%
/home/runner/wo...Deserializer.cs 97% 89% -8%
/home/runner/wo...piComponents.cs 94% 87% -7%

Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@sonarqubecloud

Copy link
Copy Markdown

@baywet baywet merged commit 6091f5a into support/v2 Jul 15, 2026
17 checks passed
@baywet baywet deleted the feat/external-dynamic-to-v2 branch July 15, 2026 16:54
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.

3 participants