[
    {
        "description": "invalid syntax for $id and $anchor",
        "comment": "I don't think these are valid tests -- the metaschema should be able to pick up on the bad anchor at the very least, even if the bad id slips past if we don't have format validation turned on for uris",
        "schema": {
            "$id": "foo.json",
            "$defs": {
                "bad_id": {
                    "$id": "foo.json#/foo/bar"
                },
                "bad_anchor": {
                    "$anchor": "my$foo"
                }
            },
            "if": { "const": "skip errors" },
            "then": true,
            "else" : {
                "if": { "const": "check id" },
                "then": { "$ref": "foo.json#/$defs/bad_id" },
                "else": {
                    "if": { "const": "check anchor" },
                    "then": { "$ref": "#/$defs/bad_anchor" }
                }
            }
        },
        "tests": [
            {
                "description": "skip all bad identifiers for a valid result",
                "data": "skip errors",
                "valid": true
            },
            {
                "description": "bad $anchor should be found and removed",
                "data": "check anchor",
                "valid": false
            },
            {
                "description": "bad $id should be found and removed",
                "data": "check id",
                "valid": false
            }
        ]
    }
]