{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://www.omg.org/spec/DDS-JSON/20190601/dds-json_domains.schema.json",
    "title": "DDS-JSON: Building Block Domains",
    "description": "This schema defines syntax used to represent DDS Domains in JSON. Domains provide a data space where information can be shared by reading and writing a set of Topics, which are associated to registered data types.",
    "definitions": {
        "topic": {
            "type": "object",
            "properties": {
                "name": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementName"
                },
                "register_type_ref": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementNameReference"
                },
                "topic_qos": {
                    "$ref": "dds-json_qos.schema.json#/definitions/topicQos"
                }
            },
            "required": [
                "name",
                "register_type_ref"
            ],
            "additionalProperties": false
        },
        "registerType": {
            "type": "object",
            "properties": {
                "name": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementName"
                },
                "type_ref": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementNameReference"
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        },
        "domain": {
            "type": "object",
            "properties": {
                "name": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementName"
                },
                "domain_id": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                },
                "topics": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/topic"
                    },
                    "additionalItems": false
                },
                "register_types": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/registerType"
                    },
                    "additionalItems": false
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        },
        "domainLibrary": {
            "type": "object",
            "properties": {
                "name": {
                    "$ref": "dds-json_qos.schema.json#/definitions/elementName"
                },
                "domains": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/domain"
                    },
                    "additionalItems": false
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        }
    },
    "type": "object",
    "properties": {
        "domain_library": {
            "$ref": "#/definitions/domainLibrary"
        }
    },
    "additionalProperties": false
}