Skip to content

Deprecate URI of meta-schema without version #216

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

Closed
epoberezkin opened this issue Dec 29, 2016 · 10 comments
Closed

Deprecate URI of meta-schema without version #216

epoberezkin opened this issue Dec 29, 2016 · 10 comments
Labels
clarification Items that need to be clarified in the specification Priority: High
Milestone

Comments

@epoberezkin
Copy link
Member

epoberezkin commented Dec 29, 2016

Or at the very least prohibit/discourage using it in schemas.

Problem

@handrews wrote in #211 (review):

I did not want to put "additionalProperties": false in with "$ref" because that really is a big change, and some schemas out there (including the draft 4 hyper-schema meta-schema!) would suddenly become invalid.

At first I couldn't understand why would they suddenly become invalid when they have different meta-schema URI. And then I realised that there is a lot of schemas indeed that instead of using URI with version (that I always use) use a generic URI without version (which I never use myself). I only added support for this URI in Ajv after some user submitted PR...

That indeed presents a migration problem as there are many schemas that don't clearly indicate which version of the standard they are using and if, for example, we indeed drop boolean form of exclusiveMaximum without solving this problem, then all the schemas with boolean form of exclusive Maximum/Minimum that use a generic URI for $schema will become invalid.

Suggestion

  1. Stop updating schema at generic URI and have draft 4 schema there. Once draft 6 is published we can add in the description that this schema is deprecated and that instead another URI should be used.
  2. Only use URI with version for meta-schema going forward

Alternatively we can put a big note everywhere saying that schema at /schema uri MUST NOT be used in schemas, that it exists for information only to indicate what is the latest version. Maybe even make it a redirect to the latest version.

But I think it can be better to deprecate it and keep pointing to 4, to be honest...

If we used semver, updates between major versions would not have happened automatically, it would require user action. I don't think meta-schemas should automatically update when the new draft is released.

@handrews @awwright @Relequestual

@handrews
Copy link
Contributor

But I think it can be better to deprecate it and keep pointing to 4, to be honest...

I'm on board with this.

@handrews handrews added this to the draft-next (draft-6) milestone Dec 29, 2016
@awwright
Copy link
Member

The "latest" meta-schema URI was removed in draft-wright-json-schema-00, so I believe this is a website issue.

@epoberezkin
Copy link
Member Author

@awwright I see. Was it accidental or you think it is bad to have meta schema URI in the draft? If the latter, why do you think so?

@handrews
Copy link
Contributor

@awwright I see. Was it accidental or you think it is bad to have meta schema URI in the draft? If the latter, why do you think so?

He didn't remove the URI with the number in it. He just removed the "latest" URI. In other words, exactly what you are asking for here. Take a look at the files on master.

@epoberezkin
Copy link
Member Author

Indeed, here: https://github.com/json-schema-org/json-schema-spec/blob/master/jsonschema-validation.xml#L222

So essentially we need the meta for the current draft-06 (or whatever it will be called) published before I-D? I don't think it's good to point to some future updates as it is on master now.

@awwright
Copy link
Member

@epoberezkin It's not a completely settled question, but I think it makes sense to treat the meta-schema JSON document as informative, so we can publish it shortly after minting a new meta-schema URI if necessary.

@handrews
Copy link
Contributor

handrews commented Jan 5, 2017

@epoberezkin I just went through the current files on master and there is no reference to the non-numbered meta-schemas, so I'm closing this.

@awwright documented the release process for the meta-schema is described at https://github.com/json-schema-org/json-schema-spec/wiki so discussions belong there or in a new issue.

@handrews handrews closed this as completed Jan 5, 2017
@awwright
Copy link
Member

awwright commented Jan 5, 2017 via email

@epoberezkin
Copy link
Member Author

@awwright yes, thank you

@Relequestual
Copy link
Member

SO GLAD this was done.

@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 Priority: High
Projects
None yet
Development

No branches or pull requests

5 participants