Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #121 from cloudaper/deprecated-$schema
Browse files Browse the repository at this point in the history
Update docs with deprecated version-less $schema
  • Loading branch information
mdboom committed Apr 12, 2020
2 parents cb0e85d + 4d9ba6d commit 861bd67
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/reference/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ It is recommended that all JSON Schemas have a ``$schema`` entry,
which must be at the root. Therefore most of the time, you'll want
this at the root of your schema::

"$schema": "http://json-schema.org/schema#"
"$schema": "http://json-schema.org/draft/2019-09/schema#"

Advanced
--------

If you need to declare that your schema was written against a specific version
of the JSON Schema standard, you should include the draft name in the path, for
You should declare that your schema was written against a specific version
of the JSON Schema standard and include the draft name in the path, for
example:

- ``http://json-schema.org/draft/2019-09/schema#``
- ``http://json-schema.org/draft-07/schema#``
- ``http://json-schema.org/draft-06/schema#``
- ``http://json-schema.org/draft-04/schema#``

The possibility to declare ``$schema`` without specific version (``http://json-schema.org/schema#``) was deprecated after Draft 4 and should no longer be used.

Additionally, if you have extended the JSON Schema language to include
your own custom keywords for validating values, you can use a custom
URI for ``$schema``. It must not be one of the predefined values
Expand Down

0 comments on commit 861bd67

Please sign in to comment.