{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "description": "Reference of exchanges published",
    "id": "http://schemas.taskcluster.net/base/v1/exchanges-reference.json#",
    "properties": {
        "$schema": {
            "_format": "uri",
            "description": "Link to schema for this reference. That is a link to this very document. Typically used to identify what kind of reference this file is.",
            "title": "Schema Reference",
            "type": "string"
        },
        "description": {
            "description": "Description of set of exchanges in markdown",
            "type": "string"
        },
        "entries": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "description": {
                        "description": "Description (ie. documentation) for the exchange",
                        "type": "string"
                    },
                    "exchange": {
                        "description": "Exchange name on AMQP server, must be prefixed with `exchangePrefix` from this document.",
                        "type": "string"
                    },
                    "name": {
                        "description": "Name of exchange, this is a stable identifier for use in auto-generated client libraries",
                        "type": "string"
                    },
                    "routingKey": {
                        "items": {
                            "additionalProperties": false,
                            "properties": {
                                "constant": {
                                    "description": "Constant to be used for this field, cannot be overwritten, only present if applicable.",
                                    "type": "string"
                                },
                                "multipleWords": {
                                    "description": "True, if key may contain dots, which AMQP will consider as words. This determines if `#` or `*` should be used in client libraries",
                                    "type": "boolean"
                                },
                                "name": {
                                    "description": "Identifier usable in client libraries",
                                    "type": "string"
                                },
                                "required": {
                                    "description": "True, if the key is always present, if `false` the value `_` will be used in place when no appropriate value is available for the key.",
                                    "type": "boolean"
                                },
                                "summary": {
                                    "description": "Short description of key in markdown",
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "summary",
                                "multipleWords",
                                "required"
                            ],
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "schema": {
                        "_format": "uri",
                        "description": "JSON schema for messages posted on this exchange",
                        "type": "string"
                    },
                    "title": {
                        "description": "Title of exchange entry",
                        "type": "string"
                    },
                    "type": {
                        "description": "Type of entry, currently only `topic-exchange`.",
                        "enum": [
                            "topic-exchange"
                        ],
                        "type": "string"
                    }
                },
                "required": [
                    "type",
                    "exchange",
                    "name",
                    "title",
                    "description",
                    "routingKey",
                    "schema"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "exchangePrefix": {
            "description": "Prefix for all exchanges described in this document",
            "type": "string"
        },
        "title": {
            "description": "Title for set of exchanges in markdown",
            "type": "string"
        },
        "version": {
            "description": "Exchange reference version",
            "enum": [
                0,
                "0.2.0"
            ]
        }
    },
    "required": [
        "version",
        "$schema",
        "title",
        "description",
        "exchangePrefix",
        "entries"
    ],
    "title": "Exchange Reference File",
    "type": "object"
}