From 9eb5109f639b8e2c975d30e7bf96c105134496f1 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 25 Jul 2023 12:03:14 +0200 Subject: [PATCH] feat: adapt MQTT bindings to v3 (#205) --- mqtt/README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/mqtt/README.md b/mqtt/README.md index 0161fdb9..c259eb8c 100644 --- a/mqtt/README.md +++ b/mqtt/README.md @@ -6,7 +6,7 @@ This document defines how to describe MQTT-specific information on AsyncAPI. ## Version -Current version is `0.1.0`. +Current version is `0.2.0`. @@ -46,18 +46,15 @@ servers: message: Guest gone offline. retain: false keepAlive: 60 - bindingVersion: 0.1.0 + bindingVersion: 0.2.0 ``` - ## Channel Binding Object This object MUST NOT contain any properties. Its name is reserved for future use. - - ## Operation Binding Object @@ -66,11 +63,11 @@ This object contains information about the operation representation in MQTT. ##### Fixed Fields -Field Name | Type | Applies To | Description +Field Name | Type | Applies To Action | Description ---|:---:|:---:|--- -`qos` | integer | Publish, Subscribe | 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` | boolean | Publish, Subscribe | Whether the broker should retain the message or not. -`bindingVersion` | string | Publish, Subscribe | The version of this binding. If omitted, "latest" MUST be assumed. +`qos` | integer | `receive`, `send` | 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` | boolean | `receive`, `send` | Whether the broker should retain the message or not. +`bindingVersion` | string | `receive`, `send` | The version of this binding. If omitted, "latest" MUST be assumed. This object MUST contain only the properties defined above. @@ -79,12 +76,14 @@ This object MUST contain only the properties defined above. ```yaml channels: user/signup: - publish: - bindings: - mqtt: - qos: 2 - retain: true - bindingVersion: 0.1.0 +operations: + userSignup: + action: receive + bindings: + mqtt: + qos: 2 + retain: true + bindingVersion: 0.2.0 ``` @@ -104,10 +103,11 @@ This object MUST contain only the properties defined above. ```yaml channels: - user/signup: - publish: - message: + userSignup: + address: user/signup + messages: + userSignup: bindings: mqtt: - bindingVersion: 0.1.0 + bindingVersion: 0.2.0 ```