Skip to content

Commit 51f712d

Browse files
committed
fix: add missing response examples across Controller endpoints (closes #638)
1 parent d1a3856 commit 51f712d

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

5870
/api/reboot:
5971
post:
@@ -65,7 +77,7 @@ paths:
6577
- visual-token: []
6678
responses:
6779
'204':
68-
description: No Content
80+
description: Reboot scheduled — the device will restart after a short delay. No response body is returned.
6981
'401':
7082
description: Unauthorized
7183

@@ -345,7 +357,7 @@ paths:
345357
- visual-token: []
346358
responses:
347359
'204':
348-
description: Authorized
360+
description: Authorized — the visual token has been accepted and a long-term authorization session has been created. No response body is returned.
349361
'401':
350362
description: Unauthorized
351363

@@ -652,6 +664,13 @@ paths:
652664
type: array
653665
items:
654666
$ref: '#/components/schemas/uuid'
667+
examples:
668+
Multiple controllers:
669+
value:
670+
- 550e8400-e29b-41d4-a716-446655440000
671+
- 6ba7b810-9dad-11d1-80b4-00c04fd430c8
672+
No controllers:
673+
$ref: '#/components/examples/emptyArray'
655674
'401':
656675
description: Unauthorized
657676
'500':
@@ -686,6 +705,32 @@ paths:
686705
application/json:
687706
schema:
688707
$ref: '#/components/schemas/controller'
708+
example:
709+
name: First Floor
710+
area: Tech Room
711+
mac_address: 'a4:cf:12:7e:3b:01'
712+
ota:
713+
url: https://firmware.fireflylx.com/controller/manifest.json
714+
mqtt:
715+
host: mymqtt.host.com
716+
port: 1883
717+
username: controller1
718+
password: aVery$3cretPassw0r[)
719+
ports:
720+
1:
721+
id: S22
722+
channels:
723+
1:
724+
actions:
725+
- action: TOGGLE
726+
output: 4
727+
outputs:
728+
4:
729+
id: C49
730+
name: Chandelier
731+
area: Foyer
732+
icon: mdi:chandelier
733+
type: VARIABLE
689734
'401':
690735
description: Unauthorized
691736
'404':
@@ -789,6 +834,13 @@ paths:
789834
type: array
790835
items:
791836
$ref: '#/components/schemas/uuid'
837+
examples:
838+
Multiple clients:
839+
value:
840+
- 7c9e6679-7425-40de-944b-e07fc1f90ae7
841+
- f47ac10b-58cc-4372-a567-0e02b2c3d479
842+
No clients:
843+
$ref: '#/components/examples/emptyArray'
792844
'401':
793845
description: Unauthorized
794846
'500':
@@ -823,6 +875,30 @@ paths:
823875
application/json:
824876
schema:
825877
$ref: '#/components/schemas/client'
878+
example:
879+
id: S22
880+
name: Foyer Switch
881+
area: Foyer
882+
mac_address: 'b8:27:eb:4c:9a:12'
883+
hids:
884+
1:
885+
color: Blue
886+
tags:
887+
- Holiday
888+
2:
889+
color: Yellow
890+
tags:
891+
- Security
892+
ota:
893+
url: https://firmware.fireflylx.com/client/manifest.json
894+
mqtt:
895+
host: mymqtt.host.com
896+
port: 1883
897+
username: client1
898+
password: aVery$3cretPassw0r[)
899+
wifi:
900+
ssid: MyWiFiNet
901+
password: aVery$3cretPassw0r[)
826902
'401':
827903
description: Unauthorized
828904
'403':
@@ -1072,6 +1148,8 @@ paths:
10721148
status:
10731149
type: integer
10741150
description: HTTP status code returned by the cloud
1151+
example:
1152+
status: 200
10751153
'401':
10761154
description: Unauthorized
10771155
'404':
@@ -1097,6 +1175,9 @@ paths:
10971175
type: string
10981176
status:
10991177
type: integer
1178+
example:
1179+
message: Bad Gateway — cloud returned an unexpected HTTP status
1180+
status: 503
11001181
'503':
11011182
description: Clock not synchronized
11021183
get:
@@ -1825,6 +1906,11 @@ components:
18251906

18261907
dexieFormat:
18271908
type: object
1909+
description: >
1910+
Opaque Dexie.js export format. The structure is produced by the FireFly UI's
1911+
Dexie.js database export and is treated as a pass-through blob by the controller
1912+
firmware — no field validation is performed on read or write. Refer to the
1913+
Dexie.js export documentation for the internal structure.
18281914
18291915
uuid:
18301916
type: string

0 commit comments

Comments
 (0)