Skip to content

Commit 49b1e8b

Browse files
committed
fix: add missing response examples across Controller endpoints (closes #638)
1 parent c278905 commit 49b1e8b

1 file changed

Lines changed: 88 additions & 2 deletions

File tree

Controller/openapi.yaml

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ paths:
5454
application/json:
5555
schema:
5656
$ref: '#/components/schemas/applicationVersionInfo'
57+
example:
58+
uuid: 550e8400-e29b-41d4-a716-446655440000
59+
product_id: FFC3232-2211
60+
product_hex: '0x32322205'
61+
application:
62+
name: Controller
63+
version: '2026.05.12'
64+
commit: 1a2b3c4
65+
ui:
66+
name: ui
67+
version: '2026.05.12'
68+
commit: 5d6e7f8
5769
'500':
5870
description: Internal Server Error — device identity unavailable
5971
content:
@@ -78,7 +90,7 @@ paths:
7890
- visual-token: []
7991
responses:
8092
'204':
81-
description: No Content
93+
description: Reboot scheduled — the device will restart after a short delay. No response body is returned.
8294
'401':
8395
description: Unauthorized
8496

@@ -365,7 +377,7 @@ paths:
365377
- visual-token: []
366378
responses:
367379
'204':
368-
description: Authorized
380+
description: Authorized — the visual token has been accepted and a long-term authorization session has been created. No response body is returned.
369381
'401':
370382
description: Unauthorized
371383

@@ -647,6 +659,13 @@ paths:
647659
type: array
648660
items:
649661
$ref: '#/components/schemas/uuid'
662+
examples:
663+
Multiple controllers:
664+
value:
665+
- 550e8400-e29b-41d4-a716-446655440000
666+
- 6ba7b810-9dad-11d1-80b4-00c04fd430c8
667+
No controllers:
668+
$ref: '#/components/examples/emptyArray'
650669
'401':
651670
description: Unauthorized
652671
'500':
@@ -681,6 +700,32 @@ paths:
681700
application/json:
682701
schema:
683702
$ref: '#/components/schemas/controller'
703+
example:
704+
name: First Floor
705+
area: Tech Room
706+
mac_address: 'a4:cf:12:7e:3b:01'
707+
ota:
708+
url: https://firmware.fireflylx.com/controller/manifest.json
709+
mqtt:
710+
host: mymqtt.host.com
711+
port: 1883
712+
username: controller1
713+
password: aVery$3cretPassw0r[)
714+
ports:
715+
1:
716+
id: S22
717+
channels:
718+
1:
719+
actions:
720+
- action: TOGGLE
721+
output: 4
722+
outputs:
723+
4:
724+
id: C49
725+
name: Chandelier
726+
area: Foyer
727+
icon: mdi:chandelier
728+
type: VARIABLE
684729
'401':
685730
description: Unauthorized
686731
'404':
@@ -797,6 +842,13 @@ paths:
797842
type: array
798843
items:
799844
$ref: '#/components/schemas/uuid'
845+
examples:
846+
Multiple clients:
847+
value:
848+
- 7c9e6679-7425-40de-944b-e07fc1f90ae7
849+
- f47ac10b-58cc-4372-a567-0e02b2c3d479
850+
No clients:
851+
$ref: '#/components/examples/emptyArray'
800852
'401':
801853
description: Unauthorized
802854
'500':
@@ -831,6 +883,30 @@ paths:
831883
application/json:
832884
schema:
833885
$ref: '#/components/schemas/client'
886+
example:
887+
id: S22
888+
name: Foyer Switch
889+
area: Foyer
890+
mac_address: 'b8:27:eb:4c:9a:12'
891+
hids:
892+
1:
893+
color: Blue
894+
tags:
895+
- Holiday
896+
2:
897+
color: Yellow
898+
tags:
899+
- Security
900+
ota:
901+
url: https://firmware.fireflylx.com/client/manifest.json
902+
mqtt:
903+
host: mymqtt.host.com
904+
port: 1883
905+
username: client1
906+
password: aVery$3cretPassw0r[)
907+
wifi:
908+
ssid: MyWiFiNet
909+
password: aVery$3cretPassw0r[)
834910
'401':
835911
description: Unauthorized
836912
'403':
@@ -1093,6 +1169,8 @@ paths:
10931169
status:
10941170
type: integer
10951171
description: HTTP status code returned by the cloud
1172+
example:
1173+
status: 200
10961174
'401':
10971175
description: Unauthorized
10981176
'404':
@@ -1118,6 +1196,9 @@ paths:
11181196
type: string
11191197
status:
11201198
type: integer
1199+
example:
1200+
message: Bad Gateway — cloud returned an unexpected HTTP status
1201+
status: 503
11211202
'503':
11221203
description: Clock not synchronized
11231204
get:
@@ -1858,6 +1939,11 @@ components:
18581939

18591940
dexieFormat:
18601941
type: object
1942+
description: >
1943+
Opaque Dexie.js export format. The structure is produced by the FireFly UI's
1944+
Dexie.js database export and is treated as a pass-through blob by the controller
1945+
firmware — no field validation is performed on read or write. Refer to the
1946+
Dexie.js export documentation for the internal structure.
18611947
18621948
uuid:
18631949
type: string

0 commit comments

Comments
 (0)