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

Clarify dependencies deprecation #444

Merged
merged 1 commit into from
Oct 18, 2017
Merged

Conversation

handrews
Copy link
Contributor

It is focused on the subschema form, not the string array form.

This addresses #442.

@handrews handrews added this to the draft-07 (wright-*-02) milestone Oct 15, 2017
misunderstood and seems to be rarely used. Depending on feedback
with "if", "then", and "else", this keyword may well be removed in a
future draft.
there is any benefit in keeping the schem form of dependencies. It is
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo 'schem'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Fixed.

It is focused on the subschema form, not the string array form.
@pipobscure
Copy link

I find the schema form very useful. Please let's not remove it. If anything let's remove the values form.

{ "foo": { "required": [ "bar" ] } }

isn't that much worse than

{ "foo": [ "bar" ] }

but replacing the schema version with a combination of allOf/anyOf/oneOf/if/then/else is much worse.

It's much clearer than if/then/else.

Side-jibe at if/then/else: These are a bad idea to begin with, but since they are not obligatory to use, I'm fine keeping them. One reason why they are bad is that they mutate JSON-Schema from a schema to a programming language.

@epoberezkin
Copy link
Member

epoberezkin commented Oct 18, 2017

@pipobscure I don't mind keeping both, although in this case it may be better to rename schema form as @handrews suggested, because "dependencies" really mean "properties that are required in case some property is present" (i.e., value form), not "an arbitrary schema to validate against" (which is better expressed with if/then implication).

Side-jibe at if/then/else: These are a bad idea to begin with, but since they are not obligatory to use, I'm fine keeping them. One reason why they are bad is that they mutate JSON-Schema from a schema to a programming language.

We had a long discussion and agreed that if/then/else is boolean implication (that can be expressed via and/or/not) rather than imperative construct. There are quite a few languages that use if/then/else syntax to mean the same as ternary in JS, and not a control flow statement.

@handrews
Copy link
Contributor Author

@pipobscure yes this objection (raised primarily by me) was covered in excessive detail in #180.
This warning will stay in, as the point is to have the warning in the published draft for comment, but your objection is noted on the issue.

@handrews
Copy link
Contributor Author

I'm going to merge this so that people who want to talk about why to remove or not remove dependencies will comment in the issue and not here. I'll leave the issue open though- I put it in the "future" milestone.

@handrews handrews merged commit bc82122 into json-schema-org:master Oct 18, 2017
@handrews handrews deleted the dep-dep branch October 18, 2017 17:58
@gregsdennis gregsdennis added clarification Items that need to be clarified in the specification and removed Type: Bug 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.

5 participants