{
    "$id": "https://api.comnorm.com/schemas/additional-property-info.schema.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Additional Property Info",
    "description": "Zusätzliche Eigenschaftsinformation einer Konfiguration",
    "type": "object",
    "required": [
        "propertyId",
        "type",
        "value"
    ],
    "properties": {
        "propertyId": {
            "description": "ID der zusätzlichen Eigenschaft",
            "type": "string",
            "minLength": 1,
            "maxLength": 36
        },
        "type": {
            "description": "Datentyp der zusätzlichen Eigenschaft",
            "oneOf": [
                {
                    "const": "number"
                },
                {
                    "const": "string"
                },
                {
                    "$ref": "https://api.comnorm.com/schemas/dimension-definition.schema.json"
                }
            ]
        },
        "value": {
            "description": "Wert der zusätzlichen Eigenschaft",
            "oneOf": [
                {
                    "type": "number"
                },
                {
                    "type": "string"
                },
                {
                    "$ref": "https://api.comnorm.com/schemas/dimension-info.schema.json"
                }
            ]
        }
    },
    "allOf": [
        {
            "if": {
                "properties": {
                    "type": {
                        "const": "number"
                    }
                }
            },
            "then": {
                "properties": {
                    "value": {
                        "type": "number"
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "type": {
                        "const": "string"
                    }
                }
            },
            "then": {
                "properties": {
                    "value": {
                        "type": "string"
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "type": {
                        "$ref": "https://api.comnorm.com/schemas/dimension-definition.schema.json"
                    }
                }
            },
            "then": {
                "properties": {
                    "value": {
                        "$ref": "https://api.comnorm.com/schemas/dimension-info.schema.json"
                    }
                }
            }
        }
    ]
}
