{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "ZepyrusOutputSchema",
    "description": "Output JSON schema for Zepyrus.",
    "type": "object",
    "properties": {
        "version": {
            "type": "integer",
            "description": "Version number."
        },
        "locations": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "description": "Location information.",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "provide_resources": {
                        "description": "Mapping (resource -> value)",
                        "type": "object",
                        "additionalProperties": {
                            "description": "The arity of the required port.",
                            "type": "integer"
                        }
                    },
                    "repository": {
                        "type": "string"
                    },
                    "packages_installed": {
                        "type": "array",
                        "_uniqueItems": true,
                        "description": "Packages installed on the location.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cost": {
                        "type": "integer"
                    }
                },
                "required": [
                    "name",
                    "repository"
                ]
            }
        },
        "components": {
            "type": "array",
            "_uniqueItems": true,
            "description": "Deployed components.",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Name of the component (used as an id)."
                    },
                    "type": {
                        "type": "string",
                        "description": "Type of the component."
                    },
                    "state": {
                        "type": "string"
                    },
                    "location": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "type",
                    "state",
                    "location"
                ]
            }
        },
        "bindings": {
            "type": "array",
            "_uniqueItems": true,
            "description": "Bindings between components.",
            "items": {
                "type": "object",
                "properties": {
                    "port": {
                        "type": "string"
                    },
                    "requirer": {
                        "type": "string"
                    },
                    "provider": {
                        "type": "string"
                    }
                },
                "required": [
                    "port",
                    "requirer",
                    "provider"
                ]
            }
        }
    },
    "required": [
        "version"
    ]
}