Skip to content

Restructure vocabulary-related sections #772

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 2 commits into from
Aug 9, 2019

Conversation

handrews
Copy link
Contributor

@handrews handrews commented Aug 1, 2019

Attempt to make this more understandable by removing
some duplication, putting things in the right order,
and explaning certain things more clearly. Hopefully.

It might be easier to just download and build this to review.

Attempt to make this more understandable by removing
some duplication, putting things in the right order,
and explaning certain things more clearly.  Hopefully.
<t>
Meta-schema authoring is an advanced usage of JSON Schema, so the design of
meta-schema features emphasizes flexibility over simplicity.
how to interpret a schema. Every schema has a meta-schema, typically identified
Copy link
Member

@gregsdennis gregsdennis Aug 1, 2019

Choose a reason for hiding this comment

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

Every schema has a meta-schema.

Later you say "If absent from the root schema, the resulting behavior is implementation-defined." I realize they don't technically conflict, but it might be nice to have something to the effect of "even if it's not explicitly defined by the $schema keyword" rather that the casual "typically defined by..."

It might also be good to say something about having a convention that the meta-schema's $id is defined by the associated vocabulary.

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.

Mostly good. Just a couple notes on a single sentence.

<t>
A schema vocabulary, or simply a vocabulary, is a set of keywords,
their syntax, and their semantics. A vocabulary is generally organized
around a particular purpose. Different uses of JSON Schema will
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we add examples here? Validation, UI generation, etc.

Vocabularies are the primary unit of re-use in JSON Schema, as schema
authors can indicate what vocabularies are required or optional in
order to process the schema. While keywords can be supported outside
of any vocabulary, there is no analogous mechanism to indicate individual
Copy link
Collaborator

Choose a reason for hiding this comment

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

While arbitrary extra keywords are allowed in JSON Schema, vocabularies are how we can define their meaning in a portable way, which other tooling can then start to support.

Or something.

Copy link
Collaborator

@philsturgeon philsturgeon left a comment

Choose a reason for hiding this comment

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

Some small tweaks could be made but nothing that I would consider blocking. This reads well and makes more sense. :)

@handrews
Copy link
Contributor Author

handrews commented Aug 9, 2019

@philsturgeon @gregsdennis I made some updates based on your feedback. How is this?

@handrews
Copy link
Contributor Author

handrews commented Aug 9, 2019

Since @philsturgeon said nothing was blocking and I need to post a PR that builds on this I'm going to go ahead and merge with @gregsdennis's approval. Phil, let me know if I messed anything up and I'll fix it in the next PR.

@handrews handrews merged commit 728017a into json-schema-org:master Aug 9, 2019
@handrews handrews deleted the vocab-again branch August 9, 2019 22:36
@gregsdennis gregsdennis added clarification Items that need to be clarified in the specification and removed Type: Maintenance labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Items that need to be clarified in the specification core
Development

Successfully merging this pull request may close these issues.

3 participants