From 29e96d7948edfa8b460d11972cd375a49c71df63 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:50:24 +0000 Subject: [PATCH 01/19] fix: add operations to the components section (#445) --- definitions/3.0.0/components.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 3f3589ef..537c49bd 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -68,6 +68,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { @@ -281,4 +296,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" -} \ No newline at end of file +} From 3df2a2e1de1b0d719e432e97fe2d5c87538deff3 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 11:53:18 +0100 Subject: [PATCH 02/19] chore(release): v6.0.0-next-major-spec.12 (#447) --- package-lock.json | 4 ++-- package.json | 2 +- schemas/3.0.0-without-$id.json | 15 +++++++++++++++ schemas/3.0.0.json | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 55ddd172..8a6462b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index 2813fd6e..ff8d5c50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.11", + "version": "6.0.0-next-major-spec.12", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index d604e3b5..7fd84a3d 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -5994,6 +5994,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index eb8dc85a..a4009033 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -6084,6 +6084,21 @@ } } }, + "operations": { + "type": "object", + "patternProperties": { + "^[\\w\\d\\.\\-_]+$": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + } + }, "messages": { "type": "object", "patternProperties": { From 728f63c2187c1436c9f739b69f1cba3009665607 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Mon, 13 Nov 2023 12:01:38 +0100 Subject: [PATCH 03/19] fix: enable `$ref` support for bindings (#442) --- definitions/3.0.0/channel.json | 9 ++++++++- definitions/3.0.0/messageObject.json | 9 ++++++++- definitions/3.0.0/messageTrait.json | 9 ++++++++- definitions/3.0.0/operation.json | 9 ++++++++- definitions/3.0.0/operationTrait.json | 9 ++++++++- definitions/3.0.0/server.json | 9 ++++++++- 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 22a3c4b6..b42c9ae7 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -62,7 +62,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 87c066f3..f3de84ef 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -107,7 +107,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] }, "traits": { "type": "array", diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index 86717cf0..e3aeae2f 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -74,7 +74,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 3bcf7fea..2ef195a3 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -88,7 +88,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 986f4796..2a31835f 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -26,7 +26,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 17540811..c875979b 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -70,7 +70,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] } }, "$schema": "http://json-schema.org/draft-07/schema#", From 6caf1dca0b06d6dd9ec94c4555e04f8c7299483a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 13 Nov 2023 12:04:24 +0100 Subject: [PATCH 04/19] chore(release): v6.0.0-next-major-spec.13 (#448) --- package-lock.json | 4 +-- package.json | 2 +- schemas/3.0.0-without-$id.json | 54 ++++++++++++++++++++++++++++++---- schemas/3.0.0.json | 54 ++++++++++++++++++++++++++++++---- 4 files changed, 99 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a6462b2..bc454b01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index ff8d5c50..8969c4ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.12", + "version": "6.0.0-next-major-spec.13", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 7fd84a3d..3586d1ec 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -313,7 +313,14 @@ ] }, "bindings": { - "$ref": "#/definitions/serverBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/serverBindingsObject" + } + ] } } }, @@ -1961,7 +1968,14 @@ ] }, "bindings": { - "$ref": "#/definitions/channelBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/channelBindingsObject" + } + ] } } }, @@ -2088,7 +2102,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] }, "traits": { "type": "array", @@ -3826,7 +3847,14 @@ } }, "bindings": { - "$ref": "#/definitions/messageBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/messageBindingsObject" + } + ] } } }, @@ -4953,7 +4981,14 @@ ] }, "bindings": { - "$ref": "#/definitions/operationBindingsObject" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, @@ -5038,7 +5073,14 @@ "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { - "$ref": "#/definitions/operation/properties/bindings" + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operationBindingsObject" + } + ] } } }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index a4009033..237fb05d 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -324,7 +324,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + ] } } }, @@ -2006,7 +2013,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + ] } } }, @@ -2135,7 +2149,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] }, "traits": { "type": "array", @@ -3889,7 +3910,14 @@ } }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" + } + ] } } }, @@ -5029,7 +5057,14 @@ ] }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } } }, @@ -5117,7 +5152,14 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" + } + ] } } }, From 93482926ba4764fd3e887183dc435f485126a2a9 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:19:26 -1000 Subject: [PATCH 05/19] update codeowners --- CODEOWNERS | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index 5fc5affa..c0661113 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -8,11 +8,14 @@ * @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve +/bindings/anypointmq/ @mboss37 @GeraldLoeffler +/bindings/ibmmq/ @rcoppen +/bindings/jms/ @rcoppen @SrfHead +/bindings/kafka/ @lbroudoux @dalelane +/bindings/googlepubsub/ @whitlockjc +/bindings/solace/ @damaru-inc @CameronRushton +/bindings/pulsar/ @VisualBean +/bindings/sns/ @dpwdec @iancooper +/bindings/sqs/ @dpwdec @iancooper -/bindings/anypointmq/ @GeraldLoeffler -/bindings/ibmmq/ @rcoppen -/bindings/kafka/ @lbroudoux @dalelane -/bindings/googlepubsub/ @whitlockjc -/bindings/solace/ @damaru-inc @CameronRushton -/bindings/*.json @KhudaDad414 -/bindings/pulsar/ @VisualBean \ No newline at end of file +/bindings/*.json @KhudaDad414 \ No newline at end of file From 9e59bb768c707167dac664956a3e7fbcad16064c Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:24:06 -1000 Subject: [PATCH 06/19] removed unused keep files --- bindings/jms/.keep | 0 bindings/sns/.keep | 0 bindings/sqs/.keep | 0 3 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bindings/jms/.keep delete mode 100644 bindings/sns/.keep delete mode 100644 bindings/sqs/.keep diff --git a/bindings/jms/.keep b/bindings/jms/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/sns/.keep b/bindings/sns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/bindings/sqs/.keep b/bindings/sqs/.keep deleted file mode 100644 index e69de29b..00000000 From bae60d4029b50e48ee0243198c3d05522f765ebc Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:30:35 -1000 Subject: [PATCH 07/19] adapt websocket binding --- bindings/websockets/0.1.0/channel.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bindings/websockets/0.1.0/channel.json b/bindings/websockets/0.1.0/channel.json index d01abd46..8a8238b4 100644 --- a/bindings/websockets/0.1.0/channel.json +++ b/bindings/websockets/0.1.0/channel.json @@ -20,11 +20,25 @@ "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { From c4731378a1436fefbd61a9684066876c83ff7216 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:33:23 -1000 Subject: [PATCH 08/19] add sqs bindings --- bindings/sqs/0.2.0/channel.json | 264 ++++++++++++++++++ bindings/sqs/0.2.0/operation.json | 258 +++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 36 ++- .../3.0.0/operationBindingsObject.json | 36 ++- 4 files changed, 592 insertions(+), 2 deletions(-) create mode 100644 bindings/sqs/0.2.0/channel.json create mode 100644 bindings/sqs/0.2.0/operation.json diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json new file mode 100644 index 00000000..6e5279d7 --- /dev/null +++ b/bindings/sqs/0.2.0/channel.json @@ -0,0 +1,264 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sqs/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SQS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "#/definitions/queue" + }, + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "#/definitions/queue" + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": ["queue", "messageGroup"], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": ["perQueue", "perMessageGroupId"], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } + }, + "required": [ + "name", + "fifoQueue" + ] + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] +} \ No newline at end of file diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json new file mode 100644 index 00000000..9bd1e5bf --- /dev/null +++ b/bindings/sqs/0.2.0/operation.json @@ -0,0 +1,258 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sqs/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in SQS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "#/definitions/queue" + } + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": ["queue", "messageGroup"], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": ["perQueue", "perMessageGroupId"], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } + }, + "required": [ + "name" + ] + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 21ba2f2c..d1c44baa 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -167,7 +167,41 @@ "nats": {}, "jms": {}, "sns": {}, - "sqs": {}, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" + } + } + ] + }, "stomp": {}, "redis": {}, "ibmmq": { diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 8f629437..d8237791 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -214,7 +214,41 @@ }, "jms": {}, "sns": {}, - "sqs": {}, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" + } + } + ] + }, "stomp": {}, "redis": {}, "ibmmq": {}, From f1670aaa3858c67936779b2391cee05aba7a1b55 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:36:13 -1000 Subject: [PATCH 09/19] add sns bindings --- bindings/sns/0.1.0/channel.json | 150 ++++++++++ bindings/sns/0.1.0/operation.json | 273 ++++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 38 ++- .../3.0.0/operationBindingsObject.json | 36 ++- 4 files changed, 494 insertions(+), 3 deletions(-) create mode 100644 bindings/sns/0.1.0/channel.json create mode 100644 bindings/sns/0.1.0/operation.json diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json new file mode 100644 index 00000000..6ab5e2f6 --- /dev/null +++ b/bindings/sns/0.1.0/channel.json @@ -0,0 +1,150 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sns/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string", + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." + }, + "ordering": { + "$ref": "#/definitions/ordering" + }, + "policy": { + "$ref": "#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the topic." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { + "type": "object", + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] + }, + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } + ] + } + } + ] +} diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json new file mode 100644 index 00000000..25eb5935 --- /dev/null +++ b/bindings/sns/0.1.0/operation.json @@ -0,0 +1,273 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/sns/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in SNS.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "topic": { + "$ref": "#/definitions/identifier", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." + }, + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "#/definitions/consumer" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email adress." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "#/definitions/identifier" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "#/definitions/redrivePolicy" + }, + "deliveryPolicy": { + "$ref": "#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/identifier", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] + } + }, + "examples": [ + { + "topic": { + "name": "someTopic" + }, + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] + } + ] +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index d1c44baa..fe2dd301 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -166,13 +166,47 @@ }, "nats": {}, "jms": {}, - "sns": {}, - "sqs": { + "sns": { "properties": { "bindingVersion": { "enum": ["0.1.0"] } }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" + } + } + ] + }, + "sqs": { + "properties": { + "bindingVersion": { + "enum": ["0.2.0"] + } + }, "allOf": [ { "description": "If no bindingVersion specified, use the latest binding", diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index d8237791..654ef5cc 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -213,7 +213,41 @@ ] }, "jms": {}, - "sns": {}, + "sns": { + "properties": { + "bindingVersion": { + "enum": ["0.1.0"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" + } + } + ] + }, "sqs": { "properties": { "bindingVersion": { From da043661c9c439d3dd6b3f66deb8c6119aff8655 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:37:42 -1000 Subject: [PATCH 10/19] change ids of sns and sqs bindings --- bindings/sns/0.1.0/channel.json | 2 +- bindings/sns/0.1.0/operation.json | 2 +- bindings/sqs/0.2.0/channel.json | 2 +- bindings/sqs/0.2.0/operation.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 6ab5e2f6..88d62512 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sns/channel.json", + "$id": "http://asyncapi.com/bindings/sns/0.1.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SNS.", "type": "object", diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 25eb5935..0e023e9b 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sns/operation.json", + "$id": "http://asyncapi.com/bindings/sns/0.1.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SNS.", "type": "object", diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 6e5279d7..550e7fac 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sqs/channel.json", + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json", "title": "Channel Schema", "description": "This object contains information about the channel representation in SQS.", "type": "object", diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 9bd1e5bf..b6d1529b 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/sqs/operation.json", + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json", "title": "Operation Schema", "description": "This object contains information about the operation representation in SQS.", "type": "object", From 4a31bca9e3c1f37b407e88bd514e60afcaba188d Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:41:26 -1000 Subject: [PATCH 11/19] add jms bindings --- bindings/jms/0.0.1/channel.json | 40 +++++++++++ bindings/jms/0.0.1/message.json | 73 ++++++++++++++++++++ bindings/jms/0.0.1/server.json | 69 ++++++++++++++++++ definitions/3.0.0/channelBindingsObject.json | 36 +++++++++- definitions/3.0.0/messageBindingsObject.json | 36 +++++++++- definitions/3.0.0/serverBindingsObject.json | 36 +++++++++- 6 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 bindings/jms/0.0.1/channel.json create mode 100644 bindings/jms/0.0.1/message.json create mode 100644 bindings/jms/0.0.1/server.json diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json new file mode 100644 index 00000000..174202ef --- /dev/null +++ b/bindings/jms/0.0.1/channel.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/channel.json", + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, + "destinationType": { + "type": "string", + "enum": ["queue", "fifo-queue"], + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json new file mode 100644 index 00000000..181b1e56 --- /dev/null +++ b/bindings/jms/0.0.1/message.json @@ -0,0 +1,73 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/message.json", + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "examples": [ + { + "headers": { + "type": "object", + "required": ["JMSMessageID"], + "properties": { + "JMSMessageID": { + "type": ["string", "null"], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": ["PERSISTENT", "NON_PERSISTENT"], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": ["string", "null"], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": ["string", "null"], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] +} diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json new file mode 100644 index 00000000..1466dade --- /dev/null +++ b/bindings/jms/0.0.1/server.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/bindings/jms/0.0.1/server.json", + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\-\\_]+$": { + "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + } + }, + "required": ["jmsConnectionFactory"], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/schemas/property" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + + }, + "schemas": { + "property": { + "type": "object", + "required": ["name", "value"], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": ["string", "boolean", "number", "null"], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + } + \ No newline at end of file diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index fe2dd301..666212c3 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -165,7 +165,41 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + } + ] + }, "sns": { "properties": { "bindingVersion": { diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index cfe65074..ea07325e 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -212,7 +212,41 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 5782a1c5..7245f01e 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -131,7 +131,41 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": ["0.0.1"] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + }, + { + "if": { + "required": [ "bindingVersion" ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, From e45fb8e5fd8980760a43043dd1f85ef01ef3f216 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:43:18 -1000 Subject: [PATCH 12/19] adapt http bindings --- bindings/http/0.1.0/message.json | 9 ++++++++- bindings/http/0.1.0/operation.json | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bindings/http/0.1.0/message.json b/bindings/http/0.1.0/message.json index 7295151a..20b088a2 100644 --- a/bindings/http/0.1.0/message.json +++ b/bindings/http/0.1.0/message.json @@ -12,7 +12,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.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": { diff --git a/bindings/http/0.1.0/operation.json b/bindings/http/0.1.0/operation.json index 61119a7a..ecfb71fd 100644 --- a/bindings/http/0.1.0/operation.json +++ b/bindings/http/0.1.0/operation.json @@ -35,7 +35,14 @@ "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", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.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": { From 64a69a628ebb02248cadcb04c843cce4419b90fd Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:44:17 -1000 Subject: [PATCH 13/19] adapt anypointmq bindings --- bindings/anypointmq/0.0.1/message.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/anypointmq/0.0.1/message.json b/bindings/anypointmq/0.0.1/message.json index 16075b90..1ad68c11 100644 --- a/bindings/anypointmq/0.0.1/message.json +++ b/bindings/anypointmq/0.0.1/message.json @@ -12,7 +12,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { From ec957940dfcf55a74087cf9f1a27d460883d9fba Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:46:35 -1000 Subject: [PATCH 14/19] adapt all patterns for specification extension --- bindings/jms/0.0.1/channel.json | 2 +- bindings/jms/0.0.1/message.json | 2 +- bindings/jms/0.0.1/server.json | 2 +- bindings/sns/0.1.0/channel.json | 8 ++++---- bindings/sns/0.1.0/operation.json | 12 ++++++------ bindings/sqs/0.2.0/channel.json | 12 ++++++------ bindings/sqs/0.2.0/operation.json | 12 ++++++------ 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json index 174202ef..874d1ec0 100644 --- a/bindings/jms/0.0.1/channel.json +++ b/bindings/jms/0.0.1/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json index 181b1e56..ba1909b8 100644 --- a/bindings/jms/0.0.1/message.json +++ b/bindings/jms/0.0.1/message.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index 1466dade..85be5fff 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 88d62512..7a0d8a21 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -39,7 +39,7 @@ "type": "object", "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -65,7 +65,7 @@ "type": "object", "description": "The security policy for the SNS Topic.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -85,7 +85,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 0e023e9b..7b95335e 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -40,7 +40,7 @@ "identifier": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -70,7 +70,7 @@ "consumer": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -98,7 +98,7 @@ "type": "object", "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -153,7 +153,7 @@ "deliveryPolicy": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -202,7 +202,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 550e7fac..426482cf 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -37,7 +37,7 @@ "type": "object", "description": "A definition of a queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -109,7 +109,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -131,7 +131,7 @@ "type": "object", "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -150,7 +150,7 @@ "type": "object", "description": "The security policy for the SQS Queue", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -170,7 +170,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index b6d1529b..8115b40d 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -6,7 +6,7 @@ "type": "object", "additionalProperties": false, "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -36,7 +36,7 @@ "type": "object", "description": "A definition of a queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -111,7 +111,7 @@ "type": "object", "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -133,7 +133,7 @@ "type": "object", "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -152,7 +152,7 @@ "type": "object", "description": "The security policy for the SQS Queue", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, @@ -172,7 +172,7 @@ "statement": { "type": "object", "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { + "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" } }, From 5615dacd5bcf61987c13978c80b788a9a3518a33 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:48:17 -1000 Subject: [PATCH 15/19] adapted all references to use v3 --- bindings/jms/0.0.1/channel.json | 2 +- bindings/jms/0.0.1/message.json | 4 ++-- bindings/jms/0.0.1/server.json | 2 +- bindings/sns/0.1.0/channel.json | 8 ++++---- bindings/sns/0.1.0/operation.json | 12 ++++++------ bindings/sqs/0.2.0/channel.json | 12 ++++++------ bindings/sqs/0.2.0/operation.json | 12 ++++++------ 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/bindings/jms/0.0.1/channel.json b/bindings/jms/0.0.1/channel.json index 874d1ec0..6e6bde39 100644 --- a/bindings/jms/0.0.1/channel.json +++ b/bindings/jms/0.0.1/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/jms/0.0.1/message.json b/bindings/jms/0.0.1/message.json index ba1909b8..daad663f 100644 --- a/bindings/jms/0.0.1/message.json +++ b/bindings/jms/0.0.1/message.json @@ -7,12 +7,12 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { "headers": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." }, "bindingVersion": { diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index 85be5fff..f5e83ab4 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "required": ["jmsConnectionFactory"], diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index 7a0d8a21..e4f15738 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -40,7 +40,7 @@ "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -66,7 +66,7 @@ "description": "The security policy for the SNS Topic.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -86,7 +86,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 7b95335e..44c2addb 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -41,7 +41,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -71,7 +71,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -99,7 +99,7 @@ "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "additionalProperties": { @@ -154,7 +154,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -203,7 +203,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index 426482cf..ad4f8697 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -38,7 +38,7 @@ "description": "A definition of a queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -110,7 +110,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -132,7 +132,7 @@ "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -151,7 +151,7 @@ "description": "The security policy for the SQS Queue", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -171,7 +171,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 8115b40d..9279dc51 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -7,7 +7,7 @@ "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -37,7 +37,7 @@ "description": "A definition of a queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -112,7 +112,7 @@ "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -134,7 +134,7 @@ "description": "The SQS queue to use as a dead letter queue (DLQ).", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -153,7 +153,7 @@ "description": "The security policy for the SQS Queue", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { @@ -173,7 +173,7 @@ "type": "object", "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, "properties": { From 17a6cdcf3701d961308b4b7541c4dc3fc51bcd65 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 11:57:24 -1000 Subject: [PATCH 16/19] update links --- bindings/anypointmq/0.0.1/message.json | 4 ++-- bindings/http/0.1.0/message.json | 4 ++-- bindings/http/0.1.0/operation.json | 4 ++-- bindings/websockets/0.1.0/channel.json | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bindings/anypointmq/0.0.1/message.json b/bindings/anypointmq/0.0.1/message.json index 1ad68c11..34dddaa0 100644 --- a/bindings/anypointmq/0.0.1/message.json +++ b/bindings/anypointmq/0.0.1/message.json @@ -14,10 +14,10 @@ "headers": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." diff --git a/bindings/http/0.1.0/message.json b/bindings/http/0.1.0/message.json index 20b088a2..84fbb679 100644 --- a/bindings/http/0.1.0/message.json +++ b/bindings/http/0.1.0/message.json @@ -14,10 +14,10 @@ "headers": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key." diff --git a/bindings/http/0.1.0/operation.json b/bindings/http/0.1.0/operation.json index ecfb71fd..8ba6b903 100644 --- a/bindings/http/0.1.0/operation.json +++ b/bindings/http/0.1.0/operation.json @@ -37,10 +37,10 @@ "query": { "oneOf": [ { - "$ref": "https://asyncapi.com/definitions/3.0.0/schema.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key." diff --git a/bindings/websockets/0.1.0/channel.json b/bindings/websockets/0.1.0/channel.json index 8a8238b4..4fa27b0f 100644 --- a/bindings/websockets/0.1.0/channel.json +++ b/bindings/websockets/0.1.0/channel.json @@ -22,10 +22,10 @@ "query": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." @@ -33,10 +33,10 @@ "headers": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "https://asyncapi.com/definitions/3.0.0/Reference.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." From 2373a45ff0aae34160b207968be47a6ce7598c62 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Fri, 17 Nov 2023 12:09:39 -1000 Subject: [PATCH 17/19] misc changes --- bindings/jms/0.0.1/server.json | 4 +- bindings/sns/0.1.0/channel.json | 6 +- bindings/sns/0.1.0/operation.json | 16 +- bindings/sqs/0.2.0/channel.json | 12 +- bindings/sqs/0.2.0/operation.json | 10 +- schemas/3.0.0-without-$id.json | 2531 ++++++++++++++++++++++------- schemas/3.0.0.json | 2500 ++++++++++++++++++++++------ 7 files changed, 3978 insertions(+), 1101 deletions(-) diff --git a/bindings/jms/0.0.1/server.json b/bindings/jms/0.0.1/server.json index f5e83ab4..2137b913 100644 --- a/bindings/jms/0.0.1/server.json +++ b/bindings/jms/0.0.1/server.json @@ -19,7 +19,7 @@ "properties": { "type": "array", "items": { - "$ref": "#/schemas/property" + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" }, "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." }, @@ -36,7 +36,7 @@ } }, - "schemas": { + "definitions": { "property": { "type": "object", "required": ["name", "value"], diff --git a/bindings/sns/0.1.0/channel.json b/bindings/sns/0.1.0/channel.json index e4f15738..552b63e0 100644 --- a/bindings/sns/0.1.0/channel.json +++ b/bindings/sns/0.1.0/channel.json @@ -16,10 +16,10 @@ "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, "ordering": { - "$ref": "#/definitions/ordering" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/ordering" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/policy" }, "tags": { "type": "object", @@ -74,7 +74,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this topic", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/statement" } } }, diff --git a/bindings/sns/0.1.0/operation.json b/bindings/sns/0.1.0/operation.json index 44c2addb..4c890902 100644 --- a/bindings/sns/0.1.0/operation.json +++ b/bindings/sns/0.1.0/operation.json @@ -12,19 +12,19 @@ }, "properties": { "topic": { - "$ref": "#/definitions/identifier", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, "consumers": { "type": "array", "description": "The protocols that listen to this topic and their endpoints.", "items": { - "$ref": "#/definitions/consumer" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/consumer" }, "minItems": 1 }, "deliveryPolicy": { - "$ref": "#/definitions/deliveryPolicy", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { @@ -51,7 +51,7 @@ }, "email": { "type": "string", - "description": "The endpoint is an email adress." + "description": "The endpoint is an email address." }, "phone": { "type": "string", @@ -92,7 +92,7 @@ }, "endpoint": { "description": "The endpoint messages are delivered to.", - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" }, "filterPolicy": { "type": "object", @@ -133,10 +133,10 @@ "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy" }, "deliveryPolicy": { - "$ref": "#/definitions/deliveryPolicy", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." }, "displayName": { @@ -208,7 +208,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", "description": "The SQS queue to use as a dead letter queue (DLQ)." }, "maxReceiveCount": { diff --git a/bindings/sqs/0.2.0/channel.json b/bindings/sqs/0.2.0/channel.json index ad4f8697..91431157 100644 --- a/bindings/sqs/0.2.0/channel.json +++ b/bindings/sqs/0.2.0/channel.json @@ -13,11 +13,11 @@ "properties": { "queue": { "description": "A definition of the queue that will be used as the channel.", - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "deadLetterQueue": { "description": "A definition of the queue that will be used for un-processable messages.", - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, "bindingVersion": { "type": "string", @@ -90,10 +90,10 @@ "default": 345600 }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy" }, "tags": { "type": "object", @@ -115,7 +115,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier" }, "maxReceiveCount": { "type": "integer", @@ -159,7 +159,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this queue.", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement" } } }, diff --git a/bindings/sqs/0.2.0/operation.json b/bindings/sqs/0.2.0/operation.json index 9279dc51..f25d4423 100644 --- a/bindings/sqs/0.2.0/operation.json +++ b/bindings/sqs/0.2.0/operation.json @@ -15,7 +15,7 @@ "type": "array", "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", "items": { - "$ref": "#/definitions/queue" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/queue" } }, "bindingVersion": { @@ -93,10 +93,10 @@ "default": 345600 }, "redrivePolicy": { - "$ref": "#/definitions/redrivePolicy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/redrivePolicy" }, "policy": { - "$ref": "#/definitions/policy" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/policy" }, "tags": { "type": "object", @@ -117,7 +117,7 @@ }, "properties": { "deadLetterQueue": { - "$ref": "#/definitions/identifier" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/identifier" }, "maxReceiveCount": { "type": "integer", @@ -161,7 +161,7 @@ "type": "array", "description": "An array of statement objects, each of which controls a permission for this queue.", "items": { - "$ref": "#/definitions/statement" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/statement" } } }, diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 3586d1ec..91629503 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -1064,7 +1064,45 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -1742,6 +1780,81 @@ } ] }, + "bindings-jms-0.0.1-server": { + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "jmsConnectionFactory" + ], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/bindings-jms-0.0.1-server" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "definitions": { + "property": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": [ + "string", + "boolean", + "number", + "null" + ], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + }, "bindings-ibmmq-0.1.0-server": { "title": "IBM MQ server bindings object", "description": "This object contains server connection information about the IBM MQ server, referred to as an IBM MQ queue manager. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", @@ -3241,7 +3354,45 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-message" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -3608,7 +3759,14 @@ }, "properties": { "headers": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { @@ -3633,6 +3791,90 @@ } ] }, + "bindings-jms-0.0.1-message": { + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "headers": { + "$ref": "#/definitions/schema", + "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "required": [ + "JMSMessageID" + ], + "properties": { + "JMSMessageID": { + "type": [ + "string", + "null" + ], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": [ + "PERSISTENT", + "NON_PERSISTENT" + ], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": [ + "string", + "null" + ], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": [ + "string", + "null" + ], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, "bindings-ibmmq-0.1.0-message": { "title": "IBM MQ message bindings object", "description": "This object contains information about the message representation in IBM MQ.", @@ -4095,12 +4337,46 @@ ] }, "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-jms-0.0.1-channel" + } + } + ] + }, + "sns": { "properties": { "bindingVersion": { "enum": [ @@ -4119,7 +4395,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } }, { @@ -4134,13 +4410,12 @@ } }, "then": { - "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" + "$ref": "#/definitions/bindings-sns-0.1.0-channel" } } ] }, - "solace": {}, - "googlepubsub": { + "sqs": { "properties": { "bindingVersion": { "enum": [ @@ -4159,7 +4434,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } }, { @@ -4174,12 +4449,14 @@ } }, "then": { - "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" } } ] }, - "pulsar": { + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { "bindingVersion": { "enum": [ @@ -4198,7 +4475,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } }, { @@ -4213,38 +4490,131 @@ } }, "then": { - "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + "$ref": "#/definitions/bindings-ibmmq-0.1.0-channel" } } ] - } - } - }, - "bindings-websockets-0.1.0-channel": { - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "method": { - "type": "string", - "enum": [ - "GET", - "POST" + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-googlepubsub-0.2.0-channel" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-pulsar-0.1.0-channel" + } + } + ] + } + } + }, + "bindings-websockets-0.1.0-channel": { + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., HTTP.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "method": { + "type": "string", + "enum": [ + "GET", + "POST" ], "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "#/definitions/schema", + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/Reference" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { @@ -4572,9 +4942,9 @@ } ] }, - "bindings-ibmmq-0.1.0-channel": { - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "bindings-jms-0.0.1-channel": { + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4583,129 +4953,38 @@ } }, "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, "destinationType": { "type": "string", "enum": [ - "topic", - "queue" + "queue", + "fifo-queue" ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." - }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] - }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } - }, - "maxMsgLength": { - "type": "integer", - "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.0.1" ], - "description": "The version of this binding." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "oneOf": [ - { - "properties": { - "destinationType": { - "const": "topic" - } - }, - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "destinationType": { - "const": "queue" - } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "topic" - ] - } - } - ], "examples": [ { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" - }, - { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" } ] }, - "bindings-googlepubsub-0.2.0-channel": { - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "bindings-sns-0.1.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4714,80 +4993,146 @@ } }, "properties": { - "bindingVersion": { + "name": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, - "labels": { - "type": "object" + "ordering": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" }, - "messageRetentionDuration": { - "type": "string" + "policy": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" }, - "messageStoragePolicy": { + "tags": { "type": "object", - "additionalProperties": false, - "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" - } - } - } + "description": "Key-value pairs that represent AWS tags on the topic." }, - "schemaSettings": { + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { "type": "object", - "additionalItems": false, + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "encoding": { - "type": "string" + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] }, - "firstRevisionId": { - "type": "string" + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "#/definitions/bindings-sns-0.1.0-channel" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] }, - "lastRevisionId": { - "type": "string" + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "name": { - "type": "string" + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } }, "required": [ - "encoding", - "name" + "effect", + "principal", + "action" ] } }, - "required": [ - "schemaSettings" - ], "examples": [ { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" } } ] }, - "bindings-pulsar-0.1.0-channel": { + "bindings-sqs-0.2.0-channel": { "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "description": "This object contains information about the channel representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4795,126 +5140,607 @@ "$ref": "#/definitions/specificationExtension" } }, - "required": [ - "namespace", - "persistence" - ], "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" }, - "persistence": { + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "bindingVersion": { "type": "string", "enum": [ - "persistent", - "non-persistent" + "0.1.0", + "0.2.0" ], - "description": "persistence of the topic in Pulsar." - }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" - }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } - }, - "retention": { + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { "type": "object", - "additionalProperties": false, + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, "properties": { - "time": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "maximum": 15, + "default": 0 }, - "size": { + "visibilityTimeout": { "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "policy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." + }, + "required": [ + "name", + "fifoQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" - } - ] - }, - "operations": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } }, - { - "$ref": "#/definitions/operation" - } - ] - } - }, - "operation": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "required": [ - "action", - "channel" - ], - "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" + "required": [ + "deadLetterQueue" ] }, - "channel": { - "$ref": "#/definitions/Reference" - }, - "messages": { - "type": "array", - "items": { + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-channel" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] + }, + "bindings-ibmmq-0.1.0-channel": { + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] + }, + "bindings-googlepubsub-0.2.0-channel": { + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "bindingVersion": { + "type": "string", + "enum": [ + "0.2.0" + ], + "description": "The version of this binding." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + } + }, + "required": [ + "schemaSettings" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] + }, + "bindings-pulsar-0.1.0-channel": { + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "operations": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/operation" + } + ] + } + }, + "operation": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "#/definitions/Reference" + }, + "messages": { + "type": "array", + "items": { "$ref": "#/definitions/Reference" } }, @@ -5152,7 +5978,119 @@ } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + } + } + ] + }, + "amqp1": {}, + "mqtt": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.4.0-operation" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "#/definitions/bindings-kafka-0.3.0-operation" } }, { @@ -5162,22 +6100,22 @@ ], "properties": { "bindingVersion": { - "const": "0.3.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-amqp-0.3.0-operation" + "$ref": "#/definitions/bindings-kafka-0.1.0-operation" } } ] }, - "amqp1": {}, - "mqtt": { + "anypointmq": {}, + "nats": { "properties": { "bindingVersion": { "enum": [ - "0.2.0" + "0.1.0" ] } }, @@ -5192,7 +6130,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } }, { @@ -5202,23 +6140,21 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.1.0" } } }, "then": { - "$ref": "#/definitions/bindings-mqtt-0.2.0-operation" + "$ref": "#/definitions/bindings-nats-0.1.0-operation" } } ] }, - "mqtt5": {}, - "kafka": { + "jms": {}, + "sns": { "properties": { "bindingVersion": { "enum": [ - "0.4.0", - "0.3.0", "0.1.0" ] } @@ -5234,37 +6170,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.4.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.4.0-operation" - } - }, - { - "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } - } - }, - "then": { - "$ref": "#/definitions/bindings-kafka-0.3.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-operation" } }, { @@ -5279,17 +6185,16 @@ } }, "then": { - "$ref": "#/definitions/bindings-kafka-0.1.0-operation" + "$ref": "#/definitions/bindings-sns-0.1.0-operation" } } ] }, - "anypointmq": {}, - "nats": { + "sqs": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5304,7 +6209,7 @@ } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } }, { @@ -5314,19 +6219,16 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "#/definitions/bindings-nats-0.1.0-operation" + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" } } ] }, - "jms": {}, - "sns": {}, - "sqs": {}, "stomp": {}, "redis": {}, "ibmmq": {}, @@ -5460,13 +6362,223 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.2.0" + } + ] + }, + "bindings-amqp-0.3.0-operation": { + "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": "#/definitions/specificationExtension" + } + }, + "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" + } + ] + }, + "bindings-mqtt-0.2.0-operation": { + "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": "#/definitions/specificationExtension" + } + }, + "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" + } + ] + }, + "bindings-kafka-0.4.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] + }, + "bindings-kafka-0.3.0-operation": { + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" } ] }, - "bindings-amqp-0.3.0-operation": { - "title": "AMQP operation bindings object", - "description": "This object contains information about the operation representation in AMQP.", + "bindings-kafka-0.1.0-operation": { + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5475,83 +6587,43 @@ } }, "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." + "groupId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer group." }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." + "clientId": { + "$ref": "#/definitions/schema", + "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "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" + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" } ] }, - "bindings-mqtt-0.2.0-operation": { - "title": "MQTT operation bindings object", - "description": "This object contains information about the operation representation in MQTT.", + "bindings-nats-0.1.0-operation": { + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5560,33 +6632,29 @@ } }, "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." + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "qos": 2, - "retain": true, - "bindingVersion": "0.2.0" + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" } ] }, - "bindings-kafka-0.4.0-operation": { + "bindings-sns-0.1.0-operation": { "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5595,43 +6663,269 @@ } }, "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." + "topic": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email address." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation" + }, + "deliveryPolicy": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sns-0.1.0-operation", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "topic": { + "name": "someTopic" }, - "bindingVersion": "0.4.0" + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] } ] }, - "bindings-kafka-0.3.0-operation": { + "bindings-sqs-0.2.0-operation": { "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5640,113 +6934,254 @@ } }, "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + } }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0", + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" } }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "policy": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } }, - "bindingVersion": "0.3.0" - } - ] - }, - "bindings-kafka-0.1.0-operation": { - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "groupId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer group." + "required": [ + "name" + ] }, - "clientId": { - "$ref": "#/definitions/schema", - "description": "Id of the consumer inside a consumer group." + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "bindingVersion": "0.1.0" - } - ] - }, - "bindings-nats-0.1.0-operation": { - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "#/definitions/bindings-sqs-0.2.0-operation" + } + } + }, + "required": [ + "statements" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] } }, "examples": [ { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] } ] }, diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 237fb05d..c5358cf4 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -1097,7 +1097,45 @@ }, "anypointmq": {}, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -1781,6 +1819,82 @@ } ] }, + "http://asyncapi.com/bindings/jms/0.0.1/server.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/server.json", + "title": "Server Schema", + "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "jmsConnectionFactory" + ], + "properties": { + "jmsConnectionFactory": { + "type": "string", + "description": "The classname of the ConnectionFactory implementation for the JMS Provider." + }, + "properties": { + "type": "array", + "items": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/server.json#/definitions/property" + }, + "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider." + }, + "clientID": { + "type": "string", + "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "definitions": { + "property": { + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The name of a property" + }, + "value": { + "type": [ + "string", + "boolean", + "number", + "null" + ], + "description": "The name of a property" + } + } + } + }, + "examples": [ + { + "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory", + "properties": [ + { + "name": "disableTimeStampsByDefault", + "value": false + } + ], + "clientID": "my-application-1", + "bindingVersion": "0.0.1" + } + ] + }, "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json": { "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/server.json", "title": "IBM MQ server bindings object", @@ -3294,7 +3408,45 @@ ] }, "nats": {}, - "jms": {}, + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/message.json" + } + } + ] + }, "sns": {}, "sqs": {}, "stomp": {}, @@ -3668,7 +3820,14 @@ }, "properties": { "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for Anypoint MQ-specific headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of Anypoint MQ protocol headers are 'messageId' and 'messageGroupId'." }, "bindingVersion": { @@ -3693,6 +3852,91 @@ } ] }, + "http://asyncapi.com/bindings/jms/0.0.1/message.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/message.json", + "title": "Message Schema", + "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.", + "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": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.0.1" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "headers": { + "type": "object", + "required": [ + "JMSMessageID" + ], + "properties": { + "JMSMessageID": { + "type": [ + "string", + "null" + ], + "description": "A unique message identifier. This may be set by your JMS Provider on your behalf." + }, + "JMSTimestamp": { + "type": "integer", + "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC." + }, + "JMSDeliveryMode": { + "type": "string", + "enum": [ + "PERSISTENT", + "NON_PERSISTENT" + ], + "default": "PERSISTENT", + "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf." + }, + "JMSPriority": { + "type": "integer", + "default": 4, + "description": "The priority of the message. This may be set by your JMS Provider on your behalf." + }, + "JMSExpires": { + "type": "integer", + "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire." + }, + "JMSType": { + "type": [ + "string", + "null" + ], + "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it." + }, + "JMSCorrelationID": { + "type": [ + "string", + "null" + ], + "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values." + }, + "JMSReplyTo": { + "type": "string", + "description": "The queue or topic that the message sender expects replies to." + } + } + }, + "bindingVersion": "0.0.1" + } + ] + }, "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json": { "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/message.json", "title": "IBM MQ message bindings object", @@ -4161,12 +4405,46 @@ ] }, "nats": {}, - "jms": {}, - "sns": {}, - "sqs": {}, - "stomp": {}, - "redis": {}, - "ibmmq": { + "jms": { + "properties": { + "bindingVersion": { + "enum": [ + "0.0.1" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.0.1" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/jms/0.0.1/channel.json" + } + } + ] + }, + "sns": { "properties": { "bindingVersion": { "enum": [ @@ -4185,7 +4463,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" } }, { @@ -4200,13 +4478,12 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json" } } ] }, - "solace": {}, - "googlepubsub": { + "sqs": { "properties": { "bindingVersion": { "enum": [ @@ -4225,7 +4502,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" } }, { @@ -4240,12 +4517,14 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json" } } ] }, - "pulsar": { + "stomp": {}, + "redis": {}, + "ibmmq": { "properties": { "bindingVersion": { "enum": [ @@ -4264,7 +4543,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" } }, { @@ -4279,39 +4558,132 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + "$ref": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json" } } ] - } - } - }, - "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", - "title": "WebSockets channel bindings object", - "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., 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", + }, + "solace": {}, + "googlepubsub": { + "properties": { + "bindingVersion": { + "enum": [ + "0.2.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json" + } + } + ] + }, + "pulsar": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json" + } + } + ] + } + } + }, + "http://asyncapi.com/bindings/websockets/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/websockets/0.1.0/channel.json", + "title": "WebSockets channel bindings object", + "description": "When using WebSockets, the channel represents the connection. Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics are strongly related to the protocol used for the handshake, i.e., 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", "POST" ], "description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'." }, "query": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a 'properties' key." }, "headers": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + } + ], "description": "A Schema object containing the definitions of the HTTP headers to use when establishing the connection. This schema MUST be of type 'object' and have a 'properties' key." }, "bindingVersion": { @@ -4643,10 +5015,10 @@ } ] }, - "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", - "title": "IBM MQ channel bindings object", - "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "http://asyncapi.com/bindings/jms/0.0.1/channel.json": { + "$id": "http://asyncapi.com/bindings/jms/0.0.1/channel.json", + "title": "Channel Schema", + "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4655,130 +5027,39 @@ } }, "properties": { + "destination": { + "type": "string", + "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name." + }, "destinationType": { "type": "string", "enum": [ - "topic", - "queue" + "queue", + "fifo-queue" ], - "default": "topic", - "description": "Defines the type of AsyncAPI channel." - }, - "queue": { - "type": "object", - "description": "Defines the properties of a queue.", - "properties": { - "objectName": { - "type": "string", - "maxLength": 48, - "description": "Defines the name of the IBM MQ queue associated with the channel." - }, - "isPartitioned": { - "type": "boolean", - "default": false, - "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." - }, - "exclusive": { - "type": "boolean", - "default": false, - "description": "Specifies if it is recommended to open the queue exclusively." - } - }, - "required": [ - "objectName" - ] - }, - "topic": { - "type": "object", - "description": "Defines the properties of a topic.", - "properties": { - "string": { - "type": "string", - "maxLength": 10240, - "description": "The value of the IBM MQ topic string to be used." - }, - "objectName": { - "type": "string", - "maxLength": 48, - "description": "The name of the IBM MQ topic object." - }, - "durablePermitted": { - "type": "boolean", - "default": true, - "description": "Defines if the subscription may be durable." - }, - "lastMsgRetained": { - "type": "boolean", - "default": false, - "description": "Defines if the last message published will be made available to new subscriptions." - } - } - }, - "maxMsgLength": { - "type": "integer", - "minimum": 0, - "maximum": 104857600, - "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + "default": "queue", + "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel." }, "bindingVersion": { "type": "string", "enum": [ - "0.1.0" + "0.0.1" ], - "description": "The version of this binding." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, - "oneOf": [ - { - "properties": { - "destinationType": { - "const": "topic" - } - }, - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "destinationType": { - "const": "queue" - } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "topic" - ] - } - } - ], "examples": [ { - "destinationType": "topic", - "topic": { - "objectName": "myTopicName" - }, - "bindingVersion": "0.1.0" - }, - { - "destinationType": "queue", - "queue": { - "objectName": "myQueueName", - "exclusive": true - }, - "bindingVersion": "0.1.0" + "destination": "user-signed-up", + "destinationType": "fifo-queue", + "bindingVersion": "0.0.1" } ] }, - "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { - "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "http://asyncapi.com/bindings/sns/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/sns/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4787,81 +5068,147 @@ } }, "properties": { - "bindingVersion": { + "name": { "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." + "description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations." }, - "labels": { - "type": "object" + "ordering": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/ordering" }, - "messageRetentionDuration": { - "type": "string" + "policy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/policy" }, - "messageStoragePolicy": { + "tags": { "type": "object", - "additionalProperties": false, - "properties": { - "allowedPersistenceRegions": { - "type": "array", - "items": { - "type": "string" + "description": "Key-value pairs that represent AWS tags on the topic." + }, + "bindingVersion": { + "type": "string", + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "name" + ], + "definitions": { + "ordering": { + "type": "object", + "description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "type": { + "type": "string", + "description": "Defines the type of SNS Topic.", + "enum": [ + "standard", + "FIFO" + ] + }, + "contentBasedDeduplication": { + "type": "boolean", + "description": "True to turn on de-duplication of messages for a channel." + } + }, + "required": [ + "type" + ] + }, + "policy": { + "type": "object", + "description": "The security policy for the SNS Topic.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this topic", + "items": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/channel.json#/definitions/statement" } } - } + }, + "required": [ + "statements" + ] }, - "schemaSettings": { + "statement": { "type": "object", - "additionalItems": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { - "encoding": { - "type": "string" - }, - "firstRevisionId": { - "type": "string" + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] }, - "lastRevisionId": { - "type": "string" + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, - "name": { - "type": "string" + "action": { + "description": "The SNS permission being allowed or denied e.g. sns:Publish", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] } }, "required": [ - "encoding", - "name" + "effect", + "principal", + "action" ] } }, - "required": [ - "schemaSettings" - ], "examples": [ { - "labels": { - "label1": "value1", - "label2": "value2" - }, - "messageRetentionDuration": "86400s", - "messageStoragePolicy": { - "allowedPersistenceRegions": [ - "us-central1", - "us-east1" + "name": "my-sns-topic", + "policy": { + "statements": [ + { + "effect": "Allow", + "principal": "*", + "action": "SNS:Publish" + } ] - }, - "schemaSettings": { - "encoding": "json", - "name": "projects/your-project-id/schemas/your-schema" } } ] }, - "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { - "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "http://asyncapi.com/bindings/sqs/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json", "title": "Channel Schema", - "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", + "description": "This object contains information about the channel representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -4869,125 +5216,609 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "required": [ - "namespace", - "persistence" - ], "properties": { - "namespace": { - "type": "string", - "description": "The namespace, the channel is associated with." + "queue": { + "description": "A definition of the queue that will be used as the channel.", + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" }, - "persistence": { + "deadLetterQueue": { + "description": "A definition of the queue that will be used for un-processable messages.", + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/queue" + }, + "bindingVersion": { "type": "string", "enum": [ - "persistent", - "non-persistent" + "0.1.0", + "0.2.0" ], - "description": "persistence of the topic in Pulsar." - }, - "compaction": { - "type": "integer", - "minimum": 0, - "description": "Topic compaction threshold given in MB" - }, - "geo-replication": { - "type": "array", - "description": "A list of clusters the topic is replicated to.", - "items": { - "type": "string" - } - }, - "retention": { + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" + } + }, + "required": [ + "queue" + ], + "definitions": { + "queue": { "type": "object", - "additionalProperties": false, + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, "properties": { - "time": { + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", "minimum": 0, - "description": "Time given in Minutes. `0` = Disable message retention." + "maximum": 15, + "default": 0 }, - "size": { + "visibilityTimeout": { "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", "minimum": 0, - "description": "Size given in MegaBytes. `0` = Disable message retention." + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." } - } - }, - "ttl": { - "type": "integer", - "description": "TTL in seconds for the specified topic" - }, - "deduplication": { - "type": "boolean", - "description": "Whether deduplication of events is enabled or not." + }, + "required": [ + "name", + "fifoQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "namespace": "ns1", - "persistence": "persistent", - "compaction": 1000, - "retention": { - "time": 15, - "size": 1000 + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "ttl": 360, - "geo-replication": [ - "us-west", - "us-east" - ], - "deduplication": true, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/definitions/3.0.0/operations.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" - } - ] - } - }, - "http://asyncapi.com/definitions/3.0.0/operation.json": { - "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "required": [ - "action", - "channel" - ], - "properties": { - "action": { - "type": "string", - "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", - "enum": [ - "send", - "receive" + "required": [ + "deadLetterQueue" ] }, - "channel": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/channel.json#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] + }, + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] + } + }, + "examples": [ + { + "queue": { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 15, + "visibilityTimeout": 60, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 86400, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + }, + "tags": { + "owner": "AsyncAPI.NET", + "platform": "AsyncAPIOrg" + } + }, + "deadLetterQueue": { + "name": "myQueue_error", + "deliveryDelay": 0, + "visibilityTimeout": 0, + "receiveMessageWaitTime": 0, + "messageRetentionPeriod": 604800 + } + } + ] + }, + "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/ibmmq/0.1.0/channel.json", + "title": "IBM MQ channel bindings object", + "description": "This object contains information about the channel representation in IBM MQ. Each channel corresponds to a Queue or Topic within IBM MQ.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "destinationType": { + "type": "string", + "enum": [ + "topic", + "queue" + ], + "default": "topic", + "description": "Defines the type of AsyncAPI channel." + }, + "queue": { + "type": "object", + "description": "Defines the properties of a queue.", + "properties": { + "objectName": { + "type": "string", + "maxLength": 48, + "description": "Defines the name of the IBM MQ queue associated with the channel." + }, + "isPartitioned": { + "type": "boolean", + "default": false, + "description": "Defines if the queue is a cluster queue and therefore partitioned. If 'true', a binding option MAY be specified when accessing the queue. More information on binding options can be found on this page in the IBM MQ Knowledge Center." + }, + "exclusive": { + "type": "boolean", + "default": false, + "description": "Specifies if it is recommended to open the queue exclusively." + } + }, + "required": [ + "objectName" + ] + }, + "topic": { + "type": "object", + "description": "Defines the properties of a topic.", + "properties": { + "string": { + "type": "string", + "maxLength": 10240, + "description": "The value of the IBM MQ topic string to be used." + }, + "objectName": { + "type": "string", + "maxLength": 48, + "description": "The name of the IBM MQ topic object." + }, + "durablePermitted": { + "type": "boolean", + "default": true, + "description": "Defines if the subscription may be durable." + }, + "lastMsgRetained": { + "type": "boolean", + "default": false, + "description": "Defines if the last message published will be made available to new subscriptions." + } + } + }, + "maxMsgLength": { + "type": "integer", + "minimum": 0, + "maximum": 104857600, + "description": "The maximum length of the physical message (in bytes) accepted by the Topic or Queue. Messages produced that are greater in size than this value may fail to be delivered. More information on the maximum message length can be found on this [page](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.ref.dev.doc/q097520_.html) in the IBM MQ Knowledge Center." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding." + } + }, + "oneOf": [ + { + "properties": { + "destinationType": { + "const": "topic" + } + }, + "not": { + "required": [ + "queue" + ] + } + }, + { + "properties": { + "destinationType": { + "const": "queue" + } + }, + "required": [ + "queue" + ], + "not": { + "required": [ + "topic" + ] + } + } + ], + "examples": [ + { + "destinationType": "topic", + "topic": { + "objectName": "myTopicName" + }, + "bindingVersion": "0.1.0" + }, + { + "destinationType": "queue", + "queue": { + "objectName": "myQueueName", + "exclusive": true + }, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json": { + "$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json", + "title": "Cloud Pub/Sub Channel Schema", + "description": "This object contains information about the channel representation for Google Cloud Pub/Sub.", + "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." + }, + "labels": { + "type": "object" + }, + "messageRetentionDuration": { + "type": "string" + }, + "messageStoragePolicy": { + "type": "object", + "additionalProperties": false, + "properties": { + "allowedPersistenceRegions": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "schemaSettings": { + "type": "object", + "additionalItems": false, + "properties": { + "encoding": { + "type": "string" + }, + "firstRevisionId": { + "type": "string" + }, + "lastRevisionId": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "encoding", + "name" + ] + } + }, + "required": [ + "schemaSettings" + ], + "examples": [ + { + "labels": { + "label1": "value1", + "label2": "value2" + }, + "messageRetentionDuration": "86400s", + "messageStoragePolicy": { + "allowedPersistenceRegions": [ + "us-central1", + "us-east1" + ] + }, + "schemaSettings": { + "encoding": "json", + "name": "projects/your-project-id/schemas/your-schema" + } + } + ] + }, + "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json": { + "$id": "http://asyncapi.com/bindings/pulsar/0.1.0/channel.json", + "title": "Channel Schema", + "description": "This object contains information about the channel representation in Pulsar, which covers namespace and topic level admin configuration. This object contains additional 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" + } + }, + "required": [ + "namespace", + "persistence" + ], + "properties": { + "namespace": { + "type": "string", + "description": "The namespace, the channel is associated with." + }, + "persistence": { + "type": "string", + "enum": [ + "persistent", + "non-persistent" + ], + "description": "persistence of the topic in Pulsar." + }, + "compaction": { + "type": "integer", + "minimum": 0, + "description": "Topic compaction threshold given in MB" + }, + "geo-replication": { + "type": "array", + "description": "A list of clusters the topic is replicated to.", + "items": { + "type": "string" + } + }, + "retention": { + "type": "object", + "additionalProperties": false, + "properties": { + "time": { + "type": "integer", + "minimum": 0, + "description": "Time given in Minutes. `0` = Disable message retention." + }, + "size": { + "type": "integer", + "minimum": 0, + "description": "Size given in MegaBytes. `0` = Disable message retention." + } + } + }, + "ttl": { + "type": "integer", + "description": "TTL in seconds for the specified topic" + }, + "deduplication": { + "type": "boolean", + "description": "Whether deduplication of events is enabled or not." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.1.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "namespace": "ns1", + "persistence": "persistent", + "compaction": 1000, + "retention": { + "time": 15, + "size": 1000 + }, + "ttl": 360, + "geo-replication": [ + "us-west", + "us-east" + ], + "deduplication": true, + "bindingVersion": "0.1.0" + } + ] + }, + "http://asyncapi.com/definitions/3.0.0/operations.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" + } + ] + } + }, + "http://asyncapi.com/definitions/3.0.0/operation.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "required": [ + "action", + "channel" + ], + "properties": { + "action": { + "type": "string", + "description": "Allowed values are send and receive. Use send when it's expected that the application will send a message to the given channel, and receive when the application should expect receiving messages from the given channel.", + "enum": [ + "send", + "receive" + ] + }, + "channel": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, "messages": { "type": "array", "items": { @@ -5282,23 +6113,93 @@ ], "properties": { "bindingVersion": { - "const": "0.2.0" + "const": "0.2.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" + } + } + ] + }, + "mqtt5": {}, + "kafka": { + "properties": { + "bindingVersion": { + "enum": [ + "0.4.0", + "0.3.0", + "0.1.0" + ] + } + }, + "allOf": [ + { + "description": "If no bindingVersion specified, use the latest binding", + "if": { + "not": { + "required": [ + "bindingVersion" + ] + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.4.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.3.0" + } + } + }, + "then": { + "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + } + }, + { + "if": { + "required": [ + "bindingVersion" + ], + "properties": { + "bindingVersion": { + "const": "0.1.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json" + "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" } } ] }, - "mqtt5": {}, - "kafka": { + "anypointmq": {}, + "nats": { "properties": { "bindingVersion": { "enum": [ - "0.4.0", - "0.3.0", "0.1.0" ] } @@ -5314,7 +6215,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" } }, { @@ -5324,27 +6225,37 @@ ], "properties": { "bindingVersion": { - "const": "0.4.0" + "const": "0.1.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json" + "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" } - }, + } + ] + }, + "jms": {}, + "sns": { + "properties": { + "bindingVersion": { + "enum": [ + "0.1.0" + ] + } + }, + "allOf": [ { + "description": "If no bindingVersion specified, use the latest binding", "if": { - "required": [ - "bindingVersion" - ], - "properties": { - "bindingVersion": { - "const": "0.3.0" - } + "not": { + "required": [ + "bindingVersion" + ] } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" } }, { @@ -5359,17 +6270,16 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json" } } ] }, - "anypointmq": {}, - "nats": { + "sqs": { "properties": { "bindingVersion": { "enum": [ - "0.1.0" + "0.2.0" ] } }, @@ -5384,7 +6294,7 @@ } }, "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" } }, { @@ -5394,19 +6304,16 @@ ], "properties": { "bindingVersion": { - "const": "0.1.0" + "const": "0.2.0" } } }, "then": { - "$ref": "http://asyncapi.com/bindings/nats/0.1.0/operation.json" + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json" } } ] }, - "jms": {}, - "sns": {}, - "sqs": {}, "stomp": {}, "redis": {}, "ibmmq": {}, @@ -5541,14 +6448,228 @@ }, "additionalProperties": false }, - "bindingVersion": "0.2.0" + "bindingVersion": "0.2.0" + } + ] + }, + "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { + "$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" + } + ] + }, + "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { + "$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" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.4.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.4.0" + } + ] + }, + "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "title": "Operation Schema", + "description": "This object contains information about the operation representation in Kafka.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." + }, + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." + }, + "bindingVersion": { + "type": "string", + "enum": [ + "0.3.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + } + }, + "examples": [ + { + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.3.0" } ] }, - "http://asyncapi.com/bindings/amqp/0.3.0/operation.json": { - "$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.", + "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", + "title": "Kafka operation message bindings object", + "description": "This object contains information about the operation representation in Kafka.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5557,84 +6678,44 @@ } }, "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." + "groupId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer group." }, - "ack": { - "type": "boolean", - "description": "Whether the consumer should ack the message or not." + "clientId": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "Id of the consumer inside a consumer group." }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0" ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." + "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" + "groupId": { + "type": "string", + "enum": [ + "myGroupId" + ] + }, + "clientId": { + "type": "string", + "enum": [ + "myClientId" + ] + }, + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/mqtt/0.2.0/operation.json": { - "$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.", + "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", + "title": "NATS operation bindings object", + "description": "This object contains information about the operation representation in NATS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5643,34 +6724,30 @@ } }, "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." + "queue": { + "type": "string", + "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", + "maxLength": 255 }, "bindingVersion": { "type": "string", "enum": [ - "0.2.0" + "0.1.0" ], "description": "The version of this binding. If omitted, 'latest' MUST be assumed." } }, "examples": [ { - "qos": 2, - "retain": true, - "bindingVersion": "0.2.0" + "queue": "MyCustomQueue", + "bindingVersion": "0.1.0" } ] }, - "http://asyncapi.com/bindings/kafka/0.4.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.4.0/operation.json", + "http://asyncapi.com/bindings/sns/0.1.0/operation.json": { + "$id": "http://asyncapi.com/bindings/sns/0.1.0/operation.json", "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SNS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5679,44 +6756,270 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "topic": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", + "description": "Often we can assume that the SNS Topic is the channel name-we provide this field in case the you need to supply the ARN, or the Topic name is not the channel name in the AsyncAPI document." }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "consumers": { + "type": "array", + "description": "The protocols that listen to this topic and their endpoints.", + "items": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/consumer" + }, + "minItems": 1 + }, + "deliveryPolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The field is the default for HTTP receivers of the SNS Topic which may be overridden by a specific consumer." }, "bindingVersion": { "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding.", + "default": "latest" + } + }, + "required": [ + "consumers" + ], + "definitions": { + "identifier": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "url": { + "type": "string", + "description": "The endpoint is a URL." + }, + "email": { + "type": "string", + "description": "The endpoint is an email address." + }, + "phone": { + "type": "string", + "description": "The endpoint is a phone number." + }, + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding. We don't use $ref because we are referring, not including." + } + } + }, + "consumer": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "protocol": { + "description": "The protocol that this endpoint receives messages by.", + "type": "string", + "enum": [ + "http", + "https", + "email", + "email-json", + "sms", + "sqs", + "application", + "lambda", + "firehose" + ] + }, + "endpoint": { + "description": "The endpoint messages are delivered to.", + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier" + }, + "filterPolicy": { + "type": "object", + "description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "additionalProperties": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + }, + { + "type": "object" + } + ] + } + }, + "filterPolicyScope": { + "type": "string", + "description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.", + "enum": [ + "MessageAttributes", + "MessageBody" + ], + "default": "MessageAttributes" + }, + "rawMessageDelivery": { + "type": "boolean", + "description": "If true AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If false the SNS attributes are included in the body." + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/redrivePolicy" + }, + "deliveryPolicy": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/deliveryPolicy", + "description": "Policy for retries to HTTP. The parameter is for that SNS Subscription and overrides any policy on the SNS Topic." + }, + "displayName": { + "type": "string", + "description": "The display name to use with an SNS subscription" + } + }, + "required": [ + "protocol", + "endpoint", + "rawMessageDelivery" + ] + }, + "deliveryPolicy": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "minDelayTarget": { + "type": "integer", + "description": "The minimum delay for a retry in seconds." + }, + "maxDelayTarget": { + "type": "integer", + "description": "The maximum delay for a retry in seconds." + }, + "numRetries": { + "type": "integer", + "description": "The total number of retries, including immediate, pre-backoff, backoff, and post-backoff retries." + }, + "numNoDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with no delay)." + }, + "numMinDelayRetries": { + "type": "integer", + "description": "The number of immediate retries (with delay)." + }, + "numMaxDelayRetries": { + "type": "integer", + "description": "The number of post-backoff phase retries, with the maximum delay between retries." + }, + "backoffFunction": { + "type": "string", + "description": "The algorithm for backoff between retries.", + "enum": [ + "arithmetic", + "exponential", + "geometric", + "linear" + ] + }, + "maxReceivesPerSecond": { + "type": "integer", + "description": "The maximum number of deliveries per second, per subscription." + } + } + }, + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sns/0.1.0/operation.json#/definitions/identifier", + "description": "The SQS queue to use as a dead letter queue (DLQ)." + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] } }, "examples": [ { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] - }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "topic": { + "name": "someTopic" }, - "bindingVersion": "0.4.0" + "consumers": [ + { + "protocol": "sqs", + "endpoint": { + "name": "someQueue" + }, + "filterPolicy": { + "store": [ + "asyncapi_corp" + ], + "event": [ + { + "anything-but": "order_cancelled" + } + ], + "customer_interests": [ + "rugby", + "football", + "baseball" + ] + }, + "filterPolicyScope": "MessageAttributes", + "rawMessageDelivery": false, + "redrivePolicy": { + "deadLetterQueue": { + "arn": "arn:aws:SQS:eu-west-1:0000000:123456789" + }, + "maxReceiveCount": 25 + }, + "deliveryPolicy": { + "minDelayTarget": 10, + "maxDelayTarget": 100, + "numRetries": 5, + "numNoDelayRetries": 2, + "numMinDelayRetries": 3, + "numMaxDelayRetries": 5, + "backoffFunction": "linear", + "maxReceivesPerSecond": 2 + } + } + ] } ] }, - "http://asyncapi.com/bindings/kafka/0.3.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.3.0/operation.json", + "http://asyncapi.com/bindings/sqs/0.2.0/operation.json": { + "$id": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json", "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", + "description": "This object contains information about the operation representation in SQS.", "type": "object", "additionalProperties": false, "patternProperties": { @@ -5725,115 +7028,254 @@ } }, "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "queues": { + "type": "array", + "description": "Queue objects that are either the endpoint for an SNS Operation Binding Object, or the deadLetterQueue of the SQS Operation Binding Object.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/queue" + } }, "bindingVersion": { "type": "string", "enum": [ - "0.3.0" + "0.1.0", + "0.2.0" ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", + "default": "latest" } }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "required": [ + "queues" + ], + "definitions": { + "queue": { + "type": "object", + "description": "A definition of a queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "$ref": { + "type": "string", + "description": "Allows for an external definition of a queue. The referenced structure MUST be in the format of a Queue. If there are conflicts between the referenced definition and this Queue's definition, the behavior is undefined." + }, + "name": { + "type": "string", + "description": "The name of the queue. When an SNS Operation Binding Object references an SQS queue by name, the identifier should be the one in this field." + }, + "fifoQueue": { + "type": "boolean", + "description": "Is this a FIFO queue?", + "default": false + }, + "deduplicationScope": { + "type": "string", + "enum": [ + "queue", + "messageGroup" + ], + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "enum": [ + "perQueue", + "perMessageGroupId" + ], + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, + "deliveryDelay": { + "type": "integer", + "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", + "minimum": 0, + "maximum": 15, + "default": 0 + }, + "visibilityTimeout": { + "type": "integer", + "description": "The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again.", + "minimum": 0, + "maximum": 43200, + "default": 30 + }, + "receiveMessageWaitTime": { + "type": "integer", + "description": "Determines if the queue uses short polling or long polling. Set to zero the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning.", + "default": 0 + }, + "messageRetentionPeriod": { + "type": "integer", + "description": "How long to retain a message on the queue in seconds, unless deleted.", + "minimum": 60, + "maximum": 1209600, + "default": 345600 + }, + "redrivePolicy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/redrivePolicy" + }, + "policy": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/policy" + }, + "tags": { + "type": "object", + "description": "Key-value pairs that represent AWS tags on the queue." + } }, - "bindingVersion": "0.3.0" - } - ] - }, - "http://asyncapi.com/bindings/kafka/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/kafka/0.1.0/operation.json", - "title": "Kafka operation message bindings object", - "description": "This object contains information about the operation representation in Kafka.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "groupId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer group." + "required": [ + "name" + ] }, - "clientId": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json", - "description": "Id of the consumer inside a consumer group." + "redrivePolicy": { + "type": "object", + "description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "deadLetterQueue": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/identifier" + }, + "maxReceiveCount": { + "type": "integer", + "description": "The number of times a message is delivered to the source queue before being moved to the dead-letter queue.", + "default": 10 + } + }, + "required": [ + "deadLetterQueue" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "groupId": { - "type": "string", - "enum": [ - "myGroupId" - ] + "identifier": { + "type": "object", + "description": "The SQS queue to use as a dead letter queue (DLQ).", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "clientId": { - "type": "string", - "enum": [ - "myClientId" - ] + "properties": { + "arn": { + "type": "string", + "description": "The target is an ARN. For example, for SQS, the identifier may be an ARN, which will be of the form: arn:aws:sqs:{region}:{account-id}:{queueName}" + }, + "name": { + "type": "string", + "description": "The endpoint is identified by a name, which corresponds to an identifying field called 'name' of a binding for that protocol on this publish Operation Object. For example, if the protocol is 'sqs' then the name refers to the name field sqs binding." + } + } + }, + "policy": { + "type": "object", + "description": "The security policy for the SQS Queue", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "bindingVersion": "0.1.0" - } - ] - }, - "http://asyncapi.com/bindings/nats/0.1.0/operation.json": { - "$id": "http://asyncapi.com/bindings/nats/0.1.0/operation.json", - "title": "NATS operation bindings object", - "description": "This object contains information about the operation representation in NATS.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "queue": { - "type": "string", - "description": "Defines the name of the queue to use. It MUST NOT exceed 255 characters.", - "maxLength": 255 + "properties": { + "statements": { + "type": "array", + "description": "An array of statement objects, each of which controls a permission for this queue.", + "items": { + "$ref": "http://asyncapi.com/bindings/sqs/0.2.0/operation.json#/definitions/statement" + } + } + }, + "required": [ + "statements" + ] }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." + "statement": { + "type": "object", + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "effect": { + "type": "string", + "enum": [ + "Allow", + "Deny" + ] + }, + "principal": { + "description": "The AWS account or resource ARN that this statement applies to.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "action": { + "description": "The SQS permission being allowed or denied e.g. sqs:ReceiveMessage", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "required": [ + "effect", + "principal", + "action" + ] } }, "examples": [ { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" + "queues": [ + { + "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", + "deliveryDelay": 10, + "redrivePolicy": { + "deadLetterQueue": { + "name": "myQueue_error" + }, + "maxReceiveCount": 15 + }, + "policy": { + "statements": [ + { + "effect": "Deny", + "principal": "arn:aws:iam::123456789012:user/dec.kolakowski", + "action": [ + "sqs:SendMessage", + "sqs:ReceiveMessage" + ] + } + ] + } + }, + { + "name": "myQueue_error", + "deliveryDelay": 10 + } + ] } ] }, From 75459f2163c55ed669fd6a4cd5681a8c709e030c Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Tue, 21 Nov 2023 02:58:46 -0600 Subject: [PATCH 18/19] feat: add object descriptions and examples (#425) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>%0ACo-authored-by: Florent Baldino %0ACo-authored-by: asyncapi-bot --- .../3.0.0/APIKeyHTTPSecurityScheme.json | 11 +- .../3.0.0/BearerHTTPSecurityScheme.json | 8 +- .../3.0.0/NonBearerHTTPSecurityScheme.json | 8 +- definitions/3.0.0/Reference.json | 5 + .../3.0.0/SaslGssapiSecurityScheme.json | 7 +- .../3.0.0/SaslPlainSecurityScheme.json | 9 +- .../3.0.0/SaslScramSecurityScheme.json | 9 +- definitions/3.0.0/SecurityScheme.json | 4 + definitions/3.0.0/X509.json | 5 +- definitions/3.0.0/anySchema.json | 30 +-- definitions/3.0.0/apiKey.json | 10 +- definitions/3.0.0/asymmetricEncryption.json | 4 +- definitions/3.0.0/asyncapi.json | 3 +- definitions/3.0.0/channel.json | 31 +-- definitions/3.0.0/channelBindingsObject.json | 1 + definitions/3.0.0/channels.json | 14 +- definitions/3.0.0/components.json | 23 +- definitions/3.0.0/contact.json | 7 +- definitions/3.0.0/correlationId.json | 6 +- definitions/3.0.0/externalDocs.json | 11 +- definitions/3.0.0/info.json | 6 +- definitions/3.0.0/license.json | 11 +- definitions/3.0.0/messageBindingsObject.json | 1 + definitions/3.0.0/messageObject.json | 11 +- definitions/3.0.0/messageTrait.json | 10 +- definitions/3.0.0/multiFormatSchema.json | 6 +- definitions/3.0.0/oauth2Flow.json | 18 +- definitions/3.0.0/oauth2Flows.json | 11 +- definitions/3.0.0/openIdConnect.json | 9 +- definitions/3.0.0/operation.json | 9 +- .../3.0.0/operationBindingsObject.json | 1 + definitions/3.0.0/operationReply.json | 2 + definitions/3.0.0/operationReplyAddress.json | 6 +- definitions/3.0.0/operationTrait.json | 15 +- definitions/3.0.0/operations.json | 6 +- definitions/3.0.0/parameter.json | 12 +- definitions/3.0.0/parameters.json | 5 +- definitions/3.0.0/schema.json | 5 +- definitions/3.0.0/server.json | 49 ++-- definitions/3.0.0/serverBindingsObject.json | 1 + definitions/3.0.0/serverVariable.json | 35 +-- definitions/3.0.0/servers.json | 7 +- definitions/3.0.0/symmetricEncryption.json | 5 +- definitions/3.0.0/tag.json | 12 +- definitions/3.0.0/userPassword.json | 5 +- examples/3.0.0/APIKeyHTTPSecurityScheme.json | 7 + examples/3.0.0/ReferenceObject.json | 3 + examples/3.0.0/Sasl.json | 5 + examples/3.0.0/SecurityScheme.json | 5 + examples/3.0.0/X509.json | 5 + examples/3.0.0/apiKey.json | 6 + examples/3.0.0/channel.json | 40 ++++ examples/3.0.0/channels.json | 12 + examples/3.0.0/components.json | 130 +++++++++++ examples/3.0.0/contact.json | 8 + examples/3.0.0/correlationId.json | 4 + examples/3.0.0/externalDocs.json | 4 + examples/3.0.0/info.json | 27 +++ examples/3.0.0/license.json | 7 + examples/3.0.0/messageObject.json | 58 +++++ examples/3.0.0/messageTrait.json | 3 + examples/3.0.0/oauth2Flow.json | 8 + examples/3.0.0/operation.json | 31 +++ examples/3.0.0/operationReplyAddress.json | 4 + examples/3.0.0/operationTrait.json | 7 + examples/3.0.0/operations.json | 18 ++ examples/3.0.0/parameter.json | 9 + examples/3.0.0/parameters.json | 8 + examples/3.0.0/server.json | 14 ++ examples/3.0.0/serverVariable.json | 14 ++ examples/3.0.0/servers.json | 38 ++++ examples/3.0.0/symmetricEncryption.json | 3 + examples/3.0.0/tag.json | 4 + examples/3.0.0/userPassword.json | 5 + package-lock.json | 210 ++++++++++++++---- 75 files changed, 990 insertions(+), 171 deletions(-) create mode 100644 examples/3.0.0/APIKeyHTTPSecurityScheme.json create mode 100644 examples/3.0.0/ReferenceObject.json create mode 100644 examples/3.0.0/Sasl.json create mode 100644 examples/3.0.0/SecurityScheme.json create mode 100644 examples/3.0.0/X509.json create mode 100644 examples/3.0.0/apiKey.json create mode 100644 examples/3.0.0/channel.json create mode 100644 examples/3.0.0/channels.json create mode 100644 examples/3.0.0/components.json create mode 100644 examples/3.0.0/contact.json create mode 100644 examples/3.0.0/correlationId.json create mode 100644 examples/3.0.0/externalDocs.json create mode 100644 examples/3.0.0/info.json create mode 100644 examples/3.0.0/license.json create mode 100644 examples/3.0.0/messageObject.json create mode 100644 examples/3.0.0/messageTrait.json create mode 100644 examples/3.0.0/oauth2Flow.json create mode 100644 examples/3.0.0/operation.json create mode 100644 examples/3.0.0/operationReplyAddress.json create mode 100644 examples/3.0.0/operationTrait.json create mode 100644 examples/3.0.0/operations.json create mode 100644 examples/3.0.0/parameter.json create mode 100644 examples/3.0.0/parameters.json create mode 100644 examples/3.0.0/server.json create mode 100644 examples/3.0.0/serverVariable.json create mode 100644 examples/3.0.0/servers.json create mode 100644 examples/3.0.0/symmetricEncryption.json create mode 100644 examples/3.0.0/tag.json create mode 100644 examples/3.0.0/userPassword.json diff --git a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json index d1472015..33dee593 100644 --- a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json +++ b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json @@ -8,15 +8,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -24,7 +27,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -32,6 +36,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/APIKeyHTTPSecurityScheme.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" diff --git a/definitions/3.0.0/BearerHTTPSecurityScheme.json b/definitions/3.0.0/BearerHTTPSecurityScheme.json index 7a247c3a..3f71902b 100644 --- a/definitions/3.0.0/BearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/BearerHTTPSecurityScheme.json @@ -7,21 +7,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { diff --git a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json index eeadb2d8..3f1a8d76 100644 --- a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json @@ -4,6 +4,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -17,13 +18,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] diff --git a/definitions/3.0.0/Reference.json b/definitions/3.0.0/Reference.json index f9e9893a..78f41b69 100644 --- a/definitions/3.0.0/Reference.json +++ b/definitions/3.0.0/Reference.json @@ -1,13 +1,18 @@ { "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/ReferenceObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json" } \ No newline at end of file diff --git a/definitions/3.0.0/SaslGssapiSecurityScheme.json b/definitions/3.0.0/SaslGssapiSecurityScheme.json index f3ef3f35..eb65dcc8 100644 --- a/definitions/3.0.0/SaslGssapiSecurityScheme.json +++ b/definitions/3.0.0/SaslGssapiSecurityScheme.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" diff --git a/definitions/3.0.0/SaslPlainSecurityScheme.json b/definitions/3.0.0/SaslPlainSecurityScheme.json index 6de1b832..e461874f 100644 --- a/definitions/3.0.0/SaslPlainSecurityScheme.json +++ b/definitions/3.0.0/SaslPlainSecurityScheme.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -19,7 +21,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/SaslScramSecurityScheme.json b/definitions/3.0.0/SaslScramSecurityScheme.json index b7b9fc36..6d1f850b 100644 --- a/definitions/3.0.0/SaslScramSecurityScheme.json +++ b/definitions/3.0.0/SaslScramSecurityScheme.json @@ -6,13 +6,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -20,7 +22,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/SecurityScheme.json b/definitions/3.0.0/SecurityScheme.json index ee6b9f70..83573217 100644 --- a/definitions/3.0.0/SecurityScheme.json +++ b/definitions/3.0.0/SecurityScheme.json @@ -1,4 +1,5 @@ { + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" @@ -28,6 +29,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } ], + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/SecurityScheme.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" } \ No newline at end of file diff --git a/definitions/3.0.0/X509.json b/definitions/3.0.0/X509.json index 059a1ca0..004db984 100644 --- a/definitions/3.0.0/X509.json +++ b/definitions/3.0.0/X509.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/X509.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/X509.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/anySchema.json b/definitions/3.0.0/anySchema.json index e8e2cb7f..4a0bf239 100644 --- a/definitions/3.0.0/anySchema.json +++ b/definitions/3.0.0/anySchema.json @@ -1,16 +1,16 @@ { - "if": { - "required": [ - "schema" - ] - }, - "then": { - "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" - }, - "else": { - "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" - }, - "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" -} \ No newline at end of file + "if": { + "required": [ + "schema" + ] + }, + "then": { + "$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" + }, + "else": { + "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" + }, + "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" +} diff --git a/definitions/3.0.0/apiKey.json b/definitions/3.0.0/apiKey.json index dd4b8af8..daec7eaf 100644 --- a/definitions/3.0.0/apiKey.json +++ b/definitions/3.0.0/apiKey.json @@ -7,19 +7,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -27,7 +30,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/apiKey.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/asymmetricEncryption.json b/definitions/3.0.0/asymmetricEncryption.json index 58ef8eb1..b52c5dff 100644 --- a/definitions/3.0.0/asymmetricEncryption.json +++ b/definitions/3.0.0/asymmetricEncryption.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 18a6c39d..0af21643 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -31,7 +31,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index b42c9ae7..35567b6d 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -39,26 +40,27 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } ] }, "bindings": { @@ -72,6 +74,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channel.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channel.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 21ba2f2c..5c5e737f 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json index a4f4e89d..4169cfc3 100644 --- a/definitions/3.0.0/channels.json +++ b/definitions/3.0.0/channels.json @@ -1,15 +1,19 @@ { "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channels.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 537c49bd..2d7b5e2f 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -10,6 +10,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -25,6 +26,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -40,6 +42,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -55,6 +58,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -85,6 +89,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -100,6 +105,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -115,6 +121,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -130,6 +137,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -145,6 +153,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -160,6 +169,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -175,6 +185,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -190,6 +201,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -205,6 +217,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -220,6 +233,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -235,6 +249,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -250,6 +265,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -265,6 +281,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -280,6 +297,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -294,6 +312,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/components.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" } diff --git a/definitions/3.0.0/contact.json b/definitions/3.0.0/contact.json index ec226020..5356d4e2 100644 --- a/definitions/3.0.0/contact.json +++ b/definitions/3.0.0/contact.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -23,6 +23,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/contact.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/contact.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/correlationId.json b/definitions/3.0.0/correlationId.json index 03d0a514..18aa99a2 100644 --- a/definitions/3.0.0/correlationId.json +++ b/definitions/3.0.0/correlationId.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -20,6 +21,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/correlationId.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/externalDocs.json b/definitions/3.0.0/externalDocs.json index 0a20754f..3ab83718 100644 --- a/definitions/3.0.0/externalDocs.json +++ b/definitions/3.0.0/externalDocs.json @@ -1,16 +1,18 @@ { "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/externalDocs.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json index bf8c1491..6c9b70fa 100644 --- a/definitions/3.0.0/info.json +++ b/definitions/3.0.0/info.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -37,6 +37,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -60,6 +61,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/info.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/info.json" } \ No newline at end of file diff --git a/definitions/3.0.0/license.json b/definitions/3.0.0/license.json index 391692c9..06a5518e 100644 --- a/definitions/3.0.0/license.json +++ b/definitions/3.0.0/license.json @@ -1,8 +1,6 @@ { "type": "object", - "required": [ - "name" - ], + "required": ["name"], "additionalProperties": false, "properties": { "name": { @@ -17,9 +15,12 @@ }, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/license.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/license.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index cfe65074..abfe27bd 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index f3de84ef..3c35a299 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,7 +9,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -72,6 +74,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -118,6 +121,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -149,6 +153,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index e3aeae2f..587d140b 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,7 +9,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -69,6 +71,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -84,6 +87,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageTrait.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index fa993a10..d4047bb0 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -1,4 +1,5 @@ { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -17,6 +18,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -48,7 +50,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { diff --git a/definitions/3.0.0/oauth2Flow.json b/definitions/3.0.0/oauth2Flow.json index d3ca471b..ef1e7c95 100644 --- a/definitions/3.0.0/oauth2Flow.json +++ b/definitions/3.0.0/oauth2Flow.json @@ -1,20 +1,25 @@ { "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -22,7 +27,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/oauth2Flow.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/oauth2Flows.json b/definitions/3.0.0/oauth2Flows.json index 735806c8..3cb9cecf 100644 --- a/definitions/3.0.0/oauth2Flows.json +++ b/definitions/3.0.0/oauth2Flows.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -7,17 +8,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -38,6 +42,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -58,6 +63,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -78,6 +84,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -109,4 +116,4 @@ }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/openIdConnect.json b/definitions/3.0.0/openIdConnect.json index 2150ba4d..41b65f5d 100644 --- a/definitions/3.0.0/openIdConnect.json +++ b/definitions/3.0.0/openIdConnect.json @@ -7,20 +7,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 2ef195a3..529cfbc5 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -21,6 +22,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -37,6 +39,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -65,6 +68,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -98,6 +102,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operation.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operation.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 8f629437..32f50c75 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/operationReply.json b/definitions/3.0.0/operationReply.json index 2cf7c0e9..fe1491d9 100644 --- a/definitions/3.0.0/operationReply.json +++ b/definitions/3.0.0/operationReply.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -22,6 +23,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } diff --git a/definitions/3.0.0/operationReplyAddress.json b/definitions/3.0.0/operationReplyAddress.json index dd7d0e2c..ba29ea12 100644 --- a/definitions/3.0.0/operationReplyAddress.json +++ b/definitions/3.0.0/operationReplyAddress.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -20,6 +21,9 @@ "description": "An optional description of the address. CommonMark is allowed." } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationReplyAddress.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 2a31835f..b646001f 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -1,5 +1,6 @@ -{ +{ "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,24 +9,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" @@ -36,6 +44,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationTrait.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/operations.json b/definitions/3.0.0/operations.json index 7d44877f..7ca51c39 100644 --- a/definitions/3.0.0/operations.json +++ b/definitions/3.0.0/operations.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -10,6 +11,9 @@ } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operations.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operations.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/parameter.json b/definitions/3.0.0/parameter.json index f483a9c9..996b6817 100644 --- a/definitions/3.0.0/parameter.json +++ b/definitions/3.0.0/parameter.json @@ -1,4 +1,5 @@ { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -11,18 +12,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -34,6 +35,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameter.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/parameters.json b/definitions/3.0.0/parameters.json index 19193781..406e7a53 100644 --- a/definitions/3.0.0/parameters.json +++ b/definitions/3.0.0/parameters.json @@ -11,6 +11,9 @@ ] }, "description": "JSON objects describing re-usable channel parameters.", + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameters.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/schema.json b/definitions/3.0.0/schema.json index 7f08ab44..054bbc9b 100644 --- a/definitions/3.0.0/schema.json +++ b/definitions/3.0.0/schema.json @@ -1,4 +1,5 @@ { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" @@ -81,7 +82,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -95,6 +97,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index c875979b..f51dc063 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -1,24 +1,21 @@ { "type": "object", - "description": "An object representing a Server.", - "required": [ - "host", - "protocol" - ], + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", + "required": ["host", "protocol"], "additionalProperties": false, - "patternProperties": { + "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "properties": { + "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -34,10 +31,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" @@ -49,24 +47,24 @@ "type": "array", "items": { "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] }, "uniqueItems": true }, "externalDocs": { "oneOf": [ { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } ] }, "bindings": { @@ -80,6 +78,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/server.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/server.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 5782a1c5..8eb72002 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/serverVariable.json b/definitions/3.0.0/serverVariable.json index 9ef8f966..1bcc5090 100644 --- a/definitions/3.0.0/serverVariable.json +++ b/definitions/3.0.0/serverVariable.json @@ -10,24 +10,31 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, - "uniqueItems": true + "uniqueItems": true }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - }, - "examples": { - "type": "array", - "items": { - "type": "string" - } - } + "default": { + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." + }, + "description": { + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." + }, + "examples": { + "type": "array", + "description": "An array of examples of the server variable.", + "items": { + "type": "string" + } + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/serverVariable.json" }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/servers.json b/definitions/3.0.0/servers.json index 921b4ed4..9c6e9486 100644 --- a/definitions/3.0.0/servers.json +++ b/definitions/3.0.0/servers.json @@ -7,10 +7,13 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/servers.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/servers.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/symmetricEncryption.json b/definitions/3.0.0/symmetricEncryption.json index 4fb69278..5cc61ef2 100644 --- a/definitions/3.0.0/symmetricEncryption.json +++ b/definitions/3.0.0/symmetricEncryption.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/symmetricEncryption.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/tag.json b/definitions/3.0.0/tag.json index 135fd63b..2e5ab3ea 100644 --- a/definitions/3.0.0/tag.json +++ b/definitions/3.0.0/tag.json @@ -1,15 +1,18 @@ { "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -27,6 +30,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/tag.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/tag.json" -} \ No newline at end of file +} diff --git a/definitions/3.0.0/userPassword.json b/definitions/3.0.0/userPassword.json index aeaa22d0..21a2b65a 100644 --- a/definitions/3.0.0/userPassword.json +++ b/definitions/3.0.0/userPassword.json @@ -19,7 +19,10 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/userPassword.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json" -} \ No newline at end of file +} diff --git a/examples/3.0.0/APIKeyHTTPSecurityScheme.json b/examples/3.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..e1bddc93 --- /dev/null +++ b/examples/3.0.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,7 @@ +[ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } +] \ No newline at end of file diff --git a/examples/3.0.0/ReferenceObject.json b/examples/3.0.0/ReferenceObject.json new file mode 100644 index 00000000..1bc58e64 --- /dev/null +++ b/examples/3.0.0/ReferenceObject.json @@ -0,0 +1,3 @@ +[{ + "$ref": "#/components/schemas/Pet" +}] \ No newline at end of file diff --git a/examples/3.0.0/Sasl.json b/examples/3.0.0/Sasl.json new file mode 100644 index 00000000..85ea380b --- /dev/null +++ b/examples/3.0.0/Sasl.json @@ -0,0 +1,5 @@ +[ + { + "type": "scramSha512" + } +] \ No newline at end of file diff --git a/examples/3.0.0/SecurityScheme.json b/examples/3.0.0/SecurityScheme.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/SecurityScheme.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file diff --git a/examples/3.0.0/X509.json b/examples/3.0.0/X509.json new file mode 100644 index 00000000..690ba0a2 --- /dev/null +++ b/examples/3.0.0/X509.json @@ -0,0 +1,5 @@ +[ + { + "type": "X509" + } +] \ No newline at end of file diff --git a/examples/3.0.0/apiKey.json b/examples/3.0.0/apiKey.json new file mode 100644 index 00000000..5ae19cc0 --- /dev/null +++ b/examples/3.0.0/apiKey.json @@ -0,0 +1,6 @@ +[ + { + "type": "apiKey", + "in": "user" + } +] diff --git a/examples/3.0.0/channel.json b/examples/3.0.0/channel.json new file mode 100644 index 00000000..0fc0dab0 --- /dev/null +++ b/examples/3.0.0/channel.json @@ -0,0 +1,40 @@ +[{ + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { "$ref": "#/servers/rabbitmqInProd" }, + { "$ref": "#/servers/rabbitmqInStaging" } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/channels.json b/examples/3.0.0/channels.json new file mode 100644 index 00000000..b9aeb6a6 --- /dev/null +++ b/examples/3.0.0/channels.json @@ -0,0 +1,12 @@ +[ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } +] diff --git a/examples/3.0.0/components.json b/examples/3.0.0/components.json new file mode 100644 index 00000000..c0331a88 --- /dev/null +++ b/examples/3.0.0/components.json @@ -0,0 +1,130 @@ +[{ + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": ["5671", "5672"], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/contact.json b/examples/3.0.0/contact.json new file mode 100644 index 00000000..1c81a963 --- /dev/null +++ b/examples/3.0.0/contact.json @@ -0,0 +1,8 @@ +[ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/correlationId.json b/examples/3.0.0/correlationId.json new file mode 100644 index 00000000..82d8a96e --- /dev/null +++ b/examples/3.0.0/correlationId.json @@ -0,0 +1,4 @@ +[{ + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" +}] \ No newline at end of file diff --git a/examples/3.0.0/externalDocs.json b/examples/3.0.0/externalDocs.json new file mode 100644 index 00000000..18c3766a --- /dev/null +++ b/examples/3.0.0/externalDocs.json @@ -0,0 +1,4 @@ +[{ + "description": "Find more info here", + "url": "https://example.com" +}] \ No newline at end of file diff --git a/examples/3.0.0/info.json b/examples/3.0.0/info.json new file mode 100644 index 00000000..26bcdf95 --- /dev/null +++ b/examples/3.0.0/info.json @@ -0,0 +1,27 @@ +[ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + +] \ No newline at end of file diff --git a/examples/3.0.0/license.json b/examples/3.0.0/license.json new file mode 100644 index 00000000..18becf4f --- /dev/null +++ b/examples/3.0.0/license.json @@ -0,0 +1,7 @@ +[ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/messageObject.json b/examples/3.0.0/messageObject.json new file mode 100644 index 00000000..9243d026 --- /dev/null +++ b/examples/3.0.0/messageObject.json @@ -0,0 +1,58 @@ +[ +{ + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [{ "$ref": "#/components/messageTraits/commonHeaders" }], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] +} +] \ No newline at end of file diff --git a/examples/3.0.0/messageTrait.json b/examples/3.0.0/messageTrait.json new file mode 100644 index 00000000..5126ee4a --- /dev/null +++ b/examples/3.0.0/messageTrait.json @@ -0,0 +1,3 @@ +[ { + "contentType": "application/json" +} ] \ No newline at end of file diff --git a/examples/3.0.0/oauth2Flow.json b/examples/3.0.0/oauth2Flow.json new file mode 100644 index 00000000..0f8b4083 --- /dev/null +++ b/examples/3.0.0/oauth2Flow.json @@ -0,0 +1,8 @@ +[{ + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operation.json b/examples/3.0.0/operation.json new file mode 100644 index 00000000..bdddeb81 --- /dev/null +++ b/examples/3.0.0/operation.json @@ -0,0 +1,31 @@ +[{ + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }], + "messages": [{ "$ref": "/components/messages/userSignedUp" }], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [{ "$ref": "/components/messages/userSignedUpReply" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operationReplyAddress.json b/examples/3.0.0/operationReplyAddress.json new file mode 100644 index 00000000..53a7a78b --- /dev/null +++ b/examples/3.0.0/operationReplyAddress.json @@ -0,0 +1,4 @@ +[{ + "description": "Consumer inbox", + "location": "$message.header#/replyTo" +}] \ No newline at end of file diff --git a/examples/3.0.0/operationTrait.json b/examples/3.0.0/operationTrait.json new file mode 100644 index 00000000..98e8dbf5 --- /dev/null +++ b/examples/3.0.0/operationTrait.json @@ -0,0 +1,7 @@ +[{ + "bindings": { + "amqp": { + "ack": false + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operations.json b/examples/3.0.0/operations.json new file mode 100644 index 00000000..a623a01a --- /dev/null +++ b/examples/3.0.0/operations.json @@ -0,0 +1,18 @@ +[{ + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameter.json b/examples/3.0.0/parameter.json new file mode 100644 index 00000000..45e25436 --- /dev/null +++ b/examples/3.0.0/parameter.json @@ -0,0 +1,9 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameters.json b/examples/3.0.0/parameters.json new file mode 100644 index 00000000..ad7bc889 --- /dev/null +++ b/examples/3.0.0/parameters.json @@ -0,0 +1,8 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/server.json b/examples/3.0.0/server.json new file mode 100644 index 00000000..3868a102 --- /dev/null +++ b/examples/3.0.0/server.json @@ -0,0 +1,14 @@ +[ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } +] diff --git a/examples/3.0.0/serverVariable.json b/examples/3.0.0/serverVariable.json new file mode 100644 index 00000000..467af35f --- /dev/null +++ b/examples/3.0.0/serverVariable.json @@ -0,0 +1,14 @@ +[ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": ["production", "staging"] + } + } + } +] diff --git a/examples/3.0.0/servers.json b/examples/3.0.0/servers.json new file mode 100644 index 00000000..be5bd9a1 --- /dev/null +++ b/examples/3.0.0/servers.json @@ -0,0 +1,38 @@ +[ { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } +} ] \ No newline at end of file diff --git a/examples/3.0.0/symmetricEncryption.json b/examples/3.0.0/symmetricEncryption.json new file mode 100644 index 00000000..cd4a9731 --- /dev/null +++ b/examples/3.0.0/symmetricEncryption.json @@ -0,0 +1,3 @@ +[{ + "type": "symmetricEncryption" +}] \ No newline at end of file diff --git a/examples/3.0.0/tag.json b/examples/3.0.0/tag.json new file mode 100644 index 00000000..4258baa6 --- /dev/null +++ b/examples/3.0.0/tag.json @@ -0,0 +1,4 @@ +[{ + "name": "user", + "description": "User-related messages" +}] \ No newline at end of file diff --git a/examples/3.0.0/userPassword.json b/examples/3.0.0/userPassword.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/userPassword.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bc454b01..81808e12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2654,6 +2654,16 @@ } }, "dependencies": { + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } + }, "@babel/core": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", @@ -2730,24 +2740,38 @@ } } }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" - } + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.22.5" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-member-expression-to-functions": { @@ -2824,6 +2848,12 @@ "@babel/types": "^7.12.13" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", @@ -2841,6 +2871,25 @@ "@babel/types": "^7.12.13" } }, + "@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + } + } + }, "@babel/parser": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", @@ -2881,40 +2930,86 @@ } }, "@babel/traverse": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", - "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.12.13", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/parser": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "dev": true + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" } } } @@ -3000,6 +3095,45 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", From 6ecfd5971bc107e651a5b9e31eab8b0aabdcc3ff Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 21 Nov 2023 10:01:23 +0100 Subject: [PATCH 19/19] chore(release): v6.0.0-next-major-spec.14 (#451) --- package-lock.json | 214 ++------- package.json | 2 +- schemas/3.0.0-without-$id.json | 841 ++++++++++++++++++++++++++++++--- schemas/3.0.0.json | 841 ++++++++++++++++++++++++++++++--- 4 files changed, 1581 insertions(+), 317 deletions(-) diff --git a/package-lock.json b/package-lock.json index 81808e12..69ebc9b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" @@ -2654,16 +2654,6 @@ } }, "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } - }, "@babel/core": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.13.tgz", @@ -2740,38 +2730,24 @@ } } }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { - "@babel/types": "^7.22.5" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.12.13" } }, "@babel/helper-member-expression-to-functions": { @@ -2848,12 +2824,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true - }, "@babel/helper-validator-identifier": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", @@ -2871,25 +2841,6 @@ "@babel/types": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - } - } - }, "@babel/parser": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.13.tgz", @@ -2930,86 +2881,40 @@ } }, "@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", + "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", "debug": "^4.1.0", - "globals": "^11.1.0" + "globals": "^11.1.0", + "lodash": "^4.17.19" }, "dependencies": { - "@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "requires": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true - }, - "@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/highlight": "^7.12.13" } }, - "@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" } } } @@ -3095,45 +3000,6 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", diff --git a/package.json b/package.json index 8969c4ff..37de273c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.13", + "version": "6.0.0-next-major-spec.14", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 3586d1ec..edb29eb0 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -30,7 +30,8 @@ "$ref": "#/definitions/servers" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "#/definitions/channels" @@ -50,7 +51,7 @@ }, "info": { "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -87,6 +88,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -109,11 +111,37 @@ } ] } - } + }, + "examples": [ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + ] }, "contact": { "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -135,7 +163,14 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + ] }, "license": { "type": "object", @@ -158,18 +193,31 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + ] }, "Reference": { "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "#/definitions/ReferenceObject" } - } + }, + "examples": [ + { + "$ref": "#/components/schemas/Pet" + } + ] }, "ReferenceObject": { "type": "string", @@ -177,16 +225,19 @@ }, "tag": { "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -203,21 +254,29 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "name": "user", + "description": "User-related messages" + } + ] }, "externalDocs": { "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -225,7 +284,13 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "#/definitions/specificationExtension" } - } + }, + "examples": [ + { + "description": "Find more info here", + "url": "https://example.com" + } + ] }, "servers": { "description": "An object representing multiple servers.", @@ -239,11 +304,51 @@ "$ref": "#/definitions/server" } ] - } + }, + "examples": [ + { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } + } + ] }, "server": { "type": "object", - "description": "An object representing a Server.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", "required": [ "host", "protocol" @@ -257,11 +362,11 @@ "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -277,10 +382,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "#/definitions/serverVariables" @@ -322,7 +428,21 @@ } ] } - } + }, + "examples": [ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } + ] }, "serverVariables": { "type": "object", @@ -349,24 +469,45 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, "uniqueItems": true }, "default": { - "type": "string" + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." }, "description": { - "type": "string" + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." }, "examples": { "type": "array", + "description": "An array of examples of the server variable.", "items": { "type": "string" } } - } + }, + "examples": [ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": [ + "production", + "staging" + ] + } + } + } + ] }, "securityRequirements": { "description": "An array representing security requirements.", @@ -383,6 +524,7 @@ } }, "SecurityScheme": { + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "#/definitions/userPassword" @@ -411,6 +553,11 @@ { "$ref": "#/definitions/SaslSecurityScheme" } + ], + "examples": [ + { + "type": "userPassword" + } ] }, "userPassword": { @@ -434,7 +581,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "userPassword" + } + ] }, "apiKey": { "type": "object", @@ -445,19 +597,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -465,7 +620,13 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "apiKey", + "in": "user" + } + ] }, "X509": { "type": "object", @@ -488,7 +649,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "X509" + } + ] }, "symmetricEncryption": { "type": "object", @@ -511,7 +677,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "symmetricEncryption" + } + ] }, "asymmetricEncryption": { "type": "object", @@ -521,12 +692,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -555,6 +728,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -568,13 +742,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] @@ -596,21 +773,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -630,15 +811,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -646,7 +830,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -654,10 +839,18 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } + ] }, "oauth2Flows": { "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -665,17 +858,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -696,6 +892,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -716,6 +913,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -736,6 +934,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "#/definitions/oauth2Flow" @@ -768,21 +967,26 @@ }, "oauth2Flow": { "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "#/definitions/oauth2Scopes" + "$ref": "#/definitions/oauth2Scopes", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -790,7 +994,17 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] }, "oauth2Scopes": { "type": "object", @@ -807,20 +1021,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } @@ -854,12 +1071,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -867,7 +1086,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "SaslScramSecurityScheme": { "type": "object", @@ -877,13 +1101,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -891,7 +1117,12 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "SaslGssapiSecurityScheme": { "type": "object", @@ -901,12 +1132,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -914,10 +1147,16 @@ "$ref": "#/definitions/specificationExtension" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "serverBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1327,6 +1566,7 @@ ] }, "schema": { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "#/definitions/json-schema-draft-07-schema" @@ -1409,7 +1649,8 @@ "$ref": "#/definitions/schema" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -1423,6 +1664,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } @@ -1890,6 +2132,7 @@ }, "channels": { "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ { @@ -1899,10 +2142,23 @@ "$ref": "#/definitions/channel" } ] - } + }, + "examples": [ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] }, "channel": { "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1945,6 +2201,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ { @@ -1977,7 +2234,53 @@ } ] } - } + }, + "examples": [ + { + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { + "$ref": "#/servers/rabbitmqInProd" + }, + { + "$ref": "#/servers/rabbitmqInStaging" + } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ] }, "channelMessages": { "type": "object", @@ -1995,6 +2298,7 @@ }, "messageObject": { "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2003,7 +2307,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "#/definitions/anySchema" @@ -2067,6 +2372,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -2113,6 +2419,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -2143,7 +2450,79 @@ ] } } - } + }, + "examples": [ + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] + } + ] }, "anySchema": { "if": { @@ -2160,6 +2539,7 @@ "description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise." }, "multiFormatSchema": { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -2178,6 +2558,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -2206,7 +2587,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { @@ -2980,6 +3363,7 @@ }, "correlationId": { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -2999,10 +3383,17 @@ "description": "A runtime expression that specifies the location of the correlation ID", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] }, "messageBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3773,6 +4164,7 @@ }, "messageTrait": { "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3781,7 +4173,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "#/definitions/anySchema" @@ -3842,6 +4235,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -3856,7 +4250,12 @@ } ] } - } + }, + "examples": [ + { + "contentType": "application/json" + } + ] }, "parameters": { "type": "object", @@ -3870,9 +4269,20 @@ } ] }, - "description": "JSON objects describing re-usable channel parameters." + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] }, "parameter": { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3885,18 +4295,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -3907,10 +4317,22 @@ "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } + } + ] }, "channelBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4877,6 +5299,7 @@ }, "operations": { "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -4886,10 +5309,45 @@ "$ref": "#/definitions/operation" } ] - } + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } + } + ] }, "operation": { "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4914,6 +5372,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "#/definitions/Reference" } @@ -4930,6 +5389,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -4958,6 +5418,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -4990,10 +5451,69 @@ } ] } - } + }, + "examples": [ + { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ], + "messages": [ + { + "$ref": "/components/messages/userSignedUp" + } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [ + { + "$ref": "/components/messages/userSignedUpReply" + } + ] + } + } + ] }, "operationReply": { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5016,6 +5536,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "#/definitions/Reference" } @@ -5024,6 +5545,7 @@ }, "operationReplyAddress": { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5043,10 +5565,17 @@ "type": "string", "description": "An optional description of the address. CommonMark is allowed." } - } + }, + "examples": [ + { + "description": "Consumer inbox", + "location": "$message.header#/replyTo" + } + ] }, "operationTrait": { "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5055,24 +5584,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "#/definitions/operation/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "#/definitions/operation/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "#/definitions/operation/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "#/definitions/operation/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "#/definitions/operation/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "#/definitions/operation/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "#/definitions/Reference" @@ -5082,10 +5618,20 @@ } ] } - } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } + ] }, "operationBindingsObject": { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5968,7 +6514,7 @@ }, "components": { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5978,6 +6524,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -5993,6 +6540,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6008,6 +6556,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6023,6 +6572,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6053,6 +6603,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6068,6 +6619,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6083,6 +6635,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6098,6 +6651,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6113,6 +6667,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6128,6 +6683,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6143,6 +6699,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6158,6 +6715,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6173,6 +6731,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6188,6 +6747,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6203,6 +6763,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6218,6 +6779,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6233,6 +6795,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6248,6 +6811,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6261,7 +6825,142 @@ } } } - } + }, + "examples": [ + { + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": [ + "5671", + "5672" + ], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } + } + ] } }, "description": "!!Auto generated!! \n Do not manually edit. " diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 237fb05d..7ea6fb64 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -31,7 +31,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" @@ -53,7 +54,7 @@ "http://asyncapi.com/definitions/3.0.0/info.json": { "$id": "http://asyncapi.com/definitions/3.0.0/info.json", "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -90,6 +91,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -112,12 +114,38 @@ } ] } - } + }, + "examples": [ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/contact.json": { "$id": "http://asyncapi.com/definitions/3.0.0/contact.json", "type": "object", - "description": "Contact information for the owners of the API.", + "description": "Contact information for the exposed API.", "additionalProperties": false, "properties": { "name": { @@ -139,7 +167,14 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + ] }, "http://asyncapi.com/definitions/3.0.0/license.json": { "$id": "http://asyncapi.com/definitions/3.0.0/license.json", @@ -163,19 +198,32 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + ] }, "http://asyncapi.com/definitions/3.0.0/Reference.json": { "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json", "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } - } + }, + "examples": [ + { + "$ref": "#/components/schemas/Pet" + } + ] }, "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json", @@ -185,16 +233,19 @@ "http://asyncapi.com/definitions/3.0.0/tag.json": { "$id": "http://asyncapi.com/definitions/3.0.0/tag.json", "type": "object", + "description": "Allows adding metadata to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -211,22 +262,30 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "name": "user", + "description": "User-related messages" + } + ] }, "http://asyncapi.com/definitions/3.0.0/externalDocs.json": { "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json", "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -234,7 +293,13 @@ "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } - } + }, + "examples": [ + { + "description": "Find more info here", + "url": "https://example.com" + } + ] }, "http://asyncapi.com/definitions/3.0.0/servers.json": { "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", @@ -249,12 +314,52 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" } ] - } + }, + "examples": [ + { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/server.json": { "$id": "http://asyncapi.com/definitions/3.0.0/server.json", "type": "object", - "description": "An object representing a Server.", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", "required": [ "host", "protocol" @@ -268,11 +373,11 @@ "properties": { "host": { "type": "string", - "description": "The server host name." + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "pathname": { "type": "string", - "description": "The path to a resource in the host." + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." }, "title": { "type": "string", @@ -288,10 +393,11 @@ }, "protocol": { "type": "string", - "description": "The transfer protocol." + "description": "The protocol this server supports for connection." }, "protocolVersion": { - "type": "string" + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." }, "variables": { "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" @@ -333,7 +439,21 @@ } ] } - } + }, + "examples": [ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } + ] }, "http://asyncapi.com/definitions/3.0.0/serverVariables.json": { "$id": "http://asyncapi.com/definitions/3.0.0/serverVariables.json", @@ -362,24 +482,45 @@ "properties": { "enum": { "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "items": { "type": "string" }, "uniqueItems": true }, "default": { - "type": "string" + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." }, "description": { - "type": "string" + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." }, "examples": { "type": "array", + "description": "An array of examples of the server variable.", "items": { "type": "string" } } - } + }, + "examples": [ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": [ + "production", + "staging" + ] + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/securityRequirements.json": { "$id": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json", @@ -398,6 +539,7 @@ }, "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json", + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" @@ -426,6 +568,11 @@ { "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } + ], + "examples": [ + { + "type": "userPassword" + } ] }, "http://asyncapi.com/definitions/3.0.0/userPassword.json": { @@ -450,7 +597,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "userPassword" + } + ] }, "http://asyncapi.com/definitions/3.0.0/apiKey.json": { "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json", @@ -462,19 +614,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -482,7 +637,13 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "apiKey", + "in": "user" + } + ] }, "http://asyncapi.com/definitions/3.0.0/X509.json": { "$id": "http://asyncapi.com/definitions/3.0.0/X509.json", @@ -506,7 +667,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "X509" + } + ] }, "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json": { "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json", @@ -530,7 +696,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "symmetricEncryption" + } + ] }, "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json": { "$id": "http://asyncapi.com/definitions/3.0.0/asymmetricEncryption.json", @@ -541,12 +712,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -577,6 +750,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -590,13 +764,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] @@ -619,21 +796,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -654,15 +835,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -670,7 +854,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -678,11 +863,19 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } + ] }, "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flows.json", "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -690,17 +883,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -721,6 +917,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -741,6 +938,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -761,6 +959,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -794,21 +993,26 @@ "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json", "type": "object", + "description": "Configuration details for a supported OAuth Flow", "properties": { "authorizationUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." }, "tokenUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." }, "refreshUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." }, "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." } }, "patternProperties": { @@ -816,7 +1020,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json": { "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", @@ -835,20 +1049,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } @@ -884,12 +1101,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -897,7 +1116,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json", @@ -908,13 +1132,15 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -922,7 +1148,12 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json": { "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json", @@ -933,12 +1164,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -946,11 +1179,17 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, - "additionalProperties": false + "additionalProperties": false, + "examples": [ + { + "type": "scramSha512" + } + ] }, "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1363,6 +1602,7 @@ }, "http://asyncapi.com/definitions/3.0.0/schema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/schema.json", + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" @@ -1445,7 +1685,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -1459,6 +1700,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } @@ -1934,6 +2176,7 @@ "http://asyncapi.com/definitions/3.0.0/channels.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channels.json", "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", "additionalProperties": { "oneOf": [ { @@ -1943,11 +2186,24 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" } ] - } + }, + "examples": [ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channel.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channel.json", "type": "object", + "description": "Describes a shared communication channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -1990,6 +2246,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping of channels.", "items": { "oneOf": [ { @@ -2022,7 +2279,53 @@ } ] } - } + }, + "examples": [ + { + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { + "$ref": "#/servers/rabbitmqInProd" + }, + { + "$ref": "#/servers/rabbitmqInStaging" + } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channelMessages.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channelMessages.json", @@ -2042,6 +2345,7 @@ "http://asyncapi.com/definitions/3.0.0/messageObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json", "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -2050,7 +2354,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -2114,6 +2419,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -2160,6 +2466,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -2190,7 +2497,79 @@ ] } } - } + }, + "examples": [ + { + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { + "$ref": "#/components/messageTraits/commonHeaders" + } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] + } + ] }, "http://asyncapi.com/definitions/3.0.0/anySchema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", @@ -2209,6 +2588,7 @@ }, "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json": { "$id": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json", + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -2227,6 +2607,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -2255,7 +2636,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { @@ -3032,6 +3415,7 @@ "http://asyncapi.com/definitions/3.0.0/correlationId.json": { "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json", "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -3051,11 +3435,18 @@ "description": "A runtime expression that specifies the location of the correlation ID", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + ] }, "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3836,6 +4227,7 @@ "http://asyncapi.com/definitions/3.0.0/messageTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json", "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3844,7 +4236,8 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -3905,6 +4298,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -3919,7 +4313,12 @@ } ] } - } + }, + "examples": [ + { + "contentType": "application/json" + } + ] }, "http://asyncapi.com/definitions/3.0.0/parameters.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json", @@ -3934,10 +4333,21 @@ } ] }, - "description": "JSON objects describing re-usable channel parameters." + "description": "JSON objects describing re-usable channel parameters.", + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/parameter.json": { "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json", + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -3950,18 +4360,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -3972,11 +4382,23 @@ "description": "A runtime expression that specifies the location of the parameter value", "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } - } + }, + "examples": [ + { + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4952,6 +5374,7 @@ "http://asyncapi.com/definitions/3.0.0/operations.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operations.json", "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -4961,11 +5384,46 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json" } ] - } + }, + "examples": [ + { + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operation.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operation.json", "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -4990,6 +5448,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -5006,6 +5465,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -5034,6 +5494,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -5066,11 +5527,70 @@ } ] } - } + }, + "examples": [ + { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + }, + { + "name": "register" + } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { + "$ref": "#/components/operationTraits/kafka" + } + ], + "messages": [ + { + "$ref": "/components/messages/userSignedUp" + } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [ + { + "$ref": "/components/messages/userSignedUpReply" + } + ] + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationReply.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationReply.json", "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5093,6 +5613,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -5102,6 +5623,7 @@ "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json", "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5121,11 +5643,18 @@ "type": "string", "description": "An optional description of the address. CommonMark is allowed." } - } + }, + "examples": [ + { + "description": "Consumer inbox", + "location": "$message.header#/replyTo" + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -5134,24 +5663,31 @@ }, "properties": { "title": { + "description": "A human-friendly title for the operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" }, "summary": { + "description": "A short summary of what the operation is about.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" }, "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" }, "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" }, "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" }, "externalDocs": { + "description": "Additional external documentation for this operation.", "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" }, "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" @@ -5161,11 +5697,21 @@ } ] } - } + }, + "examples": [ + { + "bindings": { + "amqp": { + "ack": false + } + } + } + ] }, "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json", "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6058,7 +6604,7 @@ "http://asyncapi.com/definitions/3.0.0/components.json": { "$id": "http://asyncapi.com/definitions/3.0.0/components.json", "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -6068,6 +6614,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6083,6 +6630,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6098,6 +6646,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6113,6 +6662,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6143,6 +6693,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6158,6 +6709,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6173,6 +6725,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6188,6 +6741,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6203,6 +6757,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6218,6 +6773,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6233,6 +6789,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6248,6 +6805,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6263,6 +6821,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6278,6 +6837,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6293,6 +6853,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6308,6 +6869,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6323,6 +6885,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6338,6 +6901,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -6351,7 +6915,142 @@ } } } - } + }, + "examples": [ + { + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": [ + "5671", + "5672" + ], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } + } + ] } }, "description": "!!Auto generated!! \n Do not manually edit. "