From 3f6fe8dba610a4aaeb68011f12b2f288a5177175 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 30 Jan 2024 14:40:44 +0100 Subject: [PATCH 1/2] fix: binding solace: fix operation has invalid schema --- bindings/solace/0.2.0/operation.json | 14 +++++++------- bindings/solace/0.3.0/operation.json | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bindings/solace/0.2.0/operation.json b/bindings/solace/0.2.0/operation.json index d2b8d946..8a4ad357 100644 --- a/bindings/solace/0.2.0/operation.json +++ b/bindings/solace/0.2.0/operation.json @@ -71,15 +71,15 @@ } ] } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, - "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/solace/0.3.0/operation.json b/bindings/solace/0.3.0/operation.json index 477962f7..e1c3a5e8 100644 --- a/bindings/solace/0.3.0/operation.json +++ b/bindings/solace/0.3.0/operation.json @@ -79,15 +79,15 @@ } ] } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." } }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.3.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - }, "examples": [ { "bindingVersion": "0.3.0", From 966dcf9f8219b222506e07aa77b4b8e15217a8a7 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 30 Jan 2024 14:42:59 +0100 Subject: [PATCH 2/2] feat: binding solace: add per operation fields --- bindings/solace/0.4.0/operation.json | 128 ++++++++++++++++++ bindings/solace/0.4.0/server.json | 38 ++++++ .../3.0.0/operationBindingsObject.json | 17 ++- definitions/3.0.0/serverBindingsObject.json | 17 ++- 4 files changed, 196 insertions(+), 4 deletions(-) create mode 100644 bindings/solace/0.4.0/operation.json create mode 100644 bindings/solace/0.4.0/server.json diff --git a/bindings/solace/0.4.0/operation.json b/bindings/solace/0.4.0/operation.json new file mode 100644 index 00000000..3c9d6f8d --- /dev/null +++ b/bindings/solace/0.4.0/operation.json @@ -0,0 +1,128 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/0.4.0/operation.json", + "title": "Solace operation bindings object", + "description": "This object contains information about the operation representation in Solace.", + "type": "object", + "additionalProperties": false, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + }, + "destinations": { + "description": "The list of Solace destinations referenced in the operation.", + "type": "array", + "items": { + "type": "object", + "properties": { + "deliveryMode": { + "type": "string", + "enum": [ + "direct", + "persistent" + ] + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "type": "string", + "const": "queue", + "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." + }, + "queue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the queue" + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the queue subscribes to.", + "items": { + "type": "string" + } + }, + "accessType": { + "type": "string", + "enum": [ + "exclusive", + "nonexclusive" + ] + }, + "maxTtl": { + "type": "string", + "description": "The maximum TTL to apply to messages to be spooled." + }, + "maxMsgSpoolUsage": { + "type": "string", + "description": "The maximum amount of message spool that the given queue may use" + } + } + } + } + }, + { + "properties": { + "destinationType": { + "type": "string", + "const": "topic", + "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." + }, + "topicSubscriptions": { + "type": "array", + "description": "The list of topics that the client subscribes to.", + "items": { + "type": "string" + } + } + } + } + ] + } + }, + "timeToLive": { + "type": "integer", + "description": "Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message." + }, + "priority": { + "type": "integer", + "minimum": 0, + "maximum": 255, + "description": "The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority." + }, + "dmqEligible": { + "type": "boolean", + "description": "Set the message to be eligible to be moved to a Dead Message Queue. The default value is false." + } + }, + "examples": [ + { + "bindingVersion": "0.4.0", + "destinations": [ + { + "destinationType": "queue", + "queue": { + "name": "sampleQueue", + "topicSubscriptions": [ + "samples/*" + ], + "accessType": "nonexclusive" + } + }, + { + "destinationType": "topic", + "topicSubscriptions": [ + "samples/*" + ] + } + ] + } + ] +} diff --git a/bindings/solace/0.4.0/server.json b/bindings/solace/0.4.0/server.json new file mode 100644 index 00000000..632cd5c7 --- /dev/null +++ b/bindings/solace/0.4.0/server.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/solace/0.4.0/server.json", + "title": "Solace server bindings object", + "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "msgVpn": { + "type": "string", + "description": "The name of the Virtual Private Network to connect to on the Solace broker." + }, + "clientName": { + "type": "string", + "minLength": 1, + "maxLength": 160, + "description": "A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding." + } + }, + "examples": [ + { + "msgVpn": "ProdVPN", + "bindingVersion": "0.4.0" + } + ] +} diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 6a43fa62..9d0bede0 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -289,7 +289,7 @@ "solace": { "properties": { "bindingVersion": { - "enum": ["0.3.0", "0.2.0"] + "enum": ["0.4.0", "0.3.0", "0.2.0"] } }, "allOf": [ @@ -303,7 +303,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json" + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json" } }, { diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index c483725e..93ca6afc 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -174,7 +174,7 @@ "solace": { "properties": { "bindingVersion": { - "enum": ["0.3.0", "0.2.0"] + "enum": ["0.4.0", "0.3.0", "0.2.0"] } }, "allOf": [ @@ -188,7 +188,20 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json" + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json" } }, {