Skip to content

Use boolean true instead of {} where possible #495

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 1 commit into from
Nov 17, 2017

Conversation

handrews
Copy link
Contributor

Addresses #486 (sorry, @epoberezkin, I'm trying to nail down
as much as possible by end of day tomorrow/Friday, so can't
wait for your PR :-)

Let's emphasize the clarity of the boolean schemas as that is
why they were added.

Note that the default values of "definitions", "properties",
and "patternProperties" is an actual empty object, not an
empty schema, so those stay as they were.

We were using an explicit empty schema to emphasize/document
that a keyword accepts any possible value in several places,
but were not using it in a few others such as "items" within
the "enum" schema. Consistently make it explicit.

There were no empty object subschemas in the other meta-schemas.

I used ajv to validate the schema against itself, which worked fine.

Let's emphasize the clarity of the boolean schemas as that is
why they were added.

Note that the default values of "definitions", "properties",
and "patternProperties" is an actual empty object, not an
empty schema, so those stay as they were.

We were using an explicit empty schema to emphasize/document
that a keyword accepts any possible value in several places,
but were not using it in a few others such as "items" within
the "enum" schema.  Consistently make it explicit.

There were no empty object subschemas in the other meta-schemas.
@handrews handrews merged commit c179ebd into json-schema-org:master Nov 17, 2017
@handrews handrews deleted the bool-meta branch November 29, 2017 04:20
@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 validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants