{
    "oneOf": [
        {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        },
        {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "selfishness": {
                    "type": "integer"
                },
                "$class": {
                    "description": "Reference to the class to instantiate",
                    "const": "Cat"
                }
            },
            "required": [
                "name",
                "selfishness",
                "$class"
            ],
            "additionalProperties": false
        },
        {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "size": {
                    "type": "integer"
                },
                "$class": {
                    "description": "Reference to the class to instantiate",
                    "const": "Wolf"
                }
            },
            "required": [
                "name",
                "size",
                "$class"
            ],
            "additionalProperties": false
        },
        {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "selfishness": {
                    "type": "integer"
                },
                "cute": {
                    "type": "boolean"
                },
                "$class": {
                    "description": "Reference to the class to instantiate",
                    "const": "HouseCat"
                }
            },
            "required": [
                "name",
                "selfishness",
                "$class"
            ],
            "additionalProperties": false
        }
    ],
    "$schema": "https://json-schema.org/draft/2020-12/schema"
}