Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clarify how to use "contentSchema" #1352

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
handrews merged 1 commit into json-schema-org:main from handrews:contents
Dec 6, 2022
Merged

Conversation

@handrews
Copy link
Contributor

@handrews handrews commented Nov 21, 2022
edited
Loading

[note: The fix is shorter than this description]

The value of "contentSchema" is a normal subschema, and using it out of context can fail in ways schema users are unlikely to automatically consider. Since "contentSchema" has to be applied separately from the evaluation process in which it was collected as an annotation, it is schema authors and users (rather than implementers) who need to be aware of this. In particular, users need to know the safe way to access the schema.

We know that many schema users find base URIs/IRIs confusing, and that the behavior of implementations in the absence of "$schema" is inconsistent. Without delving into those topics (which are addressed in core, or in RFC 3986), this clarification shows how to use "contentSchema" as a normal subschema from an annotation.

It also explains the circumstances under which the extracted annotation value is safe to use. The language attempts to balance the likelihood that readers will not be familiar enough with the restrictions to note this on their own with the desire to minimize re-stating schema processing rules documented in the core specification. This should be enough to encourage readers to check the relevant core specification sections.

We know that many schema users find base URIs/IRIs confusing, and
that the behavior of implementations in the absence of "$schema"
is inconsistent. Without delving into those topics (which are
addressed in core, or in RFC 3986), this clarification shows how
to use "contentSchema" as a normal subschema from an annotation.
It also explains the circumstances under which the extracted
annotation value is safe to use. The language attempts to balance
the likelihood that readers will not be familiar enough with
the restrictions to note this on their own with the desire to
minimize re-stating schema processing rules documented in the core
specification. This should be enough to encourage readers to
check the relevant core specification sections.
@handrews handrews added this to the draft-next milestone Nov 21, 2022
@handrews handrews marked this pull request as ready for review November 21, 2022 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jdesrosiers jdesrosiers jdesrosiers approved these changes

Assignees

No one assigned

Labels

clarification Items that need to be clarified in the specification

Projects

None yet

Milestone

draft-next

Development

Successfully merging this pull request may close these issues.

Should "contentSchema" have schema location behavior? Clarify the handling of "contentSchema"

AltStyle によって変換されたページ (->オリジナル) /