-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
$dynamicRef
behavior when there is no URI with the same fragment in the dynamic scope
#1151
Comments
The first step is resolving the $dynamicRef just like $ref -- |
In this case, the wording looks a little confusing.
This part looks like we assume that there MUST be a corresponding schema in the dynamic scope. |
No, because there is an "if... otherwise..." ? If you can think of a way to make this clear, please let us know! It's one of the most confusing parts of the spec for sure. |
I spent some time figuring out how to make it clear and realized that it's tough to do without making it wordy. My suggestion is to replace the "Otherwise ..." part with something like:
@karenetheridge, what do you think about this option? Maybe it looks clearer only for me :) |
The language in question was removed in #1139. |
https://json-schema.org/draft/2020-12/json-schema-core.html#dynamic-ref
In this example, the initially resolved starting point URI of
$dynamicRef
includes a fragment that was created by the$dynamicAnchor
, but when we try to find "the outermost schema resource in the dynamic scope that defines an identically named fragment with$dynamicAnchor
", we are not able to find anything.What should an implementation do in this situation? Should behavior be identical to
$ref
, or maybe it's undefined behavior, and implementation could raise an error?The text was updated successfully, but these errors were encountered: