JSON Schema Draft 2020-12 Schema Draft Error (Edit)

The $schema property in a JSON Schema MUST always reference the latest draft of the specification to ensure consistent validation across all objects. Using the most up-to-date version of the specification helps maintain stability and reliability in the use of objects within any API.

JSON SchemaMetadataChanges

Rule Definition

json-schema-2020-12-schema-draft-error.yaml
{"json-schema-2020-12-schema-draft-error":{"description":"The $schema property in a JSON Schema MUST always reference the latest draft of the specification to ensure consistent validation across all objects. Using the most up-to-date version of the specification helps maintain stability and reliability in the use of objects within any API.","given":"$","severity":"error","then":{"field":"$schema","function":"pattern","functionOptions":{"match":"https://json-schema.org/draft/2020-12/schema"}}}}

Back to All of the Rules