json-schema-org/json-schema-spec

What is the $schema tag for the new 2019-09 draft?

sprotty opened this issue · 4 comments

Can I just confirm the identifier used for draft 2019-09, I've seen the a few variations, which is correct?

I'm assuming that its this one, although this breaks with the conventions used in the older drafts using https and having no empty fragment
https://json-schema.org/draft/2019-09/schema - seen here

I've seen this in a few places

And the http:// versions of both have cropped up in other resources.

Thanks

No hash (fragment). The spec says "MUST NOT have an empty fragment".
Our docs on the "understanding" site are not always the best up to date docs...
If you'd like to submit a pull request, please do so! =]

The specification documents are always the single source of truth.

Thanks, I think it should state somewhere in the standard what the ID is expected to be though. The only place its mentioned is in the samples in the appendixes.
And in https://json-schema.org/draft/2019-09/json-schema-validation.html#meta-schema it states its
The current URI for the default JSON Schema meta-schema is http://json-schema.org/draft/2019-09/schema.
Note http not https.

Well, that's not great...
We need people with a keen eye like yours to pick up on such things!
I think no one noticed, or we only updated it in the core spec, and not the validation spec, to https. Bummer.
It SHOULD be the https version in all cases.

@sprotty it's the HTTPS one, the HTTP ones are typos / places we missed.