From 8b99db0be8a1bcca019940634d9a9a1a6a0a11b3 Mon Sep 17 00:00:00 2001 From: kbeaugrand Date: Fri, 25 Nov 2022 06:03:19 +0000 Subject: [PATCH] Adds auto-generated Open API doc. --- docs/swagger.json | 200 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) diff --git a/docs/swagger.json b/docs/swagger.json index 9f1e91d50..7739d4cc6 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -671,6 +671,55 @@ } } }, + "/api/devices/{deviceId}/telemetry": { + "get": { + "tags": [ + "IoT Devices" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "style": "simple", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + } + } + } + } + } + }, "/api/edge/devices": { "get": { "tags": [ @@ -2006,6 +2055,55 @@ } } }, + "/api/lorawan/devices/{deviceId}/telemetry": { + "get": { + "tags": [ + "LoRa WAN" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "style": "simple", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + }, + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LoRaDeviceTelemetryDto" + } + } + } + } + } + } + } + }, "/api/lorawan/devices/gateways": { "get": { "tags": [ @@ -4969,6 +5067,23 @@ "additionalProperties": false, "description": "LoRa Device model." }, + "LoRaDeviceTelemetryDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "enqueuedTime": { + "type": "string", + "format": "date-time" + }, + "telemetry": { + "$ref": "#/components/schemas/LoRaTelemetryDto" + } + }, + "additionalProperties": false + }, "LoRaGatewayIDList": { "type": "object", "properties": { @@ -4982,6 +5097,91 @@ }, "additionalProperties": false }, + "LoRaTelemetryDto": { + "type": "object", + "properties": { + "time": { + "type": "integer", + "format": "int64" + }, + "gpsTime": { + "type": "integer", + "format": "int32" + }, + "freq": { + "type": "number", + "format": "double" + }, + "chan": { + "type": "integer", + "format": "int32" + }, + "rfch": { + "type": "integer", + "format": "int32" + }, + "modu": { + "type": "string", + "nullable": true + }, + "datr": { + "type": "string", + "nullable": true + }, + "rssi": { + "type": "number", + "format": "double" + }, + "lsnr": { + "type": "number", + "format": "float" + }, + "data": { + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32" + }, + "fcnt": { + "type": "integer", + "format": "int32" + }, + "edgets": { + "type": "integer", + "format": "int64" + }, + "rawdata": { + "type": "string", + "nullable": true + }, + "deviceEUI": { + "type": "string", + "nullable": true + }, + "gatewayID": { + "type": "string", + "nullable": true + }, + "stationEui": { + "type": "string", + "nullable": true + }, + "dupMsg": { + "type": "boolean", + "nullable": true + }, + "extraData": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, "PortalMetric": { "type": "object", "properties": {