[
    {
        "description": "$id must be evaluated before $ref to get the proper $ref destination",
        "schema": {
            "$id": "/ref-and-id2/base.json",
            "allOf": [ { "$ref": "int.json" } ],
            "definitions": {
                "bigint": {
                    "$comment": "canonical uri: /ref-and-id2/int.json",
                    "$id": "int.json",
                    "maximum": 10
                },
                "smallint": {
                    "$comment": "canonical uri: /ref-and-id2-int.json",
                    "$id": "/ref-and-id2-int.json",
                    "maximum": 2
                }
            }
        },
        "tests": [
            {
                "description": "data is valid against first definition",
                "data": 5,
                "valid": true
            },
            {
                "description": "data is invalid against first definition",
                "data": 50,
                "valid": false
            }
        ]
    }
]