[ { "description": "non-schema object containing an $id property", "schema": { "$defs": { "const_not_id": { "const": { "$id": "not_a_real_id" } } }, "if": { "const": "skip not_a_real_id" }, "then": true, "else" : { "$ref": "#/$defs/const_not_id" } }, "tests": [ { "description": "skip traversing definition for a valid result", "data": "skip not_a_real_id", "valid": true }, { "description": "const at const_not_id does not match", "data": 1, "valid": false } ] }, { "description": "'' not permitted as $id", "schema": { "$id": "", "type": "string" }, "tests": [ { "description": "schema would pass without $id", "data": "foo", "valid": false }, { "description": "schema would fail even without $id", "data": 1, "valid": false } ] }, { "description": "'#' not permitted as $id", "schema": { "$id": "#", "type": "string" }, "tests": [ { "description": "schema would pass without $id", "data": "foo", "valid": false }, { "description": "schema would fail even without $id", "data": 1, "valid": false } ] } ]