Skip to content

Commit 5548942

Browse files
Add required properties to OpenAPI schemas (#45)
Co-authored-by: Warp <agent@warp.dev>
1 parent cd31384 commit 5548942

File tree

22 files changed

+138
-28
lines changed

22 files changed

+138
-28
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ fabric.properties
8585

8686
# IntelliJ HTTP Client
8787
*.private.env.json
88+
89+
onlinedoc.html

src/bridge/schemas/BridgeGet.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@ description: Definition of a bridge resource
33
allOf:
44
- $ref: '../../common/ResourceOwned.yaml'
55
- type: object
6+
required:
7+
- bridge_id
8+
- time_zone
69
properties:
710
type:
811
type: string
912
enum:
1013
- bridge
1114
bridge_id:
1215
type: string
13-
description: Unique identifier of the bridge as printed on the device. Lower case (shouldn't it be upper case?)
16+
description: Unique identifier of the bridge as printed on the device. Lower case.
1417
time_zone:
1518
type: object
19+
required:
20+
- time_zone
1621
properties:
1722
time_zone:
1823
type: string

src/bridge_home/schemas/BridgeHomeGet.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ description: Definition of a bridge resource
33
allOf:
44
- $ref: '../../common/Resource.yaml'
55
- type: object
6+
required:
7+
- children
8+
- services
69
properties:
710
type:
811
type: string

src/common/ApiResponse.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
type: object
2+
required:
3+
- errors
4+
- data
25
properties:
36
errors:
47
type: array

src/common/Color.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
type: object
2+
required:
3+
- xy
24
properties:
35
xy:
46
$ref: ./GamutPosition.yaml

src/common/Dimming.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
type: object
2+
required:
3+
- brightness
24
properties:
35
brightness:
46
$ref: './Brightness.yaml'

src/common/GamutPosition.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
type: object
22
description: CIE XY gamut position
3+
required:
4+
- x
5+
- y
36
properties:
47
x:
58
type: number

src/common/On.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
type: object
2+
required:
3+
- on
24
properties:
35
on:
46
type: boolean

src/common/Resource.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
type: object
22
description: Common resource properties
3+
required:
4+
- type
5+
- id
36
properties:
47
type:
58
type: string

src/common/ResourceIdentifier.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
type: object
2+
required:
3+
- rid
4+
- rtype
25
properties:
36
rid:
47
type: string

0 commit comments

Comments
 (0)