From 74b51d000f0e55a80d03a05f0c9affe70fb30f58 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Wed, 23 Jan 2019 09:40:00 +0000 Subject: [PATCH] Add support for coap scheme --- README.md | 2 +- schema/asyncapi.json | 5 +++-- schema/asyncapi.yaml | 3 ++- v2/CHANGELOG.md | 6 ++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3319034f3..23090abf6 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,7 @@ An object representing a Server. Field Name | Type | Description ---|:---:|--- url | `string` | **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`. -scheme | `string` | **REQUIRED**. The scheme this URL supports for connection. The value MUST be one of the following: `kafka`, `kafka-secure`, `amqp`, `amqps`, `mqtt`, `secure-mqtt`, `ws`, `wss`, `stomp`, `stomps`. +scheme | `string` | **REQUIRED**. The scheme this URL supports for connection. The value MUST be one of the following: `kafka`, `kafka-secure`, `amqp`, `amqps`, `mqtt`, `secure-mqtt`, `ws`, `wss`, `stomp`, `stomps`, `jms` or `coap`. schemeVersion | `string` | The version of the scheme. For instance: AMQP `0.9.1`, Kafka `1.0.0`, etc. description | `string` | An optional string describing the host designated by the URL. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. variables | Map[`string`, [Server Variable Object](#serverVariableObject)] | A map between a variable name and its value. The value is used for substitution in the server's URL template. diff --git a/schema/asyncapi.json b/schema/asyncapi.json index 83ee5ccbe..8ee2cc589 100644 --- a/schema/asyncapi.json +++ b/schema/asyncapi.json @@ -539,7 +539,8 @@ "stomps", "http", "https", - "jms" + "jms", + "coap" ] }, "schemeVersion": { @@ -1341,4 +1342,4 @@ } } } -} \ No newline at end of file +} diff --git a/schema/asyncapi.yaml b/schema/asyncapi.yaml index 3a54cd04d..57e15fdd5 100644 --- a/schema/asyncapi.yaml +++ b/schema/asyncapi.yaml @@ -454,6 +454,7 @@ definitions: - http - https - jms + - coap schemeVersion: description: TODO type: string @@ -1044,4 +1045,4 @@ definitions: properties: $ref: type: string - format: uri \ No newline at end of file + format: uri diff --git a/v2/CHANGELOG.md b/v2/CHANGELOG.md index fc0c6ba11..ed59df662 100644 --- a/v2/CHANGELOG.md +++ b/v2/CHANGELOG.md @@ -13,6 +13,7 @@ * [Callback messages.](#callback-messages) * [Support for "oneOf", "anyOf", and "not" on schemas.](#support-for-oneof-anyof-and-not-on-schemas) * [Override default topic separator.](#override-default-topic-separator) + * [Added CoAP scheme.](#added-coap-scheme) ## Descriptions @@ -81,3 +82,8 @@ Kudos to [@wout3r](https://github.com/wout3r) and [@SensibleWood](https://github ### Override default topic separator It is now possible to override the default topic separator by specifying `defaultTopicSeparator`. This value will be used to concatenate the base topic (if it exists) with every topic. A common use case is to set it to `/` when documenting MQTT APIs. + +### Added CoAP scheme + +You can now use `coap` as a scheme. Thanks [@MikeRalphson](https://github.com/MikeRalphson). +