From 58fa1e7ecb49388bc4b59444ab3f5af7b3219699 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Fri, 17 Nov 2023 22:05:32 +0100 Subject: [PATCH] Update swagger --- static/swagger.json | 42 +++++++++++++++++++++++++++++++++++++++++- static/swagger.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/static/swagger.json b/static/swagger.json index 24c8231..83ee5ec 100644 --- a/static/swagger.json +++ b/static/swagger.json @@ -45,7 +45,14 @@ "summary": "Get current settings", "responses": { "200": { - "description": "successful operation" + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": null + } + } + } } } }, @@ -201,6 +208,19 @@ } } }, + "/lights": { + "get": { + "tags": [ + "lights" + ], + "summary": "Get LEDs status", + "responses": { + "200": { + "description": "successful operation" + } + } + } + }, "/lights/{color}": { "get": { "tags": [ @@ -255,6 +275,26 @@ }, "components": { "schemas": { + "ArrayOfLeds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "red": { + "type": "integer" + }, + "green": { + "type": "integer" + }, + "blue": { + "type": "integer" + }, + "hex": { + "type": "string" + } + } + } + }, "Settings": { "type": "object", "properties": { diff --git a/static/swagger.yaml b/static/swagger.yaml index a518f62..966d614 100644 --- a/static/swagger.yaml +++ b/static/swagger.yaml @@ -30,6 +30,10 @@ paths: responses: '200': description: successful operation + content: + application/json: + schema: + $ref: #/components/schemas/ArrayOfLeds post: tags: - system @@ -123,6 +127,14 @@ paths: responses: '200': description: successful operation + /lights: + get: + tags: + - lights + summary: Get LEDs status + responses: + '200': + description: successful operation /lights/{color}: get: tags: @@ -157,6 +169,19 @@ paths: description: successful operation components: schemas: + ArrayOfLeds: + type: array + items: + type: object + properties: + red: + type: integer + green: + type: integer + blue: + type: integer + hex: + type: string Settings: type: object properties: