-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base URI of external files? (more $id and $anchor fun with $ref resolution) #2159
Comments
What does document mean? That is the question. |
For |
@MikeRalphson I agree, and I can work on that. It will be a separate PR. Should it also be a separate issue? I'd say yes if there needs to be discussion on it. |
@darrelmiller was I supposed to wait on another PR closing for this? I remember that coming up on the call but for some reason I didn't make a note of it. |
@handrews In the TSC call today we (or some of us) believe that this was resolved in the changes that were made in the relative references text in 3.1. To summarize, relative references are resolved either based on $Id or the location of the resource. |
@darrelmiller that sounds good. My recollection is that folks understood that having a |
I never got an answer to this question from #2092 (
$id
scope resolution):Regarding
$id
and particularly$anchor
, this also impacts how something like{"$ref": "#foo"}
is resolved. In the main file you might have:In this example, the
someFoo
property of thebarSchema
schema references thefooSchema
schema using the fragment created by$anchor
. That fragment is attached to the base URI for the overall OAS file, so the same question about#/components/schemas/fooSchema
from a separate file exists for#foo
from a separate file.@OAI/tsc
The text was updated successfully, but these errors were encountered: