diff --git a/bindings/amqp/0.3.0/channel.json b/bindings/amqp/0.3.0/channel.json new file mode 100644 index 00000000..383cd691 --- /dev/null +++ b/bindings/amqp/0.3.0/channel.json @@ -0,0 +1,136 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json", + "title": "AMQP channel bindings object", + "description": "This object contains information about the channel representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "is": { + "type": "string", + "enum": ["queue", "routingKey"], + "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." + }, + "exchange": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the exchange. It MUST NOT exceed 255 characters long." + }, + "type": { + "type": "string", + "enum": ["topic", "direct", "fanout", "default", "headers"], + "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." + }, + "durable": { + "type": "boolean", + "description": "Whether the exchange should survive broker restarts or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the exchange should be deleted when the last queue is unbound from it." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the exchange. Defaults to '/'." + } + }, + "description": "When is=routingKey, this object defines the exchange properties." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "description": "The name of the queue. It MUST NOT exceed 255 characters long." + }, + "durable": { + "type": "boolean", + "description": "Whether the queue should survive broker restarts or not." + }, + "exclusive": { + "type": "boolean", + "description": "Whether the queue should be used only by one connection or not." + }, + "autoDelete": { + "type": "boolean", + "description": "Whether the queue should be deleted when the last consumer unsubscribes." + }, + "vhost": { + "type": "string", + "default": "/", + "description": "The virtual host of the queue. Defaults to '/'." + } + }, + "description": "When is=queue, this object defines the queue properties." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "oneOf": [ + { + "properties": { + "is": { "const": "routingKey" } + }, + "required": [ + "exchange" + ], + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "is": { "const": "queue" } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "exchange" + ] + } + } + ], + "examples": [ + { + "is": "routingKey", + "exchange": { + "name": "myExchange", + "type": "topic", + "durable": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.3.0" + }, + { + "is": "queue", + "queue": { + "name": "my-queue-name", + "durable": true, + "exclusive": true, + "autoDelete": false, + "vhost": "/" + }, + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/amqp/0.3.0/message.json b/bindings/amqp/0.3.0/message.json new file mode 100644 index 00000000..ba1c7352 --- /dev/null +++ b/bindings/amqp/0.3.0/message.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/message.json", + "title": "AMQP message bindings object", + "description": "This object contains information about the message representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "contentEncoding": { + "type": "string", + "description": "A MIME encoding for the message content." + }, + "messageType": { + "type": "string", + "description": "Application-specific message type." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "contentEncoding": "gzip", + "messageType": "user.signup", + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/amqp/0.3.0/operation.json b/bindings/amqp/0.3.0/operation.json new file mode 100644 index 00000000..1c359113 --- /dev/null +++ b/bindings/amqp/0.3.0/operation.json @@ -0,0 +1,84 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json", + "title": "AMQP operation bindings object", + "description": "This object contains information about the operation representation in AMQP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "expiration": { + "type": "integer", + "minimum": 0, + "description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero." + }, + "userId": { + "type": "string", + "description": "Identifies the user who has sent the message." + }, + "cc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The routing keys the message should be routed to at the time of publishing." + }, + "priority": { + "type": "integer", + "description": "A priority for the message." + }, + "deliveryMode": { + "type": "integer", + "enum": [1,2], + "description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)." + }, + "mandatory": { + "type": "boolean", + "description": "Whether the message is mandatory or not." + }, + "bcc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Like cc but consumers will not receive this information." + }, + "timestamp": { + "type": "boolean", + "description": "Whether the message should include a timestamp or not." + }, + "ack": { + "type": "boolean", + "description": "Whether the consumer should ack the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "expiration": 100000, + "userId": "guest", + "cc": [ + "user.logs" + ], + "priority": 10, + "deliveryMode": 2, + "mandatory": false, + "bcc": [ + "external.audit" + ], + "timestamp": true, + "ack": false, + "bindingVersion": "0.3.0" + } + ] +} diff --git a/bindings/http/0.2.0/message.json b/bindings/http/0.2.0/message.json new file mode 100644 index 00000000..722a47db --- /dev/null +++ b/bindings/http/0.2.0/message.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/0.2.0/message.json", + "title": "HTTP message bindings object", + "description": "This object contains information about the message representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "headers": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "properties": { + "Content-Type": { + "type": "string", + "enum": [ + "application/json" + ] + } + } + }, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/http/0.2.0/operation.json b/bindings/http/0.2.0/operation.json new file mode 100644 index 00000000..dae731f2 --- /dev/null +++ b/bindings/http/0.2.0/operation.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/http/0.2.0/operation.json", + "title": "HTTP operation bindings object", + "description": "This object contains information about the operation representation in HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "PUT", + "POST", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", + "CONNECT", + "TRACE" + ], + "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." + }, + "query": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.2.0" + }, + { + "method": "GET", + "query": { + "type": "object", + "required": [ + "companyId" + ], + "properties": { + "companyId": { + "type": "number", + "minimum": 1, + "description": "The Id of the company." + } + }, + "additionalProperties": false + }, + "bindingVersion": "0.2.0" + } + ] +} + + + + diff --git a/bindings/mqtt/0.2.0/message.json b/bindings/mqtt/0.2.0/message.json new file mode 100644 index 00000000..e2d8f798 --- /dev/null +++ b/bindings/mqtt/0.2.0/message.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json", + "title": "MQTT message bindings object", + "description": "This object contains information about the message representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/mqtt/0.2.0/operation.json b/bindings/mqtt/0.2.0/operation.json new file mode 100644 index 00000000..ec042529 --- /dev/null +++ b/bindings/mqtt/0.2.0/operation.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json", + "title": "MQTT operation bindings object", + "description": "This object contains information about the operation representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "qos": { + "type": "integer", + "description": "Defines the Quality of Service (QoS) levels for the message flow between client and server. Its value MUST be either 0 (At most once delivery), 1 (At least once delivery), or 2 (Exactly once delivery)." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the message or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "qos": 2, + "retain": true, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/bindings/mqtt/0.2.0/server.json b/bindings/mqtt/0.2.0/server.json new file mode 100644 index 00000000..d45fdb8e --- /dev/null +++ b/bindings/mqtt/0.2.0/server.json @@ -0,0 +1,71 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json", + "title": "MQTT server bindings object", + "description": "This object contains information about the server representation in MQTT.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "clientId": { + "type": "string", + "description": "The client identifier." + }, + "cleanSession": { + "type": "boolean", + "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent." + }, + "lastWill": { + "type": "object", + "description": "Last Will and Testament configuration.", + "properties": { + "topic": { + "type": "string", + "description": "The topic where the Last Will and Testament message will be sent." + }, + "qos": { + "type": "integer", + "enum": [0,1,2], + "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." + }, + "message": { + "type": "string", + "description": "Last Will message." + }, + "retain": { + "type": "boolean", + "description": "Whether the broker should retain the Last Will and Testament message or not." + } + } + }, + "keepAlive": { + "type": "integer", + "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "clientId": "guest", + "cleanSession": true, + "lastWill": { + "topic": "/last-wills", + "qos": 2, + "message": "Guest gone offline.", + "retain": false + }, + "keepAlive": 60, + "bindingVersion": "0.2.0" + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index c5941fe5..050f46eb 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/channel.json" } } ] diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index e8813db6..128ddb47 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -10,7 +10,7 @@ "http": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -24,7 +24,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } }, { @@ -32,12 +32,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json" } } ] @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/message.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/message.json" } } ] @@ -82,7 +82,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -96,7 +96,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } }, { @@ -104,12 +104,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/message.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/message.json" } } ] diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 19157d0d..8f629437 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -10,7 +10,7 @@ "http": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -24,7 +24,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } }, { @@ -32,12 +32,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/http/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json" } } ] @@ -46,7 +46,7 @@ "amqp": { "properties": { "bindingVersion": { - "enum": ["0.2.0"] + "enum": ["0.3.0"] } }, "allOf": [ @@ -60,7 +60,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } }, { @@ -68,12 +68,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.3.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/amqp/0.3.0/operation.json" } } ] @@ -82,7 +82,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -96,7 +96,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } }, { @@ -104,12 +104,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" } } ] diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index c92b9329..5782a1c5 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -14,7 +14,7 @@ "mqtt": { "properties": { "bindingVersion": { - "enum": ["0.1.0"] + "enum": ["0.2.0"] } }, "allOf": [ @@ -28,7 +28,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } }, { @@ -36,12 +36,12 @@ "required": [ "bindingVersion" ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.1.0/server.json" + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/server.json" } } ] diff --git a/test/docs/3.0.0/streetlights-all.json b/test/docs/3.0.0/streetlights-all.json index c3a24f83..15b7cdc6 100644 --- a/test/docs/3.0.0/streetlights-all.json +++ b/test/docs/3.0.0/streetlights-all.json @@ -37,7 +37,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": { diff --git a/test/docs/3.0.0/streetlights-avro.json b/test/docs/3.0.0/streetlights-avro.json index acbeea2c..34eed135 100644 --- a/test/docs/3.0.0/streetlights-avro.json +++ b/test/docs/3.0.0/streetlights-avro.json @@ -23,7 +23,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": { diff --git a/test/docs/3.0.0/streetlights-openapi.json b/test/docs/3.0.0/streetlights-openapi.json index 84d64449..08f25ae4 100644 --- a/test/docs/3.0.0/streetlights-openapi.json +++ b/test/docs/3.0.0/streetlights-openapi.json @@ -23,7 +23,7 @@ }, "bindings": { "mqtt": { - "bindingVersion": "0.1.0", + "bindingVersion": "0.2.0", "qos": 1 }, "kafka": {