-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
File URIs with pointer fragments #665
Comments
Sounds good to me, though I don't think we can represent that here at the minute, even in optional, as we don't have a way of assigning arbitrary URIs in the "core" test suite. (This is similar to why we don't have remote |
Can we not just add |
Oh I see, yes that definitely is a thing we can do. For some reason I assumed this was about retrieval URIs. +1 |
Is it really correct that If fragments weren't allowed in |
It might just be a .Net thing. I don't know. Regardless, since at least one environment doesn't allow it (or at least treats them weirdly), it seems prudent to have a test to ensure they're supported. |
RFC 3986 URI Generic Syntax appears to imply that a scheme specification (e.g.
However, RFC 8089 The "file" URI Scheme So the test case is indeed sensible. |
I'm not sure if this is a universal thing, but .Net apparently doesn't allow fragments for
file://
URIs. It seems to URI-encode the#
into the file name, making extracting a fragment difficult.Ref: json-everything/json-everything#427
Is this something that we should have a test for?
Edit:
For a bit more information, my implementation combines the base URI with the
$ref
URI to get the full URI to resolve.With a base URI of
file:///c:/folder/file.json
and a$ref
of#/definitions/foo
, that combining step (which uses .Net code, not mine) results infile:///c:/folder/%23/definitions/foo
instead offile:///c:/folder/file.json#/definitions/foo
; thefile.json
is replaced by the encoded#
(%23
) and it's now looking for a new file and fails to resolve.The text was updated successfully, but these errors were encountered: