{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Product Compound elements.",
    "description": "A compound element",
    "type": "object",
    "properties": {
        "href": {
            "description": "Link to self.",
            "type": "string",
            "required": true,
            "format": "uri"
        },
        "id": {
            "description": "Compound element Id.",
            "type": "integer",
            "required": true
        },
        "product_id": {
            "description": "Product Id where entity is compound.",
            "type": "integer",
            "required": true
        },
        "title": {
            "description": "Compound element title.",
            "type": "string",
            "required": true,
            "maxlength": 255
        },
        "required": {
            "description": "Is it required to select an item from this element",
            "type": "boolean",
            "required": true
        },
        "multiselect": {
            "description": "Is it possible to select more than one item from this element",
            "type": "boolean",
            "required": true
        },
        "minimum": {
            "description": "Compound element minimum required items.",
            "type": "integer",
            "required": true,
            "minimum": 0
        },
        "maximum": {
            "description": "Compound element maximum allowed items.",
            "type": "integer",
            "required": true,
            "minimum": 0
        },
        "view": {
            "description": "Compound element view type.",
            "type": "string",
            "enum": [
                "LIST",
                "BLOCK"
            ],
            "required": true
        },
        "position": {
            "description": "Compound element position.",
            "type": "integer",
            "required": true
        },
        "parent": {
            "description": "Parent resource of this resource.",
            "type": "object",
            "properties": {
                "href": {
                    "description": "Link to product.",
                    "type": "string",
                    "required": true,
                    "format": "uri"
                }
            },
            "additionalProperties": false,
            "required": true
        },
        "items": {
            "description": "Product compound element items.",
            "type": "object",
            "properties": {
                "href": {
                    "description": "Link to collection of compound element items.",
                    "type": "string",
                    "required": true,
                    "format": "uri"
                },
                "collection": {
                    "required": true,
                    "additionalProperties": false,
                    "type": "array",
                    "description": "Array with collection items.",
                    "items": [
                        {
                            "$ref": "/API/Schema/vnd.verto.webshop.resource.productcompoundelementitems.v1.json",
                            "title": "Single product compound element item."
                        }
                    ]
                }
            },
            "additionalProperties": false,
            "required": true
        }
    },
    "additionalProperties": false
}
