Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ fabric.properties

# IntelliJ HTTP Client
*.private.env.json

onlinedoc.html
7 changes: 6 additions & 1 deletion src/bridge/schemas/BridgeGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ description: Definition of a bridge resource
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- bridge_id
- time_zone
properties:
type:
type: string
enum:
- bridge
bridge_id:
type: string
description: Unique identifier of the bridge as printed on the device. Lower case (shouldn't it be upper case?)
description: Unique identifier of the bridge as printed on the device. Lower case.
time_zone:
type: object
required:
- time_zone
properties:
time_zone:
type: string
Expand Down
3 changes: 3 additions & 0 deletions src/bridge_home/schemas/BridgeHomeGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ description: Definition of a bridge resource
allOf:
- $ref: '../../common/Resource.yaml'
- type: object
required:
- children
- services
properties:
type:
type: string
Expand Down
3 changes: 3 additions & 0 deletions src/common/ApiResponse.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
type: object
required:
- errors
- data
properties:
errors:
type: array
Expand Down
2 changes: 2 additions & 0 deletions src/common/Color.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
type: object
required:
- xy
properties:
xy:
$ref: ./GamutPosition.yaml
2 changes: 2 additions & 0 deletions src/common/Dimming.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
type: object
required:
- brightness
properties:
brightness:
$ref: './Brightness.yaml'
3 changes: 3 additions & 0 deletions src/common/GamutPosition.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
type: object
description: CIE XY gamut position
required:
- x
- y
properties:
x:
type: number
Expand Down
2 changes: 2 additions & 0 deletions src/common/On.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
type: object
required:
- on
properties:
on:
type: boolean
Expand Down
3 changes: 3 additions & 0 deletions src/common/Resource.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
type: object
description: Common resource properties
required:
- type
- id
properties:
type:
type: string
Expand Down
3 changes: 3 additions & 0 deletions src/common/ResourceIdentifier.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
type: object
required:
- rid
- rtype
properties:
rid:
type: string
Expand Down
2 changes: 2 additions & 0 deletions src/common/ResourceOwned.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ description: Common resource properties including the owner
allOf:
- $ref: './Resource.yaml'
- type: object
required:
- owner
properties:
owner:
$ref: './ResourceIdentifier.yaml'
4 changes: 4 additions & 0 deletions src/common/error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,17 @@ components:
schemas:
ErrorResponse:
type: object
required:
- errors
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
Error:
type: object
required:
- description
properties:
description:
type: string
Expand Down
11 changes: 11 additions & 0 deletions src/device/schemas/DeviceGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ description: Definition of a device resource
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- product_data
- metadata
- identify
- services
properties:
type:
type: string
Expand All @@ -12,6 +17,9 @@ allOf:
$ref: './ProductData.yaml'
metadata:
type: object
required:
- name
- archetype
properties:
name:
type: string
Expand All @@ -20,6 +28,9 @@ allOf:
description: Human readable name of a resource
archetype:
$ref: './ProductArchetype.yaml'
identify:
type: object
description: Triggers a visual identification sequence on the device
usertest:
type: object
properties:
Expand Down
7 changes: 7 additions & 0 deletions src/device/schemas/ProductData.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
type: object
required:
- model_id
- manufacturer_name
- product_name
- product_archetype
- certified
- software_version
properties:
model_id:
type: string
Expand Down
4 changes: 3 additions & 1 deletion src/device_power/schemas/DevicePowerGet.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
type: object
description: Definition of a bridge power resource
description: Definition of a device power resource
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- power_state
properties:
power_state:
type: object
Expand Down
25 changes: 25 additions & 0 deletions src/light/schemas/LightGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,46 @@ type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- metadata
- identify
- service_id
- on
- mode
properties:
metadata:
type: object
description: Deprecated, use metadata on device level
required:
- name
- archetype
- function
properties:
name:
type: string
description: Human readable name of a resource
archetype:
$ref: './LightArchetype.yaml'
function:
type: string
description: Function of the light service
enum:
- functional
- decorative
- mixed
- unknown
fixed_mired:
type: integer
minimum: 153
maximum: 500
description: A fixed mired value of the white lamp
identify:
type: object
description: Triggers identification sequence on the light
service_id:
type: integer
minimum: 0
description: Service identification number. 0 indicates service of a single instance
on:
$ref: '../../common/On.yaml'
dimming:
Expand Down
6 changes: 6 additions & 0 deletions src/light_level/schemas/LightLevelGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- enabled
- light
properties:
enabled:
type: boolean
description: true when sensor is activated, false when deactivated
light:
type: object
required:
- light_level
- light_level_valid
properties:
light_level:
type: integer
Expand Down
8 changes: 7 additions & 1 deletion src/motion/schemas/MotionGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- enabled
- motion
properties:
enabled:
type: boolean
description: ture when the sensor is activated, false when deactivated
description: true when the sensor is activated, false when deactivated
motion:
type: object
required:
- motion
- motion_valid
properties:
motion:
type: boolean
Expand Down
7 changes: 7 additions & 0 deletions src/room/schemas/RoomGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ type: object
allOf:
- $ref: '../../common/Resource.yaml'
- type: object
required:
- children
- services
- metadata
properties:
children:
type: array
Expand All @@ -22,6 +26,9 @@ allOf:
metadata:
type: object
description: configuration object for a room
required:
- name
- archetype
properties:
name:
type: string
Expand Down
49 changes: 24 additions & 25 deletions src/scene/schemas/ActionGet.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- target
- action
properties:
target:
description: The identifier of the light to execute the action on
$ref: '../../common/ResourceIdentifier.yaml'
action:
type: object
description: The action to be executed on recall
properties:
target:
on:
$ref: '../../common/On.yaml'
dimming:
$ref: '../../common/Dimming.yaml'
color:
$ref: '../../common/Color.yaml'
color_temperature:
$ref: '../../common/ColorTemperature.yaml'
gradient:
$ref: '../../common/Gradient.yaml'
effects:
type: object
description: The identifier of the light to execute the action on
$ref: '../../common/ResourceIdentifier.yaml'
action:
type: object
description: The action to be executed on recall
description: Basic feature containing effect properties.
properties:
on:
$ref: '../../common/On.yaml'
dimming:
$ref: '../../common/Dimming.yaml'
color:
$ref: '../../common/Color.yaml'
color_temperature:
$ref: '../../common/ColorTemperature.yaml'
gradient:
$ref: '../../common/Gradient.yaml'
effects:
type: object
description: Basic feature containing effect properties.
properties:
effect:
$ref: '../../common/SupportedEffects.yaml'
effect:
$ref: '../../common/SupportedEffects.yaml'
7 changes: 7 additions & 0 deletions src/scene/schemas/SceneGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- actions
- metadata
- group
- speed
- auto_dynamic
- status
properties:
type:
type: string
Expand Down
6 changes: 6 additions & 0 deletions src/temperature/schemas/TemperatureGet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ type: object
allOf:
- $ref: '../../common/ResourceOwned.yaml'
- type: object
required:
- enabled
- temperature
properties:
enabled:
type: boolean
description: |
`true` when sensor is activated, `false` when deactivated
temperature:
type: object
required:
- temperature
- temperature_valid
properties:
temperature:
type: number
Expand Down