Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: initial NATS bindings #6

Merged
merged 13 commits into from
Aug 6, 2021
Merged
17 changes: 5 additions & 12 deletions nats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,26 @@ This document defines how to describe NATS-specific information on AsyncAPI.

Current version is `0.1.0`.


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

## Server Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.



<a name="channel"></a>

## Channel Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.



<a name="operation"></a>

## Operation Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.



<a name="message"></a>
Field Name | Type | Description
---|:---:|---
| <a name="operationBindingObjectQueue"></a>`queue` | string | Defines the name of the queue to use. It MUST NOT exceed 255 characters. |
| <a name="operationBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed. |

<a name="Message"></a>
## Message Binding Object

This object MUST NOT contain any properties. Its name is reserved for future use.
33 changes: 33 additions & 0 deletions nats/json_schemas/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$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"
}
]
}