Skip to content

Commit

Permalink
Merge branch 'master' into char0n/schema-object-consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Jan 16, 2023
2 parents cea2cac + c175a70 commit 2243b40
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This repository contains the specifications for each AsyncAPI protocol binding.
* [MQTT binding](./mqtt)
* [MQTT5 binding](./mqtt5)
* [NATS binding](./nats)
* [Pulsar](./pulsar)
* [Redis binding](./redis)
* [SNS binding](./sns)
* [Solace binding](./solace)
Expand Down
3 changes: 0 additions & 3 deletions ibmmq/json_schemas/channel.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
"properties": {
"destinationType": { "const": "topic" }
},
"required": [
"topic"
],
"not": {
"required": [
"queue"
Expand Down
41 changes: 36 additions & 5 deletions mqtt5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,44 @@ This document defines how to describe MQTT 5-specific information on AsyncAPI.

## Version

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


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

## Server Binding Object

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


This object contains information about the server representation in MQTT5.

##### Fixed Fields

Field Name | Type | Description
---|:---:|---
<a name="serverBindingObjectSessionExpiryInterval"></a>`sessionExpiryInterval` | [Schema Object][schemaObject] \| [Reference Object](referenceObject) \| integer | Session Expiry Interval in seconds or a Schema Object containing the definition of the interval.
<a name="serverBindingObjectBindingVersion"></a>`bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed.

This object MUST contain only the properties defined above.

##### Example

```yaml
servers:
production:
bindings:
mqtt5:
sessionExpiryInterval: 60
bindingVersion: 0.2.0
```
```yaml
servers:
production:
bindings:
mqtt5:
sessionExpiryInterval:
type: integer
minimum: 100
bindingVersion: 0.2.0
```
<a name="channel"></a>
Expand All @@ -38,4 +66,7 @@ This object MUST NOT contain any properties. Its name is reserved for future use
## Message Binding Object
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://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject
[referenceObject]: https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#referenceObject
52 changes: 52 additions & 0 deletions mqtt5/json_schemas/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"$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"
}
]
}

0 comments on commit 2243b40

Please sign in to comment.