[
    {
        "description": "non-schema object containing an $id property",
        "schema": {
            "definitions": {
                "const_not_id": {
                    "const": {
                        "$id": "not_a_real_id"
                    }
                }
            },
            "if": {
                "const": "skip not_a_real_id"
            },
            "then": true,
            "else" : {
                "$ref": "#/definitions/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": "non-schema object containing an anchor property",
        "schema": {
            "definitions": {
                "const_not_anchor": {
                    "const": {
                        "$id": "#not_a_real_anchor"
                    }
                }
            },
            "if": {
                "const": "skip not_a_real_anchor"
            },
            "then": true,
            "else" : {
                "$ref": "#/definitions/const_not_anchor"
            }
        },
        "tests": [
            {
                "description": "skip traversing definition for a valid result",
                "data": "skip not_a_real_anchor",
                "valid": true
            },
            {
                "description": "const at const_not_anchor 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
            }
        ]
    },
    {
        "description": "bad anchor syntax",
        "schema": {
            "$id": "#!!hello~"
        },
        "tests": [
            {
                "description": "draft7 $id passes through to $anchor",
                "data": "foo",
                "valid": false
            }
        ]
    }
]