diff --git a/APIs/schemas/constraints-schema.json b/APIs/schemas/constraints-schema.json index d43a11d..dfaa521 100644 --- a/APIs/schemas/constraints-schema.json +++ b/APIs/schemas/constraints-schema.json @@ -2,7 +2,8 @@ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Used to express the dynamic constraints on transport parameters. These constraints may be set and changed at run time. Parameters must also conform with constraints inferred from the specification. Every transport parameter must have an entry, even if it is only an empty object.", "title": "Constraints", - "anyOf": [{ + "anyOf": [ + { "type": "array", "items": { "$ref": "constraints-schema-rtp.json" @@ -19,6 +20,18 @@ "items": { "$ref": "constraints-schema-mqtt.json" } + }, + { + "type": "array", + "items": { + "description": "Any other definition for transports registered in the parameter register", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_]+$": { + "$ref": "constraint-schema.json#/definitions/constraint" + } + } + } } ] } diff --git a/APIs/schemas/receiver_transport_params.json b/APIs/schemas/receiver_transport_params.json index 3656ead..ebbef4b 100644 --- a/APIs/schemas/receiver_transport_params.json +++ b/APIs/schemas/receiver_transport_params.json @@ -2,7 +2,8 @@ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}).", "title": "Receiver Transport Parameters", - "anyOf": [{ + "anyOf": [ + { "type": "array", "items": { "$ref": "receiver_transport_params_rtp.json" @@ -25,6 +26,23 @@ "items": { "$ref": "receiver_transport_params_mqtt.json" } + }, + { + "type": "array", + "items": { + "description": "Any other definition for transports registered in the parameter register", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_]+$": { + "type": [ + "string", + "boolean", + "null", + "number" + ] + } + } + } } ] } diff --git a/APIs/schemas/sender_transport_params.json b/APIs/schemas/sender_transport_params.json index 226ba4b..dc993cd 100644 --- a/APIs/schemas/sender_transport_params.json +++ b/APIs/schemas/sender_transport_params.json @@ -2,7 +2,8 @@ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}).", "title": "Sender Transport Parameters", - "anyOf": [{ + "anyOf": [ + { "type": "array", "items": { "$ref": "sender_transport_params_rtp.json" @@ -25,6 +26,23 @@ "items": { "$ref": "sender_transport_params_mqtt.json" } + }, + { + "type": "array", + "items": { + "description": "Any other definition for transports registered in the parameter register", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_]+$": { + "type": [ + "string", + "boolean", + "null", + "number" + ] + } + } + } } ] } diff --git a/APIs/schemas/transporttype-response-schema.json b/APIs/schemas/transporttype-response-schema.json index 77ce38f..9c6cd36 100644 --- a/APIs/schemas/transporttype-response-schema.json +++ b/APIs/schemas/transporttype-response-schema.json @@ -3,14 +3,23 @@ "title": "Transport Type", "description": "Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed)", "type": "string", - "oneOf": [ + "anyOf": [ { - "enum": [ - "urn:x-nmos:transport:rtp", - "urn:x-nmos:transport:dash", - "urn:x-nmos:transport:websocket", - "urn:x-nmos:transport:mqtt" + "oneOf": [ + { + "enum": [ + "urn:x-nmos:transport:rtp", + "urn:x-nmos:transport:dash", + "urn:x-nmos:transport:websocket", + "urn:x-nmos:transport:mqtt" + ] + } ] + }, + { + "description": "Any transport registered in the parameter register", + "type": "string", + "pattern": "^urn:x-nmos:transport:[a-zA-Z0-9_]+$" } ], "format": "uri"