From e667a8d13ae8d4f777914e98a8169221fe479f30 Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Thu, 31 Aug 2023 12:05:35 +0200 Subject: [PATCH] Formatting of the Json file --- .../td_to_asyncapi/examples/asyncapi.json | 274 +++++++++--------- 1 file changed, 137 insertions(+), 137 deletions(-) diff --git a/packages/td_to_asyncapi/examples/asyncapi.json b/packages/td_to_asyncapi/examples/asyncapi.json index 8d6887d81..92ac5a099 100644 --- a/packages/td_to_asyncapi/examples/asyncapi.json +++ b/packages/td_to_asyncapi/examples/asyncapi.json @@ -1,148 +1,148 @@ { - "asyncapi": "2.0.0", - "info": { - "title": "MyCoffeeMaker-Home", - "version": "unknown", - "description": "Order your coffee remotely!", - "x-AT-context": [ - "https://www.w3.org/2022/wot/td/v1.1", - { - "cov": "http://www.example.org/coap-binding#", - "mqv": "http://www.example.org/mqtt-binding#" - }, - { - "@language": "en" - } - ], - "x-AT-type": "Thing", - "x-name": "MyCoffeeMaker" - }, - "channels": { - "/oneOfTest": { - "subscribe": { - "operationId": "observeoneOfTestproperty", - "tags": [ - { - "name": "properties" - } + "asyncapi": "2.0.0", + "info": { + "title": "MyCoffeeMaker-Home", + "version": "unknown", + "description": "Order your coffee remotely!", + "x-AT-context": [ + "https://www.w3.org/2022/wot/td/v1.1", + { + "cov": "http://www.example.org/coap-binding#", + "mqv": "http://www.example.org/mqtt-binding#" + }, + { + "@language": "en" + } ], - "message": { - "contentType": "application/json", - "payload": { - "oneOf": [ - { - "type": "string", - "readOnly": false, - "writeOnly": false - }, - { - "type": "integer", - "readOnly": false, - "writeOnly": false - }, - { - "type": "null", - "readOnly": false, - "writeOnly": false - } - ], - "readOnly": true, - "writeOnly": false - } + "x-AT-type": "Thing", + "x-name": "MyCoffeeMaker" + }, + "channels": { + "/oneOfTest": { + "subscribe": { + "operationId": "observeoneOfTestproperty", + "tags": [ + { + "name": "properties" + } + ], + "message": { + "contentType": "application/json", + "payload": { + "oneOf": [ + { + "type": "string", + "readOnly": false, + "writeOnly": false + }, + { + "type": "integer", + "readOnly": false, + "writeOnly": false + }, + { + "type": "null", + "readOnly": false, + "writeOnly": false + } + ], + "readOnly": true, + "writeOnly": false + } + }, + "bindings": { + "mqtt": { + "bindingVersion": "0.1.0", + "qos": 1 + } + } + } }, - "bindings": { - "mqtt": { - "bindingVersion": "0.1.0", - "qos": 1 - } + "/maxItemsTest": { + "subscribe": { + "operationId": "observemaxItemsTestproperty", + "tags": [ + { + "name": "properties" + } + ], + "message": { + "contentType": "application/json", + "payload": { + "type": "array", + "readOnly": true, + "writeOnly": false + } + } + } + }, + "/binfull": { + "subscribe": { + "operationId": "subscribebinFullevent", + "tags": [ + { + "name": "events" + } + ], + "message": { + "contentType": "application/json", + "payload": { + "type": "number", + "readOnly": false, + "writeOnly": false + } + } + } } - } }, - "/maxItemsTest": { - "subscribe": { - "operationId": "observemaxItemsTestproperty", - "tags": [ - { - "name": "properties" - } - ], - "message": { - "contentType": "application/json", - "payload": { - "type": "array", - "readOnly": true, - "writeOnly": false - } + "id": "urn:dev:home:coff:type123-SNR123456", + "servers": { + "0": { + "url": "mqtt://iot.eclipse.org", + "protocol": "mqtt" + }, + "1": { + "url": "mqtt://mycoffeemaker.example.com", + "protocol": "mqtt" } - } }, - "/binfull": { - "subscribe": { - "operationId": "subscribebinFullevent", - "tags": [ - { - "name": "events" - } - ], - "message": { - "contentType": "application/json", - "payload": { - "type": "number", - "readOnly": false, - "writeOnly": false - } + "tags": [ + { + "name": "properties", + "description": "A property can expose a variable of a Thing, this variable might be readable, writable and/or observable.", + "externalDocs": { + "url": "https://www.w3.org/TR/wot-thing-description/#propertyaffordance", + "description": "Find out more about Property Affordances." + } + }, + { + "name": "actions", + "description": "An action can expose something to be executed by a Thing, an action can be invoked.", + "externalDocs": { + "url": "https://www.w3.org/TR/wot-thing-description/#actionaffordance", + "description": "Find out more about Action Affordances." + } + }, + { + "name": "events", + "description": "An event can expose a notification by a Thing, this notification can be subscribed and/or unsubscribed.", + "externalDocs": { + "url": "https://www.w3.org/TR/wot-thing-description/#eventaffordance", + "description": "Find out more about Event Affordances." + } + } + ], + "components": { + "securitySchemes": { + "basic_sc": { + "type": "http", + "scheme": "basic", + "x-in": "header" + } } - } - } - }, - "id": "urn:dev:home:coff:type123-SNR123456", - "servers": { - "0": { - "url": "mqtt://iot.eclipse.org", - "protocol": "mqtt" - }, - "1": { - "url": "mqtt://mycoffeemaker.example.com", - "protocol": "mqtt" - } - }, - "tags": [ - { - "name": "properties", - "description": "A property can expose a variable of a Thing, this variable might be readable, writable and/or observable.", - "externalDocs": { - "url": "https://www.w3.org/TR/wot-thing-description/#propertyaffordance", - "description": "Find out more about Property Affordances." - } - }, - { - "name": "actions", - "description": "An action can expose something to be executed by a Thing, an action can be invoked.", - "externalDocs": { - "url": "https://www.w3.org/TR/wot-thing-description/#actionaffordance", - "description": "Find out more about Action Affordances." - } }, - { - "name": "events", - "description": "An event can expose a notification by a Thing, this notification can be subscribed and/or unsubscribed.", - "externalDocs": { - "url": "https://www.w3.org/TR/wot-thing-description/#eventaffordance", - "description": "Find out more about Event Affordances." - } - } - ], - "components": { - "securitySchemes": { - "basic_sc": { - "type": "http", - "scheme": "basic", - "x-in": "header" - } + "externalDocs": { + "url": "http://plugfest.thingweb.io/playground/", + "description": "This AsyncAPI instance was generated from a Web of Things (WoT) - Thing Description by the WoT Playground" } - }, - "externalDocs": { - "url": "http://plugfest.thingweb.io/playground/", - "description": "This AsyncAPI instance was generated from a Web of Things (WoT) - Thing Description by the WoT Playground" - } }