From 005dc42433e1c6e02859bf3fdc5f4369636a2a70 Mon Sep 17 00:00:00 2001 From: sinavir Date: Sat, 12 Oct 2024 17:37:27 +0200 Subject: [PATCH] fix(documentation): Update documentation --- api-docs/openapi.json | 72 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/api-docs/openapi.json b/api-docs/openapi.json index b5a561c..5fc8645 100644 --- a/api-docs/openapi.json +++ b/api-docs/openapi.json @@ -156,6 +156,60 @@ } } } + }, + "/control-box": { + "get": { + "summary": "Get control box information", + "operationId": "viewBox", + "parameters": [], + "responses": { + "200": { + "description": "Control box info", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Box" + } + } + } + } + } + }, + "post": { + "summary": "Change box state", + "description": "Changes box state, you need to be cof to act on this endpoint. The json do not need to contain all fields, it can be partial and only the provided values will be updated.", + "operationId": "changeBox", + "parameters": [], + "security": [ + { + "bearerAuth": [ + "exp", + "scope", + "user", + "is_cof", + "sub" + ] + } + ], + "requestBody": { + "description": "Box state", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Box" + } + } + } + }, + "responses": { + "200": { + "description": "Box state updated successfully", + "content": { + } + } + } + } } }, "components": { @@ -181,6 +235,24 @@ "format": "int8" } } + }, + "Box": { + "type": "object", + "required": [ ], + "properties": { + "pan": { + "type": "integer", + "format": "int8" + }, + "tilt": { + "type": "integer", + "format": "int8" + }, + "focus": { + "type": "integer", + "format": "int8" + } + } } }, "securitySchemes": {