Skip to content

Commit

Permalink
Merge branch 'master' into suggest_conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya authored Nov 6, 2023
2 parents 51b68f9 + b1e7736 commit b1c237f
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 23 deletions.
2 changes: 1 addition & 1 deletion anypointmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The Anypoint MQ [Message Binding Object](https://github.com/asyncapi/spec/blob/m

Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject) | **OPTIONAL**. A Schema object containing the definitions for Anypoint MQ-specific headers (so-called protocol headers). This schema MUST be of type `object` and have a `properties` key. Examples of Anypoint MQ protocol headers are `messageId` and `messageGroupId`.
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject) \| [Reference Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject) | **OPTIONAL**. A Schema object containing the definitions for Anypoint MQ-specific headers (so-called protocol headers). This schema MUST be of type `object` and have a `properties` key. Examples of Anypoint MQ protocol headers are `messageId` and `messageGroupId`.
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.

Note that application headers must be specified in the [`headers` field of the standard Message Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#messageObjectHeaders) and are transmitted in the [`properties` section of the Anypoint MQ message](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/anypoint-mq-broker/).
Expand Down
11 changes: 9 additions & 2 deletions anypointmq/json_schemas/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
"$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json"
}
},
"properties": {
"headers": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
"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": {
Expand Down
7 changes: 4 additions & 3 deletions http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Field Name | Type | Description
---|:---:|---
<a name="operationBindingObjectType"></a>`type` | string | **REQUIRED**. Type of operation. Its value MUST be either `request` or `response`.
<a name="operationBindingObjectMethod"></a>`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`.
<a name="operationBindingObjectQuery"></a>`query` | [Schema Object][schemaObject] | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key.
<a name="operationBindingObjectQuery"></a>`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.
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -74,7 +74,7 @@ This object contains information about the message representation in HTTP.
Field Name | Type | Description
---|:---:|---
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] | A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type `object` and have a `properties` key.
<a name="messageBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | A Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type `object` and have a `properties` key.
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand All @@ -96,4 +96,5 @@ channels:
bindingVersion: '0.1.0'
```

[schemaObject]: https://www.asyncapi.com/docs/specifications/2.0.0/#schemaObject
[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject
11 changes: 9 additions & 2 deletions http/json_schemas/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
"$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json"
}
},
"properties": {
"headers": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
"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": {
Expand Down
11 changes: 9 additions & 2 deletions http/json_schemas/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
"$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json"
}
},
"properties": {
Expand Down Expand Up @@ -35,7 +35,14 @@
"description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'."
},
"query": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
"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": {
Expand Down
9 changes: 7 additions & 2 deletions kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ This object contains information about the operation representation in Kafka (eg

Field Name | Type | Description | Applicability [default] | Constraints
---|:---:|:---:|:---:|---
<a name="operationBindingObjectGroupId"></a>`groupId` | [Schema Object][schemaObject] | Id of the consumer group. | OPTIONAL | -
<a name="operationBindingObjectClientId"></a>`clientId` | [Schema Object][schemaObject] | Id of the consumer inside a consumer group. | OPTIONAL | -
<a name="operationBindingObjectGroupId"></a>`groupId` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | Id of the consumer group. | OPTIONAL | -
<a name="operationBindingObjectClientId"></a>`clientId` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | Id of the consumer inside a consumer group. | OPTIONAL | -
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed. | OPTIONAL [`latest`] | -

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -145,10 +145,14 @@ This object contains information about the message representation in Kafka.

Field Name | Type | Description
---|:---:|---
<<<<<<< HEAD
<a name="messageBindingObjectKey"></a>`key` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) \| [AVRO Schema Object](https://avro.apache.org/docs/current/spec.html) | The message key.
=======
<a name="messageBindingObjectKey"></a>`key` | [Schema Object][schemaObject] \| [AVRO Schema Object](https://avro.apache.org/docs/current/spec.html) | The message key. **NOTE**: You can also use the [reference object](https://asyncapi.io/docs/specifications/v2.4.0#referenceObject) way.
<a name="messageBindingObjectSchemaIdLocation"></a>`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
<a name="messageBindingObjectSchemaIdPayloadEncoding"></a>`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
<a name="messageBindingObjectSchemaLookupStrategy"></a>`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
>>>>>>> master
<a name="messageBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand Down Expand Up @@ -189,3 +193,4 @@ channels:
```

[schemaObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#schemaObject
[referenceObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#referenceObject
11 changes: 9 additions & 2 deletions kafka/json_schemas/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
"$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json"
}
},
"properties": {
"key": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.14.0/schemas/2.4.0.json#/definitions/schema",
"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": {
Expand Down
4 changes: 3 additions & 1 deletion sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For publish-subscribe scenarios, use as a **publish** Operation Binding Object,

## Version

Current version is `0.1.0`.
Current version is `0.2.0`.

<a name="server"></a>

Expand Down Expand Up @@ -48,6 +48,8 @@ An SQS queue can set up a Dead Letter Queue as part of a Redelivery Policy. To s
|---|:---:|---|
| <a name="queueObjectName"></a>`name` | string | **Required.** 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.|
| <a name="fifoQueue"></a>`fifoQueue` | boolean | **Required.** Is this a FIFO queue? |
| <a name="deduplicationScope"></a>`deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. **This property applies only to high throughput for FIFO queues.** |
| <a name="fifoThroughputLimit"></a>`fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. **The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. Setting both these values as such will enable high throughput on a FIFO queue. As above, this property applies only to high throughput for FIFO queues.** |
| <a name="queueObjectDeliveryDelay"></a>`deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a *delay queue*. Range is 0 to 15 minutes. Defaults to 0. |
| <a name="queueObjectVisbilityTimeout"></a>`visibilityTimeout` |integer| **Optional.** 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. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds. |
| <a name="queueObjectRecieveMessageWaitTime"></a>`receiveMessageWaitTime` |integer| **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) 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. |
Expand Down
20 changes: 19 additions & 1 deletion sqs/json_schemas/channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
},
"bindingVersion": {
"type": "string",
"description": "The version of this binding.",
"enum": [
"0.1.0",
"0.2.0"
],
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
"default": "latest"
}
},
Expand All @@ -47,6 +51,18 @@
"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.",
Expand Down Expand Up @@ -207,6 +223,8 @@
"queue": {
"name": "myQueue",
"fifoQueue": true,
"deduplicationScope": "messageGroup",
"fifoThroughputLimit": "perMessageGroupId",
"deliveryDelay": 15,
"visibilityTimeout": 60,
"receiveMessageWaitTime": 0,
Expand Down
21 changes: 20 additions & 1 deletion sqs/json_schemas/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
},
"bindingVersion": {
"type": "string",
"description": "The version of this binding.",
"enum": [
"0.1.0",
"0.2.0"
],
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
"default": "latest"
}
},
Expand Down Expand Up @@ -50,6 +54,18 @@
"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.",
Expand Down Expand Up @@ -209,6 +225,9 @@
"queues": [
{
"name": "myQueue",
"fifoQueue": true,
"deduplicationScope": "messageGroup",
"fifoThroughputLimit": "perMessageGroupId",
"deliveryDelay": 10,
"redrivePolicy": {
"deadLetterQueue": {
Expand Down
7 changes: 4 additions & 3 deletions websockets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ When using WebSockets, the channel represents the connection. Unlike other proto
Field Name | Type | Description
---|:---:|---
<a name="operationBindingObjectMethod"></a>`method` | string | The HTTP method to use when establishing the connection. Its value MUST be either `GET` or `POST`.
<a name="operationBindingObjectQuery"></a>`query` | [Schema Object][schemaObject] | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key.
<a name="operationBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] | 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.
<a name="operationBindingObjectQuery"></a>`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.
<a name="operationBindingObjectHeaders"></a>`headers` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) | 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.
<a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.
Expand All @@ -49,4 +49,5 @@ This object MUST NOT contain any properties. Its name is reserved for future use
This object MUST NOT contain any properties. Its name is reserved for future use.


[schemaObject]: https://www.asyncapi.com/docs/specifications/2.0.0/#schemaObject
[schemaObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject
20 changes: 17 additions & 3 deletions websockets/json_schemas/channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
"$ref": "https://asyncapi.com/definitions/2.4.0/specificationExtension.json"
}
},
"properties": {
Expand All @@ -20,11 +20,25 @@
"description": "The HTTP method to use when establishing the connection. Its value MUST be either 'GET' or 'POST'."
},
"query": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
"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": {
"$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
"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": {
Expand Down

0 comments on commit b1c237f

Please sign in to comment.