From 306f1fc8333e10730a6dd953e92211f0cdb7736e Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 4 Dec 2023 23:33:55 -1000 Subject: [PATCH] feat!: release v3 compatible bindings (#224) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> Co-authored-by: Sambhav Gupta <81870866+sambhavgupta0705@users.noreply.github.com> Co-authored-by: Jeremy Whitlock Co-authored-by: Laurent Broudoux Co-authored-by: Lukasz Gornicki --- amqp/README.md | 69 ++++--- amqp/json_schemas/channel.json | 137 ------------- amqp/json_schemas/message.json | 37 ---- amqp/json_schemas/operation.json | 89 -------- anypointmq/README.md | 115 ++++++----- anypointmq/json_schemas/channel.json | 40 ---- anypointmq/json_schemas/message.json | 47 ----- googlepubsub/README.md | 36 ++-- googlepubsub/json_schemas/channel.json | 82 -------- googlepubsub/json_schemas/message.json | 55 ----- http/README.md | 55 +++-- http/json_schemas/message.json | 49 ----- http/json_schemas/operation.json | 126 ------------ ibmmq/json_schemas/channel.json | 124 ----------- ibmmq/json_schemas/message.json | 81 -------- ibmmq/json_schemas/server.json | 58 ------ jms/json_schemas/channel.json | 40 ---- jms/json_schemas/message.json | 73 ------- jms/json_schemas/server.json | 69 ------- kafka/README.md | 40 ++-- kafka/json_schemas/channel.json | 81 -------- kafka/json_schemas/message.json | 68 ------ kafka/json_schemas/operation.json | 48 ----- kafka/json_schemas/server.json | 37 ---- mqtt/README.md | 8 +- mqtt/json_schemas/message.json | 74 ------- mqtt/json_schemas/operation.json | 55 ----- mqtt/json_schemas/server.json | 105 ---------- mqtt5/json_schemas/server.json | 52 ----- nats/json_schemas/operation.json | 33 --- pulsar/json_schemas/channel.json | 91 --------- pulsar/json_schemas/server.json | 32 --- sns/json_schemas/channel.json | 150 -------------- sns/json_schemas/operation.json | 273 ------------------------- solace/json_schemas/operation.json | 114 ----------- solace/json_schemas/server.json | 32 --- sqs/json_schemas/channel.json | 264 ------------------------ sqs/json_schemas/operation.json | 258 ----------------------- websockets/json_schemas/channel.json | 58 ------ 39 files changed, 174 insertions(+), 3081 deletions(-) delete mode 100644 amqp/json_schemas/channel.json delete mode 100644 amqp/json_schemas/message.json delete mode 100644 amqp/json_schemas/operation.json delete mode 100644 anypointmq/json_schemas/channel.json delete mode 100644 anypointmq/json_schemas/message.json delete mode 100644 googlepubsub/json_schemas/channel.json delete mode 100644 googlepubsub/json_schemas/message.json delete mode 100644 http/json_schemas/message.json delete mode 100644 http/json_schemas/operation.json delete mode 100644 ibmmq/json_schemas/channel.json delete mode 100644 ibmmq/json_schemas/message.json delete mode 100644 ibmmq/json_schemas/server.json delete mode 100644 jms/json_schemas/channel.json delete mode 100644 jms/json_schemas/message.json delete mode 100644 jms/json_schemas/server.json delete mode 100644 kafka/json_schemas/channel.json delete mode 100644 kafka/json_schemas/message.json delete mode 100644 kafka/json_schemas/operation.json delete mode 100644 kafka/json_schemas/server.json delete mode 100644 mqtt/json_schemas/message.json delete mode 100644 mqtt/json_schemas/operation.json delete mode 100644 mqtt/json_schemas/server.json delete mode 100644 mqtt5/json_schemas/server.json delete mode 100644 nats/json_schemas/operation.json delete mode 100644 pulsar/json_schemas/channel.json delete mode 100644 pulsar/json_schemas/server.json delete mode 100644 sns/json_schemas/channel.json delete mode 100644 sns/json_schemas/operation.json delete mode 100644 solace/json_schemas/operation.json delete mode 100644 solace/json_schemas/server.json delete mode 100644 sqs/json_schemas/channel.json delete mode 100644 sqs/json_schemas/operation.json delete mode 100644 websockets/json_schemas/channel.json diff --git a/amqp/README.md b/amqp/README.md index 547fa25e..626dfb0f 100644 --- a/amqp/README.md +++ b/amqp/README.md @@ -6,7 +6,7 @@ This document defines how to describe AMQP-specific information on AsyncAPI. ## Version -Current version is `0.2.0`. +Current version is `0.3.0`. @@ -49,7 +49,8 @@ This object MUST contain only the properties defined above. ```yaml channels: - user/signedup: + userSignup: + address: 'user/signup' bindings: amqp: is: routingKey @@ -65,7 +66,7 @@ channels: durable: true autoDelete: false vhost: / - bindingVersion: 0.2.0 + bindingVersion: 0.3.0 ``` @@ -77,41 +78,40 @@ This object contains information about the operation representation in AMQP. ##### Fixed Fields -Field Name | Type | Applies To | Description +Field Name | Type | Applies To Action | Description ---|:---:|:---:|--- -`expiration` | integer | Publish, Subscribe | TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero. -`userId` | string | Publish, Subscribe | Identifies the user who has sent the message. -`cc` | [string] | Publish, Subscribe | The routing keys the message should be routed to at the time of publishing. -`priority` | integer | Publish, Subscribe | A priority for the message. -`deliveryMode` | integer | Publish, Subscribe | Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent). -`mandatory` | boolean | Publish | Whether the message is mandatory or not. -`bcc` | [string] | Publish | Like [cc](#operationBindingObjectCC) but consumers will not receive this information. -`replyTo` | string | Publish, Subscribe | Name of the queue where the consumer should send the response. -`timestamp` | boolean | Publish, Subscribe | Whether the message should include a timestamp or not. +`expiration` | integer | `receive`, `send` | TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero. +`userId` | string | `receive`, `send` | Identifies the user who has sent the message. +`cc` | [string] | `receive`, `send` | The routing keys the message should be routed to at the time of publishing. +`priority` | integer | `receive`, `send` | A priority for the message. +`deliveryMode` | integer | `receive`, `send` | Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent). +`mandatory` | boolean | `receive` | Whether the message is mandatory or not. +`bcc` | [string] | `receive` | Like [cc](#operationBindingObjectCC) but consumers will not receive this information. +`timestamp` | boolean | `receive`, `send` | Whether the message should include a timestamp or not. `ack` | boolean | Subscribe | Whether the consumer should ack the message or not. -`bindingVersion` | string | Publish, Subscribe | The version of this binding. If omitted, "latest" MUST be assumed. +`bindingVersion` | string | `receive`, `send` | The version of this binding. If omitted, "latest" MUST be assumed. This object MUST contain only the properties defined above. ##### Example ```yaml -channels: - user/signup: - publish: - bindings: - amqp: - expiration: 100000 - userId: guest - cc: ['user.logs'] - priority: 10 - deliveryMode: 2 - mandatory: false - bcc: ['external.audit'] - replyTo: user.signedup - timestamp: true - ack: false - bindingVersion: 0.2.0 +operations: + userSignup: + channel: + $ref: '#/channels/userSignup' + bindings: + amqp: + expiration: 100000 + userId: guest + cc: ['user.logs'] + priority: 10 + deliveryMode: 2 + mandatory: false + bcc: ['external.audit'] + timestamp: true + ack: false + bindingVersion: 0.3.0 ``` @@ -133,12 +133,13 @@ This object MUST contain only the properties defined above. ```yaml channels: - user/signup: - publish: - message: + userSignup: + address: 'user/signup' + messages: + userSignupMessage: bindings: amqp: contentEncoding: gzip messageType: 'user.signup' - bindingVersion: 0.2.0 + bindingVersion: 0.3.0 ``` diff --git a/amqp/json_schemas/channel.json b/amqp/json_schemas/channel.json deleted file mode 100644 index bce8f58e..00000000 --- a/amqp/json_schemas/channel.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in AMQP.", - "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": { - "is": { - "type": "string", - "enum": ["queue", "routingKey"], - "description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)." - }, - "exchange": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the exchange. It MUST NOT exceed 255 characters long." - }, - "type": { - "type": "string", - "enum": ["topic", "direct", "fanout", "default", "headers"], - "description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'." - }, - "durable": { - "type": "boolean", - "description": "Whether the exchange should survive broker restarts or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the exchange should be deleted when the last queue is unbound from it." - }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the exchange. Defaults to '/'." - } - }, - "description": "When is=routingKey, this object defines the exchange properties." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "description": "The name of the queue. It MUST NOT exceed 255 characters long." - }, - "durable": { - "type": "boolean", - "description": "Whether the queue should survive broker restarts or not." - }, - "exclusive": { - "type": "boolean", - "description": "Whether the queue should be used only by one connection or not." - }, - "autoDelete": { - "type": "boolean", - "description": "Whether the queue should be deleted when the last consumer unsubscribes." - }, - "vhost": { - "type": "string", - "default": "/", - "description": "The virtual host of the queue. Defaults to '/'." - } - }, - "description": "When is=queue, this object defines the queue properties." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - - }, - "oneOf": [ - { - "properties": { - "is": { "const": "routingKey" } - }, - "required": [ - "exchange" - ], - "not": { - "required": [ - "queue" - ] - } - }, - { - "properties": { - "is": { "const": "queue" } - }, - "required": [ - "queue" - ], - "not": { - "required": [ - "exchange" - ] - } - } - ], - "examples": [ - { - "is": "routingKey", - "exchange": { - "name": "myExchange", - "type": "topic", - "durable": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - }, - { - "is": "queue", - "queue": { - "name": "my-queue-name", - "durable": true, - "exclusive": true, - "autoDelete": false, - "vhost": "/" - }, - "bindingVersion": "0.2.0" - } - ] -} diff --git a/amqp/json_schemas/message.json b/amqp/json_schemas/message.json deleted file mode 100644 index cf739534..00000000 --- a/amqp/json_schemas/message.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/message.json", - "title": "Message Schema", - "description": "This object contains information about the message representation in AMQP.", - "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": { - "contentEncoding": { - "type": "string", - "description": "A MIME encoding for the message content." - }, - "messageType": { - "type": "string", - "description": "Application-specific message type." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "contentEncoding": "gzip", - "messageType": "user.signup", - "bindingVersion": "0.2.0" - } - ] -} diff --git a/amqp/json_schemas/operation.json b/amqp/json_schemas/operation.json deleted file mode 100644 index 30f20d8b..00000000 --- a/amqp/json_schemas/operation.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/amqp/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in AMQP.", - "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": { - "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." - }, - "replyTo": { - "type": "string", - "description": "Name of the queue where the consumer should send the response." - }, - "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.2.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" - ], - "replyTo": "user.signedup", - "timestamp": true, - "ack": false, - "bindingVersion": "0.2.0" - } - ] -} diff --git a/anypointmq/README.md b/anypointmq/README.md index 1f0a43b5..239f5df0 100644 --- a/anypointmq/README.md +++ b/anypointmq/README.md @@ -7,7 +7,7 @@ This document defines how to describe Anypoint MQ-specific information in AsyncA ## Versions -The version of this bindings specification is `0.0.1`. +The version of this bindings specification is `0.1.0`. This is also the `bindingVersion` for all binding objects defined by this specification. In any given binding object, `latest` MAY alternatively be used to refer to the currently latest published version of this bindings specification. @@ -28,7 +28,8 @@ The fields of the standard [Server Object](https://github.com/asyncapi/spec/blob Server Object Field Name | Values for Anypoint MQ Protocol | Description ---|:---|:--- `protocol` | `anypointmq` | **REQUIRED**. MUST be `anypointmq` for the scope of this specification. -`url` | e.g., `https://mq-us-east-1.anypoint.mulesoft.com/api` | **REQUIRED**. MUST be the endpoint URL of the Anypoint MQ Broker REST API _excluding_ the final major version indicator (e.g., `v1`). Valid examples are `https://mq-us-east-1.anypoint.mulesoft.com/api` and `https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api` (and _not_ `https://.../api/v1`). +`host` | e.g., `https://mq-us-east-1.anypoint.mulesoft.com` | **REQUIRED**. MUST be the endpoint HOST part of the URL of the Anypoint MQ Broker REST API. Valid examples are `https://mq-us-east-1.anypoint.mulesoft.com` and `https://mq-eu-central-1.eu1.anypoint.mulesoft.com` (and _not_ `https://mq-us-east-1.anypoint.mulesoft.com/api`, or `https://.../api/v1`). +`pathname` | e.g., `/api` | **REQUIRED**. MUST be the endpoint path part of the URL of the Anypoint MQ Broker REST API _excluding_ the final major version indicator (e.g., `v1`). Valid examples are `/api` and (and _not_ `https://.../api/v1`). `protocolVersion` | e.g., `v1` | **OPTIONAL**, defaults to `v1`. If present MUST be the major version indicator of the Anypoint MQ Broker REST API omitted from the `url`, e.g. `v1`. `security` | suitably configured OAuth 2.0 client credentials grant type | **REQUIRED**. Authentication against the MuleSoft-hosted Anypoint MQ message brokers uses the OAuth 2.0 client credentials grant type. At runtime, the client ID and client secret values of an Anypoint MQ client app must be supplied. Also, the OAuth 2.0 scopes are currently not client-configurable. The `security` field of the server object MUST correctly match these constraints. @@ -54,27 +55,30 @@ Note that an Anypoint MQ exchange can only be sent to, not received from. To rec ### Examples -The following example shows a `channels` object with two channels, the second having a channel binding object for `anypointmq`: +The following example shows two channels where does not apply any bindings and the second one applying `anyointmq` bindings. ```yaml channels: - user/signup: + userSignup: + address: 'user/signup' description: | This application receives command messages from this channel about users to sign up. Minimal configuration, omitting a channel binding object. - publish: + messages: #... - user/signedup: + + userSignup: + address: 'user/signup' description: | This application sends events to this channel about users that have signed up. Explicitly provides a channel binding object. + messages: + #... bindings: anypointmq: destination: user-signup-exchg destinationType: exchange - bindingVersion: '0.0.1' - subscribe: - #... + bindingVersion: '0.1.0' ``` @@ -85,7 +89,7 @@ This object MUST NOT contain any properties. Its name is reserved for future use ## Message Binding Object -The Anypoint MQ [Message Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#message-bindings-object) is defined by a [JSON Schema](json_schemas/message.json), which defines these fields: +The Anypoint MQ [Message Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#message-bindings-object) defines these fields: Field Name | Type | Description ---|:---:|--- @@ -101,13 +105,14 @@ The following example shows a `channels` object with two channels, each having o ```yaml channels: - user/signup: - publish: - message: - #... - user/signedup: - subscribe: - message: + userSignup: + address: 'user/signup' + messages: + #... + userSignup: + address: 'user/signup' + messages: + userSignupMessage: headers: type: object properties: @@ -128,7 +133,7 @@ channels: properties: messageId: type: string - bindingVersion: '0.0.1' + bindingVersion: '0.1.0' ``` ## Complete Example @@ -136,48 +141,43 @@ channels: The following is a complete, simple AsyncAPI document illustrating the usage of all binding objects defined in this bindings specification, with all their fields. ```yaml -asyncapi: '2.0.0' +asyncapi: 3.0.0 info: title: Example with Anypoint MQ - version: '0.0.1' - + version: 0.0.1 servers: development: + host: mq-us-east-1.anypoint.mulesoft.com + pathname: /api protocol: anypointmq protocolVersion: v1 - url: https://mq-us-east-1.anypoint.mulesoft.com/api - description: | - Anypoint MQ broker for development, in the US East (N. Virginia) runtime plane + description: > + Anypoint MQ broker for development, in the US East (N. Virginia) runtime + plane + under management of the US control plane. security: - - oauthDev: [] + - $ref: '#/components/securitySchemes/oauthDev' production: + host: mq-eu-central-1.eu1.anypoint.mulesoft.com + pathname: /api protocol: anypointmq protocolVersion: v1 - url: https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api - description: | - Anypoint MQ broker for production, in the EU Central (Frankfurt) runtime plane + description: > + Anypoint MQ broker for production, in the EU Central (Frankfurt) runtime + plane + under management of the EU control plane. security: - - oauthProd: [] + - $ref: '#/components/securitySchemes/oauthProd' bindings: anypointmq: - bindingVersion: '0.0.1' - + bindingVersion: 0.1.0 channels: user/signup: - description: | - This application receives command messages from this channel about users to sign up. - bindings: - anypointmq: - destination: user-signup-queue - destinationType: fifo-queue - bindingVersion: '0.0.1' - publish: - operationId: signUpUser - description: | - This application receives command messages via this operation about users to sign up. - message: + address: user/signup + messages: + signUpUser.message: contentType: application/json headers: type: object @@ -192,7 +192,9 @@ channels: type: string minLength: 3 correlationId: - description: Correlation ID is specified as a header and transmitted in the Anypoint MQ message properties section + description: >- + Correlation ID is specified as a header and transmitted in the + Anypoint MQ message properties section location: $message.header#/correlationId bindings: anypointmq: @@ -201,20 +203,37 @@ channels: properties: messageId: type: string - bindingVersion: '0.0.1' - + bindingVersion: 0.1.0 + description: > + This application receives command messages from this channel about users + to sign up. + bindings: + anypointmq: + destination: user-signup-queue + destinationType: fifo-queue + bindingVersion: 0.1.0 +operations: + signUpUser: + action: receive + channel: + $ref: '#/channels/user~1signup' + description: > + This application receives command messages via this operation about users + to sign up. + messages: + - $ref: '#/channels/user~1signup/messages/signUpUser.message' components: securitySchemes: oauthDev: type: oauth2 flows: clientCredentials: - tokenUrl: https://mq-us-east-1.anypoint.mulesoft.com/api/v1/authorize + tokenUrl: 'https://mq-us-east-1.anypoint.mulesoft.com/api/v1/authorize' scopes: {} oauthProd: type: oauth2 flows: clientCredentials: - tokenUrl: https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api/v1/authorize + tokenUrl: 'https://mq-eu-central-1.eu1.anypoint.mulesoft.com/api/v1/authorize' scopes: {} ``` diff --git a/anypointmq/json_schemas/channel.json b/anypointmq/json_schemas/channel.json deleted file mode 100644 index eece0c50..00000000 --- a/anypointmq/json_schemas/channel.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/anypointmq/channel.json", - "title": "Channel Schema", - "description": "This object contains configuration for describing an Anypoint MQ exchange, 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 or exchange) 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 in Anypoint MQ. Defaults to the channel name." - }, - "destinationType": { - "type": "string", - "enum": ["exchange", "queue", "fifo-queue"], - "default": "queue", - "description": "The type of destination. SHOULD be specified to document the messaging model (publish/subscribe, point-to-point, 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-signup-exchg", - "destinationType": "exchange", - "bindingVersion": "0.0.1" - } - ] -} diff --git a/anypointmq/json_schemas/message.json b/anypointmq/json_schemas/message.json deleted file mode 100644 index 5e8ac1aa..00000000 --- a/anypointmq/json_schemas/message.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/anypointmq/message.json", - "title": "Message Schema", - "description": "This object contains configuration for describing an Anypoint MQ 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://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "headers": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "type": "string", - "enum": [ - "0.0.1" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "messageId": { - "type": "string" - } - } - }, - "bindingVersion": "0.0.1" - } - ] -} diff --git a/googlepubsub/README.md b/googlepubsub/README.md index 6b691d09..bfe0a3d4 100644 --- a/googlepubsub/README.md +++ b/googlepubsub/README.md @@ -6,7 +6,7 @@ This document defines how to describe Google Cloud Pub/Sub specific information ## Version -Current version is `0.1.0`. +Current version is `0.2.0`. @@ -17,12 +17,11 @@ The `Channel Bindings Object` is used to describe the Google Cloud Pub/Sub speci Field Name | Type | Description ---|---|--- -`bindingVersion`|String|The current version is `0.1.0` +`bindingVersion`|String|The current version is `0.2.0` `labels`|Object|An object of key-value pairs _(These are used to categorize Cloud Resources like Cloud Pub/Sub Topics.)_ `messageRetentionDuration`|String|Indicates the minimum duration to retain a message after it is published to the topic _(Must be a valid [Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration).)_ `messageStoragePolicy`|[Message Storage Policy Object](#message-storage-policy-object)|Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored `schemaSettings`|[Schema Settings Object](#schema-settings-object)|Settings for validating messages published against a schema -`topic`|String|The Google Cloud Pub/Sub Topic name @@ -59,17 +58,17 @@ Field Name | Type | Description # ... channels: topic-avro-schema: + address: projects/your-project/topics/topic-avro-schema bindings: googlepubsub: - topic: projects/your-project/topics/topic-avro-schema schemaSettings: encoding: json name: projects/your-project/schemas/message-avro # ... topic-proto-schema: + address: projects/your-project/topics/topic-proto-schema bindings: googlepubsub: - topic: projects/your-project/topics/topic-proto-schema messageRetentionDuration: 86400s messageStoragePolicy: allowedPersistenceRegions: @@ -102,7 +101,7 @@ Object, with AsyncAPI. Field Name | Type | Description ---|---|--- -`bindingVersion`|String|The current version is `0.1.0` +`bindingVersion`|String|The current version is `0.2.0` `attributes`|Object|Attributes for this message _(If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.)_ `orderingKey`|String|If non-empty, identifies related messages for which publish order should be respected _(For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).)_ `schema`|[Schema Definition Object](#schema-definition-object)|Describes the schema used to validate the payload of this message @@ -120,7 +119,6 @@ payloads using a supported Google Cloud Pub/Sub schema format like Protobuf. Field Name | Type | Description ---|---|--- `name`|String|The name of the schema -`type`|String|The type of the schema @@ -135,25 +133,31 @@ components: googlepubsub: schema: name: projects/your-project/schemas/message-avro - type: avro contentType: application/json name: MessageAvro payload: - fields: - - name: message - type: string - name: Message - type: record - schemaFormat: application/vnd.apache.avro+yaml;version=1.9.0 + schema: + fields: + - name: message + type: string + name: Message + type: record + schemaFormat: application/vnd.apache.avro+yaml;version=1.9.0 messageProto: bindings: googlepubsub: schema: name: projects/your-project/schemas/message-proto - type: protobuf contentType: application/octet-stream name: MessageProto - payload: true + payload: + schema: | + syntax = "proto3"; + + message Message { + required string message = 1; + } + schemaFormat: application/vnd.google.protobuf;version=3 # ... ``` diff --git a/googlepubsub/json_schemas/channel.json b/googlepubsub/json_schemas/channel.json deleted file mode 100644 index 02596c39..00000000 --- a/googlepubsub/json_schemas/channel.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/googlepubsub/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\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension" - } - }, - "properties": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.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"] - }, - "topic": { - "type": "string" - } - }, - "required": ["schemaSettings", "topic"], - "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" - } - } - ] -} \ No newline at end of file diff --git a/googlepubsub/json_schemas/message.json b/googlepubsub/json_schemas/message.json deleted file mode 100644 index a647d743..00000000 --- a/googlepubsub/json_schemas/message.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/googlepubsub/message.json", - "title": "Cloud Pub/Sub Channel Schema", - "description": "This object contains information about the message representation for Google Cloud Pub/Sub.", - "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": { - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - }, - "attributes": { - "type": "object" - }, - "orderingKey": { - "type": "string" - }, - "schema": { - "type": "object", - "additionalItems": false, - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": ["name", "type"] - } - }, - "examples": [ - { - "schema": { - "name": "projects/your-project-id/schemas/your-avro-schema-id", - "type": "avro" - } - }, - { - "schema": { - "name": "projects/your-project-id/schemas/your-protobuf-schema-id", - "type": "protobuf" - } - } - ] -} \ No newline at end of file diff --git a/http/README.md b/http/README.md index deb3c7bd..f2becbd3 100644 --- a/http/README.md +++ b/http/README.md @@ -6,7 +6,7 @@ This document defines how to describe HTTP-specific information on AsyncAPI. ## Version -Current version is `0.1.0`. +Current version is `0.2.0`. @@ -15,9 +15,6 @@ Current version is `0.1.0`. This object MUST NOT contain any properties. Its name is reserved for future use. - - - ## Channel Binding Object @@ -28,13 +25,12 @@ This object MUST NOT contain any properties. Its name is reserved for future use ## Operation Binding Object - + ##### Fixed Fields Field Name | Type | Description ---|:---:|--- -`type` | string | **REQUIRED**. Type of operation. Its value MUST be either `request` or `response`. -`method` | string | 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`. +`method` | string | The HTTP method for the request. Its value MUST be one of `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`, `CONNECT`, and `TRACE`. `query` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key. `bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed. @@ -44,23 +40,25 @@ This object MUST contain only the properties defined above. ```yaml channels: - /employees: - subscribe: - bindings: - http: - type: request - method: GET - query: - type: object - required: - - companyId - properties: - companyId: - type: number - minimum: 1 - description: The Id of the company. - additionalProperties: false - bindingVersion: '0.1.0' + employees: + address: /employees +operations: + employees: + action: send: + bindings: + http: + method: GET + query: + type: object + required: + - companyId + properties: + companyId: + type: number + minimum: 1 + description: The Id of the company. + additionalProperties: false + bindingVersion: '0.2.0' ``` @@ -83,8 +81,9 @@ This object MUST contain only the properties defined above. ```yaml channels: test: - publish: - message: + address: /test + messages: + testMessage: bindings: http: headers: @@ -93,8 +92,8 @@ channels: Content-Type: type: string enum: ['application/json'] - bindingVersion: '0.1.0' + bindingVersion: '0.2.0' ``` [schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject -[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject \ No newline at end of file +[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject diff --git a/http/json_schemas/message.json b/http/json_schemas/message.json deleted file mode 100644 index faeeb089..00000000 --- a/http/json_schemas/message.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/http/message.json", - "title": "Message Schema", - "description": "This object contains information about the message representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "headers": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - } - }, - "examples": [ - { - "headers": { - "type": "object", - "properties": { - "Content-Type": { - "type": "string", - "enum": [ - "application/json" - ] - } - } - }, - "bindingVersion": "0.1.0" - } - ] -} diff --git a/http/json_schemas/operation.json b/http/json_schemas/operation.json deleted file mode 100644 index 76873f1c..00000000 --- a/http/json_schemas/operation.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/http/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in HTTP.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "type": { - "type": "string", - "enum": [ - "request", - "response" - ], - "description": "Required. Type of operation. Its value MUST be either 'request' or 'response'." - }, - "method": { - "type": "string", - "enum": [ - "GET", - "PUT", - "POST", - "PATCH", - "DELETE", - "HEAD", - "OPTIONS", - "CONNECT", - "TRACE" - ], - "description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'." - }, - "query": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "required": [ - "type" - ], - "oneOf": [ - { - "properties": { - "type": { - "const": "request" - } - }, - "required": [ - "method" - ] - }, - { - "properties": { - "is": { - "const": "response" - } - }, - "not": { - "required": [ - "method" - ] - } - } - ], - "examples": [ - { - "type": "response", - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.1.0" - }, - { - "type": "request", - "method": "GET", - "query": { - "type": "object", - "required": [ - "companyId" - ], - "properties": { - "companyId": { - "type": "number", - "minimum": 1, - "description": "The Id of the company." - } - }, - "additionalProperties": false - }, - "bindingVersion": "0.1.0" - } - ] -} - - - - diff --git a/ibmmq/json_schemas/channel.json b/ibmmq/json_schemas/channel.json deleted file mode 100644 index 62154b9c..00000000 --- a/ibmmq/json_schemas/channel.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/channel.json", - "title": "Channel Schema", - "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\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/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" - } - ] -} diff --git a/ibmmq/json_schemas/message.json b/ibmmq/json_schemas/message.json deleted file mode 100644 index e207be83..00000000 --- a/ibmmq/json_schemas/message.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/message.json", - "title": "Message Schema", - "description": "This object contains information about the message representation in IBM MQ.", - "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": { - "type": { - "type": "string", - "enum": ["string", "jms", "binary"], - "default": "string", - "description": "The type of the message." - }, - "headers": { - "type": "string", - "description": "Defines the IBM MQ message headers to include with this message. More than one header can be specified as a comma separated list. Supporting information on IBM MQ message formats can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-format-mqchar8) in the IBM MQ Knowledge Center." - }, - "description": { - "type": "string", - "description": "Provides additional information for application developers: describes the message type or format." - }, - "expiry": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "The recommended setting the client should use for the TTL (Time-To-Live) of the message. This is a period of time expressed in milliseconds and set by the application that puts the message. 'expiry' values are API dependant e.g., MQI and JMS use different units of time and default values for 'unlimited'. General information on IBM MQ message expiry can be found on this [page](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqmd-expiry-mqlong) in the IBM MQ Knowledge Center." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - - }, - "oneOf": [ - { - "properties": { - "type": { "const": "binary" } - } - }, - { - "properties": { - "type": { "const": "jms" } - }, - "not": { - "required": [ - "headers" - ] - } - }, - { - "properties": { - "type": { "const": "string" } - }, - "not": { - "required": [ - "headers" - ] - } - } - ], - "examples": [ - { - "type": "string", - "bindingVersion": "0.1.0" - }, - { - "type": "jms", - "description": "JMS stream message", - "bindingVersion": "0.1.0" - } - ] -} diff --git a/ibmmq/json_schemas/server.json b/ibmmq/json_schemas/server.json deleted file mode 100644 index 208018bb..00000000 --- a/ibmmq/json_schemas/server.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/ibmmq/server.json", - "title": "Server Schema", - "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.", - "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": { - "groupId": { - "type": "string", - "description": "Defines a logical group of IBM MQ server objects. This is necessary to specify multi-endpoint configurations used in high availability deployments. If omitted, the server object is not part of a group." - }, - "ccdtQueueManagerName": { - "type": "string", - "default": "*", - "description": "The name of the IBM MQ queue manager to bind to in the CCDT file." - }, - "cipherSpec": { - "type": "string", - "description": "The recommended cipher specification used to establish a TLS connection between the client and the IBM MQ queue manager. More information on SSL/TLS cipher specifications supported by IBM MQ can be found on this page in the IBM MQ Knowledge Center." - }, - "multiEndpointServer": { - "type": "boolean", - "default": false, - "description": "If 'multiEndpointServer' is 'true' then multiple connections can be workload balanced and applications should not make assumptions as to where messages are processed. Where message ordering, or affinity to specific message resources is necessary, a single endpoint ('multiEndpointServer' = 'false') may be required." - }, - "heartBeatInterval": { - "type": "integer", - "minimum": 0, - "maximum": 999999, - "default": 300, - "description": "The recommended value (in seconds) for the heartbeat sent to the queue manager during periods of inactivity. A value of zero means that no heart beats are sent. A value of 1 means that the client will use the value defined by the queue manager. More information on heart beat interval can be found on this page in the IBM MQ Knowledge Center." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "groupId": "PRODCLSTR1", - "cipherSpec": "ANY_TLS12_OR_HIGHER", - "bindingVersion": "0.1.0" - }, - { - "groupId": "PRODCLSTR1", - "bindingVersion": "0.1.0" - } - ] -} diff --git a/jms/json_schemas/channel.json b/jms/json_schemas/channel.json deleted file mode 100644 index 4f441cc4..00000000 --- a/jms/json_schemas/channel.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/jms/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/jms/json_schemas/message.json b/jms/json_schemas/message.json deleted file mode 100644 index 4c14347e..00000000 --- a/jms/json_schemas/message.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/jms/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/jms/json_schemas/server.json b/jms/json_schemas/server.json deleted file mode 100644 index c2810f7e..00000000 --- a/jms/json_schemas/server.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/jms/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/kafka/README.md b/kafka/README.md index f26cd7bd..17fcb92e 100644 --- a/kafka/README.md +++ b/kafka/README.md @@ -57,8 +57,6 @@ This object MUST contain only the properties defined above. ##### Example -This example is valid for any Confluent compatible schema registry. Here we describe the implementation using the first 4 bytes in payload to store schema identifier. - ```yaml channels: user-signedup: @@ -122,16 +120,18 @@ This object MUST contain only the properties defined above. ```yaml channels: user-signedup: - subscribe: - bindings: - kafka: - groupId: - type: string - enum: ['myGroupId'] - clientId: - type: string - enum: ['myClientId'] - bindingVersion: '0.4.0' +operations: + userSignup: + action: receive + bindings: + kafka: + groupId: + type: string + enum: ['myGroupId'] + clientId: + type: string + enum: ['myClientId'] + bindingVersion: '0.4.0' ``` @@ -145,7 +145,7 @@ This object contains information about the message representation in Kafka. Field Name | Type | Description ---|:---:|--- -`key` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) \| [AVRO Schema Object](https://avro.apache.org/docs/current/spec.html) | The message key. +`key` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) \| [AVRO Schema Object](https://avro.apache.org/docs/current/spec.html) | The message key. **NOTE**: You can also use the [reference object](referenceObject) way. `schemaIdLocation` | string | If a Schema Registry is used when performing this operation, tells where the id of schema is stored (e.g. `header` or `payload`). | OPTIONAL | MUST NOT be specified if `schemaRegistryUrl` is not specified at the Server level `schemaIdPayloadEncoding` | string | Number of bytes or vendor specific values when schema id is encoded in payload (e.g `confluent`/ `apicurio-legacy` / `apicurio-new`). | OPTIONAL | MUST NOT be specified if `schemaRegistryUrl` is not specified at the Server level `schemaLookupStrategy` | string | Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied. | OPTIONAL | MUST NOT be specified if `schemaRegistryUrl` is not specified at the Server level @@ -158,8 +158,9 @@ This example is valid for any Confluent compatible schema registry. Here we desc ```yaml channels: test: - publish: - message: + address: test-topic + messages: + testMessage: bindings: kafka: key: @@ -175,8 +176,9 @@ This is another example that describes the use if Apicurio schema registry. We d ```yaml channels: test: - publish: - message: + address: test-topic + messages: + testMessage: bindings: kafka: key: @@ -188,5 +190,5 @@ channels: bindingVersion: '0.4.0' ``` -[schemaObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#schemaObject -[referenceObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#referenceObject +[schemaObject]: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.15#schemaObject +[referenceObject]: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.15#referenceObject diff --git a/kafka/json_schemas/channel.json b/kafka/json_schemas/channel.json deleted file mode 100644 index b20a1452..00000000 --- a/kafka/json_schemas/channel.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/channel.json", - "title": "Channel Schema", - "description": "This object contains information about the channel representation in Kafka.", - "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": { - "type": "string", - "description": "Kafka topic name if different from channel name." - }, - "partitions": { - "type": "integer", - "minimum": 1, - "description": "Number of partitions configured on this topic." - }, - "replicas": { - "type": "integer", - "minimum": 1, - "description": "Number of replicas configured on this topic." - }, - "topicConfiguration" : { - "description": "Topic configuration properties that are relevant for the API.", - "type": "object", - "additionalProperties": false, - "properties": { - "cleanup.policy": { - "description": "The [`cleanup.policy`](https://kafka.apache.org/documentation/#topicconfigs_cleanup.policy) configuration option.", - "type": "array", - "items":{ - "type": "string", - "enum": ["compact", "delete"] - } - }, - "retention.ms": { - "description": "The [`retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_retention.ms) configuration option.", - "type": "integer", - "minimum": -1 - }, - "retention.bytes": { - "description": "The [`retention.bytes`](https://kafka.apache.org/documentation/#topicconfigs_retention.bytes) configuration option.", - "type": "integer", - "minimum": -1 - }, - "delete.retention.ms": { - "description": "The [`delete.retention.ms`](https://kafka.apache.org/documentation/#topicconfigs_delete.retention.ms) configuration option.", - "type": "integer", - "minimum": 0 - }, - "max.message.bytes": { - "description": "The [`max.message.bytes`](https://kafka.apache.org/documentation/#topicconfigs_max.message.bytes) configuration option.", - "type": "integer", - "minimum": 0 - } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - - }, - "examples": [ - { - "topic": "my-specific-topic", - "partitions": 20, - "replicas": 3, - "bindingVersion": "0.3.0" - } - ] - } - \ No newline at end of file diff --git a/kafka/json_schemas/message.json b/kafka/json_schemas/message.json deleted file mode 100644 index 17358277..00000000 --- a/kafka/json_schemas/message.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/message.json", - "title": "Message Schema", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json" - } - }, - "properties": { - "key": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.0/Reference.json" - } - ], - "description": "The message key." - }, - "schemaIdLocation": { - "type": "string", - "description": "If a Schema Registry is used when performing this operation, tells where the id of schema is stored.", - "enum": ["header", "payload"] - }, - "schemaIdPayloadEncoding": { - "type": "string", - "description": "Number of bytes or vendor specific values when schema id is encoded in payload." - }, - "schemaLookupStrategy": { - "type": "string", - "description": "Freeform string for any naming strategy class to use. Clients should default to the vendor default if not supplied." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - - }, - "examples": [ - { - "key": { - "type": "string", - "enum": [ - "myKey" - ] - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "apicurio-new", - "schemaLookupStrategy": "TopicIdStrategy", - "bindingVersion": "0.3.0" - }, - { - "key": { - "$ref": "path/to/user-create.avsc#/UserCreate" - }, - "schemaIdLocation": "payload", - "schemaIdPayloadEncoding": "4", - "bindingVersion": "0.3.0" - } - ] -} diff --git a/kafka/json_schemas/operation.json b/kafka/json_schemas/operation.json deleted file mode 100644 index 60d14eda..00000000 --- a/kafka/json_schemas/operation.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Kafka.", - "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": { - "groupId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/schema", - "description": "Id of the consumer group." - }, - "clientId": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/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.3.0" - } - ] -} diff --git a/kafka/json_schemas/server.json b/kafka/json_schemas/server.json deleted file mode 100644 index 2a09755f..00000000 --- a/kafka/json_schemas/server.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/kafka/server.json", - "title": "Server Schema", - "description": "This object contains server connection information to a Kafka broker. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "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": { - "schemaRegistryUrl": { - "type": "string", - "description": "API URL for the Schema Registry used when producing Kafka messages (if a Schema Registry was used)." - }, - "schemaRegistryVendor": { - "type": "string", - "description": "The vendor of the Schema Registry and Kafka serdes library that should be used." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.4.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "schemaRegistryUrl": "https://my-schema-registry.com", - "schemaRegistryVendor": "confluent", - "bindingVersion": "0.3.0" - } - ] -} diff --git a/mqtt/README.md b/mqtt/README.md index 7f6d7f9e..28dd2ddb 100644 --- a/mqtt/README.md +++ b/mqtt/README.md @@ -75,7 +75,6 @@ servers: This object MUST NOT contain any properties. Its name is reserved for future use. - ## Operation Binding Object @@ -163,9 +162,10 @@ channels: ``` ```yaml channels: - user/signup: - publish: - message: + userSignup: + address: user/signup + messages: + userSignup: bindings: mqtt: payloadFormatIndicator: 1 diff --git a/mqtt/json_schemas/message.json b/mqtt/json_schemas/message.json deleted file mode 100644 index dd97488e..00000000 --- a/mqtt/json_schemas/message.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/message.json", - "title": "Message Schema", - "description": "This object contains information about the message representation in MQTT.", - "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": { - "payloadFormatIndicator": { - "type": "integer", - "enum": [0, 1], - "description": "1 indicates that the payload is UTF-8 encoded character data. 0 indicates that the payload format is unspecified.", - "default": 0 - }, - "correlationData": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/Reference.json" - } - ], - "description": "Correlation Data is used by the sender of the request message to identify which request the response message is for when it is received." - }, - "contentType": { - "type": "string", - "description": "String describing the content type of the message payload. This should not conflict with the contentType field of the associated AsyncAPI Message object." - }, - "responseTopic": { - "oneOf": [ - { - "type": "string", - "format": "uri-template", - "minLength": 1 - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/Reference.json" - } - ], - "description": "The topic (channel URI) to be used for a response message." - }, - - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "bindingVersion": "0.2.0" - }, - { - "contentType": "application/json", - "correlationData": { - "type": "string", - "format": "uuid" - }, - "responseTopic": "application/responses", - "bindingVersion": "0.2.0" - } - ] -} diff --git a/mqtt/json_schemas/operation.json b/mqtt/json_schemas/operation.json deleted file mode 100644 index fc1b66b8..00000000 --- a/mqtt/json_schemas/operation.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in MQTT.", - "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": { - "qos": { - "type": "integer", - "enum": [0,1,2], - "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." - }, - "messageExpiryInterval": { - "oneOf": [ - { - "type": "integer", - "minimum": 0, - "maximum": 4294967295 - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/Reference.json" - } - ], - "description": "Lifetime of the message in seconds" - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "qos": 2, - "retain": true, - "messageExpiryInterval": 60, - "bindingVersion": "0.2.0" - } - ] -} diff --git a/mqtt/json_schemas/server.json b/mqtt/json_schemas/server.json deleted file mode 100644 index fd413df3..00000000 --- a/mqtt/json_schemas/server.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt/server.json", - "title": "Server Schema", - "description": "This object contains information about the server representation in MQTT.", - "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": { - - "clientId": { - "type": "string", - "description": "The client identifier." - }, - "cleanSession": { - "type": "boolean", - "description": "Whether to create a persistent connection or not. When 'false', the connection will be persistent. This is called clean start in MQTTv5." - }, - "lastWill": { - "type": "object", - "description": "Last Will and Testament configuration.", - "properties": { - "topic": { - "type": "string", - "description": "The topic where the Last Will and Testament message will be sent." - }, - "qos": { - "type": "integer", - "enum": [0,1,2], - "description": "Defines how hard the broker/client will try to ensure that the Last Will and Testament message is received. Its value MUST be either 0, 1 or 2." - }, - "message": { - "type": "string", - "description": "Last Will message." - }, - "retain": { - "type": "boolean", - "description": "Whether the broker should retain the Last Will and Testament message or not." - } - } - }, - "keepAlive": { - "type": "integer", - "description": "Interval in seconds of the longest period of time the broker and the client can endure without sending a message." - }, - "sessionExpiryInterval": { - "oneOf": [ - { - "type": "integer", - "minimum": 0 - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/Reference.json" - } - ], - "description": "Interval time in seconds or a Schema Object containing the definition of the interval. The broker maintains a session for a disconnected client until this interval expires." - }, - "maximumPacketSize": { - "oneOf": [ - { - "type": "integer", - "minimum": 1, - "maximum": 4294967295 - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.6.0/Reference.json" - } - ], - "description": "Number of bytes or a Schema Object representing the Maximum Packet Size the Client is willing to accept." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "clientId": "guest", - "cleanSession": true, - "lastWill": { - "topic": "/last-wills", - "qos": 2, - "message": "Guest gone offline.", - "retain": false - }, - "keepAlive": 60, - "sessionExpiryInterval": 120, - "maximumPacketSize": 1024, - "bindingVersion": "0.2.0" - } - ] -} diff --git a/mqtt5/json_schemas/server.json b/mqtt5/json_schemas/server.json deleted file mode 100644 index 22241a49..00000000 --- a/mqtt5/json_schemas/server.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/mqtt5/server.json", - "title": "Server Schema", - "description": "This object contains information about the server representation in MQTT5.", - "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": { - - "sessionExpiryInterval": { - "oneOf": [ - { - "type": "integer", - "minimum": 0 - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.0/Reference.json" - } - ], - "description": "Session Expiry Interval in seconds or a Schema Object containing the definition of the interval." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "sessionExpiryInterval": 60, - "bindingVersion": "0.2.0" - }, - { - "sessionExpiryInterval": { - "type": "integer", - "minimum": 100 - }, - "bindingVersion": "0.2.0" - } - ] -} - diff --git a/nats/json_schemas/operation.json b/nats/json_schemas/operation.json deleted file mode 100644 index d98851e8..00000000 --- a/nats/json_schemas/operation.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/nats/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in NATS.", - "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": { - "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.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "queue": "MyCustomQueue", - "bindingVersion": "0.1.0" - } - ] -} diff --git a/pulsar/json_schemas/channel.json b/pulsar/json_schemas/channel.json deleted file mode 100644 index 021bf3a2..00000000 --- a/pulsar/json_schemas/channel.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/pulsar/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\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v4.0.0/schemas/2.5.0.json#/definitions/http://asyncapi.com/definitions/2.5.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" - } - ] - } - \ No newline at end of file diff --git a/pulsar/json_schemas/server.json b/pulsar/json_schemas/server.json deleted file mode 100644 index 4167d2d9..00000000 --- a/pulsar/json_schemas/server.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/pulsar/server.json", - "title": "Server Schema", - "description": "This object contains server information of Pulsar broker, which covers cluster and tenant admin configuration. This object contains additional information not possible to represent within the core AsyncAPI specification.", - "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": { - "tenant": { - "type": "string", - "description": "The pulsar tenant. If omitted, 'public' MUST be assumed." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "tenant": "contoso", - "bindingVersion": "0.1.0" - } - ] -} diff --git a/sns/json_schemas/channel.json b/sns/json_schemas/channel.json deleted file mode 100644 index 6ab5e2f6..00000000 --- a/sns/json_schemas/channel.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "$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/sns/json_schemas/operation.json b/sns/json_schemas/operation.json deleted file mode 100644 index 25eb5935..00000000 --- a/sns/json_schemas/operation.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "$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/solace/json_schemas/operation.json b/solace/json_schemas/operation.json deleted file mode 100644 index 60e59fc3..00000000 --- a/solace/json_schemas/operation.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/solace/operation.json", - "title": "Operation Schema", - "description": "This object contains information about the operation representation in Solace.", - "type": "object", - "additionalProperties": false, - "properties": { - "destinations": { - "description": "The list of Solace destinations referenced in the operation.", - "type": "array", - "items": { - "type": "object", - "properties": { - "deliveryMode": { - "type": "string", - "enum": [ - "direct", - "persistent" - ] - } - }, - "oneOf": [ - { - "properties": { - "destinationType": { - "type": "string", - "const": "queue", - "description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name." - }, - "queue": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the queue" - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the queue subscribes to.", - "items": { - "type": "string" - } - }, - "accessType": { - "type": "string", - "enum": [ - "exclusive", - "nonexclusive" - ] - }, - "maxTtl": { - "type": "string", - "description": "The maximum TTL to apply to messages to be spooled." - }, - "maxMsgSpoolUsage": { - "type": "string", - "description": "The maximum amount of message spool that the given queue may use" - } - } - } - } - }, - { - "properties": { - "destinationType": { - "type": "string", - "const": "topic", - "description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name." - }, - "topicSubscriptions": { - "type": "array", - "description": "The list of topics that the client subscribes to.", - "items": { - "type": "string" - } - } - } - } - ] - } - } - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding. If omitted, \"latest\" MUST be assumed." - }, - "examples": [ - { - "bindingVersion": "0.2.0", - "destinations": [ - { - "destinationType": "queue", - "queue": { - "name": "sampleQueue", - "topicSubscriptions": [ - "samples/*" - ], - "accessType": "nonexclusive" - } - }, - { - "destinationType": "topic", - "topicSubscriptions": [ - "samples/*" - ] - } - ] - } - ] -} diff --git a/solace/json_schemas/server.json b/solace/json_schemas/server.json deleted file mode 100644 index e42c9d55..00000000 --- a/solace/json_schemas/server.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/solace/server.json", - "title": "Server Schema", - "description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\-\\_]+$": { - "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension" - } - }, - "properties": { - "msgVpn": { - "type": "string", - "description": "The name of the Virtual Private Network to connect to on the Solace broker." - }, - "bindingVersion": { - "type": "string", - "enum": [ - "0.2.0" - ], - "description": "The version of this binding." - } - }, - "examples": [ - { - "msgVpn": "ProdVPN", - "bindingVersion": "0.2.0" - } - ] -} diff --git a/sqs/json_schemas/channel.json b/sqs/json_schemas/channel.json deleted file mode 100644 index 6e5279d7..00000000 --- a/sqs/json_schemas/channel.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "$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/sqs/json_schemas/operation.json b/sqs/json_schemas/operation.json deleted file mode 100644 index 9bd1e5bf..00000000 --- a/sqs/json_schemas/operation.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "$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/websockets/json_schemas/channel.json b/websockets/json_schemas/channel.json deleted file mode 100644 index 15b3da52..00000000 --- a/websockets/json_schemas/channel.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/bindings/websockets/channel.json", - "title": "Channel Schema", - "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\\.\\-\\_]+$": { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "oneOf": [ - { - "$ref": "https://asyncapi.com/definitions/2.4.0/schema.json" - }, - { - "$ref": "https://asyncapi.com/definitions/2.4.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": { - "type": "string", - "enum": [ - "0.1.0" - ], - "description": "The version of this binding. If omitted, 'latest' MUST be assumed." - } - }, - "examples": [ - { - "method": "POST", - "bindingVersion": "0.1.0" - } - ] -}