Skip to content

Add tests for refs into schemas with file:// URI $id #666

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

Merged
merged 4 commits into from
Apr 5, 2023

Conversation

gregsdennis
Copy link
Member

Resolves #665

These all pass on my implementation (after the json-everything/json-everything#427 fix).

@gregsdennis gregsdennis requested a review from a team as a code owner April 5, 2023 21:35
Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works with my implementation. Just one thing I'd like to see improved (comment inline).

{
"description": "$id with file URI still resolves pointers - *nix",
"schema": {
"$id": "file://folder/file.json",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "path" part needs to start with a slash. Otherwise "folder" would be interpreted as a domain part rather than part of the path. It's technically a valid URI, it just doesn't mean what was intended.

Suggested change
"$id": "file://folder/file.json",
"$id": "file:///folder/file.json",

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always wondered what that third slash was for. Blank domain.

https://youtu.be/m6IjiZjyuLg

@gregsdennis gregsdennis requested a review from jdesrosiers April 5, 2023 22:50
@gregsdennis gregsdennis merged commit 987a4c8 into main Apr 5, 2023
@gregsdennis gregsdennis deleted the gregsdennis/file-refs branch April 5, 2023 23:07
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.

File URIs with pointer fragments
2 participants