-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Musilah <[email protected]>
- Loading branch information
Showing
31 changed files
with
456 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
# Copyright (c) Abstract Machines | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
asyncapi: '2.6.0' | ||
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/mqtt.yml' | ||
asyncapi: "2.6.0" | ||
id: "https://github.com/absmach/magistrala/blob/master/api/asyncapi/mqtt.yml" | ||
info: | ||
title: Magistrala MQTT Adapter | ||
version: '1.0.0' | ||
version: "1.0.0" | ||
contact: | ||
name: Magistrala Team | ||
url: 'https://github.com/absmach/magistrala' | ||
url: "https://github.com/absmach/magistrala" | ||
email: [email protected] | ||
description: | | ||
MQTT adapter provides an MQTT API for sending messages through the platform. MQTT adapter uses [mProxy](https://github.com/absmach/mproxy) for proxying traffic between client and MQTT broker. | ||
Additionally, the MQTT adapter and the message broker are replicating the traffic between brokers. | ||
license: | ||
name: Apache 2.0 | ||
url: 'https://github.com/absmach/magistrala/blob/master/LICENSE' | ||
|
||
|
||
url: "https://github.com/absmach/magistrala/blob/master/LICENSE" | ||
|
||
defaultContentType: application/json | ||
|
||
servers: | ||
|
@@ -29,35 +28,35 @@ servers: | |
variables: | ||
port: | ||
description: Secure connection (TLS) is available through port 8883. | ||
default: '1883' | ||
default: "1883" | ||
enum: | ||
- '1883' | ||
- '8883' | ||
security: | ||
- "1883" | ||
- "8883" | ||
security: | ||
- user-password: [] | ||
|
||
channels: | ||
channels/{channelID}/messages/{subtopic}: | ||
parameters: | ||
channelID: | ||
$ref: '#/components/parameters/channelID' | ||
$ref: "#/components/parameters/channelID" | ||
in: path | ||
required: true | ||
subtopic: | ||
$ref: '#/components/parameters/subtopic' | ||
in: path | ||
$ref: "#/components/parameters/subtopic" | ||
in: path | ||
required: false | ||
|
||
publish: | ||
traits: | ||
- $ref: '#/components/operationTraits/mqtt' | ||
- $ref: "#/components/operationTraits/mqtt" | ||
message: | ||
$ref: '#/components/messages/jsonMsg' | ||
$ref: "#/components/messages/jsonMsg" | ||
subscribe: | ||
traits: | ||
- $ref: '#/components/operationTraits/mqtt' | ||
- $ref: "#/components/operationTraits/mqtt" | ||
message: | ||
$ref: '#/components/messages/jsonMsg' | ||
$ref: "#/components/messages/jsonMsg" | ||
|
||
components: | ||
messages: | ||
|
@@ -96,14 +95,14 @@ components: | |
description: Arbitrary message subtopic. | ||
schema: | ||
type: string | ||
default: '' | ||
default: "" | ||
|
||
securitySchemes: | ||
user-password: | ||
type: userPassword | ||
description: | | ||
username is thing ID connected to the channel defined in the mqtt topic and | ||
password is thing key corresponding to the thing ID | ||
password is thing key corresponding to the thing ID | ||
operationTraits: | ||
mqtt: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,25 @@ | |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
asyncapi: 2.6.0 | ||
id: 'https://github.com/absmach/magistrala/blob/master/api/asyncapi/websocket.yml' | ||
id: "https://github.com/absmach/magistrala/blob/master/api/asyncapi/websocket.yml" | ||
info: | ||
title: Magistrala WebSocket adapter | ||
description: WebSocket adapter provides a WebSocket API for sending messages through communication channels. WebSocket adapter uses [mProxy](https://github.com/absmach/mproxy) for proxying traffic between client and MQTT broker. | ||
version: '1.0.0' | ||
version: "1.0.0" | ||
contact: | ||
name: Magistrala Team | ||
url: 'https://github.com/absmach/magistrala' | ||
url: "https://github.com/absmach/magistrala" | ||
email: [email protected] | ||
license: | ||
name: Apache 2.0 | ||
url: 'https://github.com/absmach/magistrala/blob/master/LICENSE' | ||
url: "https://github.com/absmach/magistrala/blob/master/LICENSE" | ||
tags: | ||
- name: WebSocket | ||
defaultContentType: application/json | ||
|
||
servers: | ||
dev: | ||
url: 'ws://{host}:{port}' | ||
url: "ws://{host}:{port}" | ||
protocol: ws | ||
description: Default WebSocket Adapter URL | ||
variables: | ||
|
@@ -29,43 +29,43 @@ servers: | |
default: localhost | ||
port: | ||
description: Magistrala WebSocket Adapter port | ||
default: '8186' | ||
default: "8186" | ||
|
||
channels: | ||
'channels/{channelID}/messages/{subtopic}': | ||
"channels/{channelID}/messages/{subtopic}": | ||
parameters: | ||
channelID: | ||
$ref: '#/components/parameters/channelID' | ||
$ref: "#/components/parameters/channelID" | ||
in: path | ||
required: true | ||
subtopic: | ||
$ref: '#/components/parameters/subtopic' | ||
$ref: "#/components/parameters/subtopic" | ||
in: path | ||
required: false | ||
publish: | ||
summary: Publish messages to a channel | ||
operationId: publishToChannel | ||
message: | ||
$ref: '#/components/messages/jsonMsg' | ||
$ref: "#/components/messages/jsonMsg" | ||
messageId: publishMessage | ||
bindings: | ||
ws: | ||
method: POST | ||
query: | ||
subtopic: '{$request.query.subtopic}' | ||
subtopic: "{$request.query.subtopic}" | ||
security: | ||
- bearerAuth: [] | ||
subscribe: | ||
summary: Subscribe to receive messages from a channel | ||
operationId: subscribeToChannel | ||
message: | ||
$ref: '#/components/messages/jsonMsg' | ||
$ref: "#/components/messages/jsonMsg" | ||
messageId: subscribeMessage | ||
bindings: | ||
ws: | ||
method: GET | ||
query: | ||
subtopic: '{$request.query.subtopic}' | ||
subtopic: "{$request.query.subtopic}" | ||
security: | ||
- bearerAuth: [] | ||
/version: | ||
|
@@ -92,7 +92,7 @@ components: | |
summary: Arbitrary JSON array or object. | ||
contentType: application/json | ||
payload: | ||
$ref: '#/components/schemas/jsonMsg' | ||
$ref: "#/components/schemas/jsonMsg" | ||
schemas: | ||
jsonMsg: | ||
type: object | ||
|
@@ -134,7 +134,7 @@ components: | |
description: Arbitrary message subtopic. | ||
schema: | ||
type: string | ||
default: '' | ||
default: "" | ||
securitySchemes: | ||
bearerAuth: | ||
type: http | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.