{
    "additionalProperties": false,
    "definitions": {
        "constraints": {
            "service": {
                "anyOf": [
                    {
                        "required": [
                            "build"
                        ]
                    },
                    {
                        "required": [
                            "image"
                        ]
                    }
                ],
                "id": "#/definitions/constraints/service",
                "properties": {
                    "build": {
                        "required": [
                            "context"
                        ]
                    }
                }
            }
        },
        "healthcheck": {
            "additionalProperties": false,
            "id": "#/definitions/healthcheck",
            "properties": {
                "disable": {
                    "type": "boolean"
                },
                "interval": {
                    "type": "string"
                },
                "retries": {
                    "type": "number"
                },
                "test": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "timeout": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "list_of_strings": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "list_or_dict": {
            "oneOf": [
                {
                    "additionalProperties": false,
                    "patternProperties": {
                        ".+": {
                            "type": [
                                "string",
                                "number",
                                "null"
                            ]
                        }
                    },
                    "type": "object"
                },
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                }
            ]
        },
        "network": {
            "additionalProperties": false,
            "id": "#/definitions/network",
            "properties": {
                "driver": {
                    "type": "string"
                },
                "driver_opts": {
                    "patternProperties": {
                        "^.+$": {
                            "type": [
                                "string",
                                "number"
                            ]
                        }
                    },
                    "type": "object"
                },
                "enable_ipv6": {
                    "type": "boolean"
                },
                "external": {
                    "additionalProperties": false,
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    },
                    "type": [
                        "boolean",
                        "object"
                    ]
                },
                "internal": {
                    "type": "boolean"
                },
                "ipam": {
                    "additionalProperties": false,
                    "properties": {
                        "config": {
                            "type": "array"
                        },
                        "driver": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "labels": {
                    "$ref": "#/definitions/list_or_dict"
                }
            },
            "type": "object"
        },
        "service": {
            "additionalProperties": false,
            "dependencies": {
                "memswap_limit": [
                    "mem_limit"
                ]
            },
            "id": "#/definitions/service",
            "properties": {
                "build": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "args": {
                                    "$ref": "#/definitions/list_or_dict"
                                },
                                "context": {
                                    "type": "string"
                                },
                                "dockerfile": {
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "cap_add": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "cap_drop": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "cgroup_parent": {
                    "type": "string"
                },
                "command": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "compote": {
                    "additionalProperties": false,
                    "properties": {
                        "commands": {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "minLength": 1,
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "extends": {
                            "oneOf": [
                                {
                                    "$ref": "#/definitions/string_or_list"
                                },
                                {
                                    "additionalProperties": false,
                                    "patternProperties": {
                                        "^.+$": {
                                            "oneOf": [
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "additionalProperties": false,
                                                    "properties": {
                                                        "except": {
                                                            "$ref": "#/definitions/string_or_list"
                                                        },
                                                        "only": {
                                                            "$ref": "#/definitions/string_or_list"
                                                        }
                                                    },
                                                    "type": "object"
                                                }
                                            ]
                                        }
                                    },
                                    "type": "object"
                                }
                            ]
                        },
                        "networks": {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "$ref": "#/definitions/network"
                                }
                            },
                            "type": "object"
                        },
                        "volumes": {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "$ref": "#/definitions/volume"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "type": "object"
                },
                "container_name": {
                    "type": "string"
                },
                "cpu_quota": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpu_shares": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpuset": {
                    "type": "string"
                },
                "depends_on": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/list_of_strings"
                        },
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "additionalProperties": false,
                                    "properties": {
                                        "condition": {
                                            "enum": [
                                                "service_started",
                                                "service_healthy"
                                            ],
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "condition"
                                    ],
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "devices": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "dns": {
                    "$ref": "#/definitions/string_or_list"
                },
                "dns_opt": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "dns_search": {
                    "$ref": "#/definitions/string_or_list"
                },
                "domainname": {
                    "type": "string"
                },
                "entrypoint": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "env_file": {
                    "$ref": "#/definitions/string_or_list"
                },
                "environment": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "expose": {
                    "items": {
                        "format": "expose",
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "extends": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "file": {
                                    "type": "string"
                                },
                                "service": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "service"
                            ],
                            "type": "object"
                        }
                    ]
                },
                "external_links": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "extra_hosts": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "group_add": {
                    "items": {
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "healthcheck": {
                    "$ref": "#/definitions/healthcheck"
                },
                "hostname": {
                    "type": "string"
                },
                "image": {
                    "type": "string"
                },
                "ipc": {
                    "type": "string"
                },
                "isolation": {
                    "type": "string"
                },
                "labels": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "links": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "logging": {
                    "additionalProperties": false,
                    "properties": {
                        "driver": {
                            "type": "string"
                        },
                        "options": {
                            "type": "object"
                        }
                    },
                    "type": "object"
                },
                "mac_address": {
                    "type": "string"
                },
                "mem_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "mem_reservation": {
                    "type": [
                        "string",
                        "integer"
                    ]
                },
                "mem_swappiness": {
                    "type": "integer"
                },
                "memswap_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "network_mode": {
                    "type": "string"
                },
                "networks": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/list_of_strings"
                        },
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "oneOf": [
                                        {
                                            "additionalProperties": false,
                                            "properties": {
                                                "aliases": {
                                                    "$ref": "#/definitions/list_of_strings"
                                                },
                                                "ipv4_address": {
                                                    "type": "string"
                                                },
                                                "ipv6_address": {
                                                    "type": "string"
                                                },
                                                "link_local_ips": {
                                                    "$ref": "#/definitions/list_of_strings"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "oom_score_adj": {
                    "maximum": 1000,
                    "minimum": -1000,
                    "type": "integer"
                },
                "pid": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "pids_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "ports": {
                    "items": {
                        "format": "ports",
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "privileged": {
                    "type": "boolean"
                },
                "read_only": {
                    "type": "boolean"
                },
                "restart": {
                    "type": "string"
                },
                "security_opt": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "shm_size": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "stdin_open": {
                    "type": "boolean"
                },
                "stop_grace_period": {
                    "_format": "duration",
                    "type": "string"
                },
                "stop_signal": {
                    "type": "string"
                },
                "sysctls": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "tmpfs": {
                    "$ref": "#/definitions/string_or_list"
                },
                "tty": {
                    "type": "boolean"
                },
                "ulimits": {
                    "patternProperties": {
                        "^[a-z]+$": {
                            "oneOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "additionalProperties": false,
                                    "properties": {
                                        "hard": {
                                            "type": "integer"
                                        },
                                        "soft": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "soft",
                                        "hard"
                                    ],
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "type": "object"
                },
                "user": {
                    "type": "string"
                },
                "userns_mode": {
                    "type": "string"
                },
                "volume_driver": {
                    "type": "string"
                },
                "volumes": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "volumes_from": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "working_dir": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "string_or_list": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "$ref": "#/definitions/list_of_strings"
                }
            ]
        },
        "volume": {
            "additionalProperties": false,
            "id": "#/definitions/volume",
            "properties": {
                "driver": {
                    "type": "string"
                },
                "driver_opts": {
                    "patternProperties": {
                        "^.+$": {
                            "type": [
                                "string",
                                "number"
                            ]
                        }
                    },
                    "type": "object"
                },
                "external": {
                    "additionalProperties": false,
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    },
                    "type": [
                        "boolean",
                        "object"
                    ]
                },
                "labels": {
                    "$ref": "#/definitions/list_or_dict"
                }
            },
            "type": [
                "object",
                "null"
            ]
        }
    },
    "properties": {
        "compote": {
            "additionalProperties": false,
            "properties": {
                "commands": {
                    "additionalProperties": false,
                    "patternProperties": {
                        "^[a-zA-Z0-9._-]+$": {
                            "minLength": 1,
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "env_file": {
                    "$ref": "#/definitions/string_or_list"
                },
                "environment": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "extends": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/string_or_list"
                        },
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^.+$": {
                                    "oneOf": [
                                        {
                                            "type": "null"
                                        },
                                        {
                                            "additionalProperties": false,
                                            "properties": {
                                                "except": {
                                                    "$ref": "#/definitions/string_or_list"
                                                },
                                                "only": {
                                                    "$ref": "#/definitions/string_or_list"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    ]
                }
            },
            "type": "object"
        },
        "networks": {
            "additionalProperties": false,
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/network"
                }
            },
            "type": "object"
        },
        "services": {
            "additionalProperties": false,
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/service"
                }
            },
            "type": "object"
        },
        "version": {
            "enum": [
                "2.1"
            ],
            "type": "string"
        },
        "volumes": {
            "additionalProperties": false,
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/volume"
                }
            },
            "type": "object"
        }
    },
    "type": "object"
}