JSON Schema Draft 2020-12 ID Error (Edit)

Each JSON Schema object MUST have a unique identifier, represented as a URL pointing to its location. The $id property in JSON Schema is used to establish the source of truth for any object being defined and validated.

JSON SchemaMetadataIdentifiers

Rule Definition

json-schema-2020-12-id-error.yaml
{"json-schema-2020-12-id-error":{"description":"Each JSON Schema object MUST have a unique identifier, represented as a URL pointing to its location. The $id property in JSON Schema is used to establish the source of truth for any object being defined and validated.","given":"$","severity":"error","then":{"field":"$id","function":"truthy"}}}

Back to All of the Rules