{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
        "subject": {
            "oneOf": [
                {
                    "$ref": "#/definitions/first"
                },
                {
                    "$ref": "#/definitions/second"
                }
            ]
        }
    },
    "definitions": {
        "first": {
            "type": "object",
            "properties": {
                "discriminator": {
                    "const": "first"
                },
                "first": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "second": {
            "type": "object",
            "properties": {
                "discriminator": {
                    "const": "second"
                },
                "second": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        }
    }
}