fix: resolve JSON Schema $ref URIs against $id base URIs#1135
fix: resolve JSON Schema $ref URIs against $id base URIs#1135Shyam-Raghuwanshi wants to merge 1 commit into
Conversation
|
|
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |



Description
Per JSON Schema draft-07 (Section 8.2), the $id keyword defines a base URI
that other URI references within the schema are resolved against. The
underlying Spectral resolver (@stoplight/json-ref-resolver) does not follow
this specification behavior.
This commit adds a pre-processing step that walks the parsed document before
Spectral resolution, tracking $id base URIs, and rewrites relative $ref
values to resolve against the correct $id base URI using RFC 3986 semantics.
YAML source ranges for diagnostics)
arrays, edge cases, and AsyncAPI v2/v3 document structures
Closes #403