Skip to content

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

Open
aqeelat wants to merge 2 commits into
microsoft:mainfrom
aqeelat:feat/dynamicref-relative-uris
Open

feat: support relative URI resolution in $dynamicRef (#2928)#2945
aqeelat wants to merge 2 commits into
microsoft:mainfrom
aqeelat:feat/dynamicref-relative-uris

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves #2928.

Extends cross-document $dynamicRef resolution to support relative URIs (e.g. external.yaml#node). Previously only absolute URIs worked.

Changes

  • Deserializers (V31+V32): Set ExternalResource on non-fragment $dynamicRef references so the workspace loader can discover and fetch external documents automatically.
  • OpenApiWorkspace.ResolveDynamicRef: Resolve relative URIs against the host document BaseUri before calling FindDocumentByBaseUri.
  • Tests: 17 missing V32 test mirrors added for full parity with V31. Fixed dead fallback in cross-document tests.

Depends on

#2913 (merged in eacc2fc0)

aqeelat added 2 commits July 14, 2026 15:22
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
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.
@aqeelat aqeelat requested a review from a team as a code owner July 14, 2026 14:52
@aqeelat

aqeelat commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@baywet the actual change is in the first commit. the second commit is just mirroring the tests between V31 and V32

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.

Support relative URI resolution in $dynamicRef

1 participant