Skip to content
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

Include fragment in schemaLocation #671

Merged
merged 1 commit into from
May 11, 2023

Conversation

marksparkza
Copy link
Contributor

@marksparkza marksparkza requested a review from a team as a code owner April 22, 2023 21:18
Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

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

The fragment isn't necessary when you're looking at the root. Given that they're URIs, they should be considered equivalent. That line you linked to it's more informative (no MUST retirement).

I realize that for the test, however, it's checking a string value against a string value. Not sure what to do here.

@marksparkza
Copy link
Contributor Author

I should probably have referenced this clause, which does say MUST.

The fragment isn't necessary to identify/resolve the root, but I don't think there's any reason not to mandate that it must be present in "schemaLocation". It ensures consistency across implementations, and it's also simpler to specify - "there must be a fragment" as opposed to "there must be a fragment unless it's the root in which case there may be a fragment"...

@Julian
Copy link
Member

Julian commented May 11, 2023

Merging since the spec seems clear this is correct (and wasn't previously correct) but if someone has some reason to disagree, follow up after.

@Julian Julian merged commit ab4bd01 into json-schema-org:main May 11, 2023
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.

3 participants