Update swagger

This commit is contained in:
Djuri Baars 2023-11-17 22:05:32 +01:00
parent 8e0b7a2ef9
commit 58fa1e7ecb
2 changed files with 66 additions and 1 deletions

View file

@ -45,7 +45,14 @@
"summary": "Get current settings", "summary": "Get current settings",
"responses": { "responses": {
"200": { "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}": { "/lights/{color}": {
"get": { "get": {
"tags": [ "tags": [
@ -255,6 +275,26 @@
}, },
"components": { "components": {
"schemas": { "schemas": {
"ArrayOfLeds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"red": {
"type": "integer"
},
"green": {
"type": "integer"
},
"blue": {
"type": "integer"
},
"hex": {
"type": "string"
}
}
}
},
"Settings": { "Settings": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -30,6 +30,10 @@ paths:
responses: responses:
'200': '200':
description: successful operation description: successful operation
content:
application/json:
schema:
$ref: #/components/schemas/ArrayOfLeds
post: post:
tags: tags:
- system - system
@ -123,6 +127,14 @@ paths:
responses: responses:
'200': '200':
description: successful operation description: successful operation
/lights:
get:
tags:
- lights
summary: Get LEDs status
responses:
'200':
description: successful operation
/lights/{color}: /lights/{color}:
get: get:
tags: tags:
@ -157,6 +169,19 @@ paths:
description: successful operation description: successful operation
components: components:
schemas: schemas:
ArrayOfLeds:
type: array
items:
type: object
properties:
red:
type: integer
green:
type: integer
blue:
type: integer
hex:
type: string
Settings: Settings:
type: object type: object
properties: properties: