{
    "$schema": "http://json-schema.org/schema#",
    "$id": "https://ris-live.ripe.net/schemas/v1/ris_message-OPEN.schema.json",
    "type": "object",
    "examples": [
	{
	    "timestamp": 1568365292.84,
	    "peer": "192.0.2.1",
	    "peer_asn": "64496",
	    "id": "00-192-0-2-0-180513",
	    "host": "rrc00",
	    "type": "OPEN",
	    "direction": "sent",
	    "version": 4,
	    "asn": 65536,
	    "hold_time": 180,
	    "router_id": "192.0.3.1",
	    "capabilities": {"1":{"name":"multiprotocol","families":["ipv4/unicast","ipv6/unicast"]},"65":{"name":"asn4","asn4":65536}}
	}        
    ],
    "required": ["type", "direction", "version", "asn", "hold_time", "router_id", "capabilities"],
    "properties": {
        "type": {
            "const": "OPEN",
            "type": "string"
        },
        "direction": {
            "type": "string",
            "enum": [
                "sent",
                "received"
            ]
        },
        "version": {
            "type": "integer",
            "enum": [
                4,
                6
            ]
        },
        "asn": {
            "type": "integer"
        },
        "hold_time": {
            "type": "integer"
        },
        "router_id": {
            "type": "string"
        },
        "capabilities": {
            "type": "object",
            "additionalProperties": false,
            "patternProperties": {
                "^[0-9]+$": {
                    "additionalProperties": true,
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    },
    "title": "BGP OPEN Message"
}
