Skip to content

Commit

Permalink
Addition of the security parameter in Asyncapi
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-monika committed Aug 29, 2023
1 parent fa18fc5 commit c4c2a02
Show file tree
Hide file tree
Showing 4 changed files with 665 additions and 622 deletions.
274 changes: 137 additions & 137 deletions packages/td_to_asyncapi/examples/asyncapi.json
Original file line number Diff line number Diff line change
@@ -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"
}
"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"
}
],
"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
}
}
}
"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
}
},
"/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
}
}
}
"bindings": {
"mqtt": {
"bindingVersion": "0.1.0",
"qos": 1
}
}
}
},
"id": "urn:dev:home:coff:type123-SNR123456",
"servers": {
"0": {
"url": "mqtt://iot.eclipse.org",
"protocol": "mqtt"
},
"1": {
"url": "mqtt://mycoffeemaker.example.com",
"protocol": "mqtt"
"/maxItemsTest": {
"subscribe": {
"operationId": "observemaxItemsTestproperty",
"tags": [
{
"name": "properties"
}
],
"message": {
"contentType": "application/json",
"payload": {
"type": "array",
"readOnly": true,
"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"
}
"/binfull": {
"subscribe": {
"operationId": "subscribebinFullevent",
"tags": [
{
"name": "events"
}
],
"message": {
"contentType": "application/json",
"payload": {
"type": "number",
"readOnly": false,
"writeOnly": false
}
}
}
}
},
"id": "urn:dev:home:coff:type123-SNR123456",
"servers": {
"0": {
"url": "mqtt://iot.eclipse.org",
"protocol": "mqtt"
},
"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"
"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"
}
}
Loading

0 comments on commit c4c2a02

Please sign in to comment.