diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b991ce7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,62 @@ +# AGENTS.md + +This file provides guidance to WARP (warp.dev) when working with code in this repository. + +## Project Overview + +OpenHue is an OpenAPI 3.0.3 specification for the Philips Hue CLIP (Connected Lighting Interface Protocol) API v2. This repository does not contain application code—it consists entirely of YAML files defining the API specification. + +## Build & Development Commands + +```bash +make setup # Install Redocly CLI globally via npm +make verify # Lint and validate the OpenAPI specification +make build # Bundle specification into build/openhue.yaml +make docs # Generate static HTML documentation in build/ +make clean # Remove the build/ directory +make help # List all available make targets +``` + +Alternatively, use Redocly CLI directly: +```bash +redocly lint # Validate specification +redocly bundle src/main.yaml -o out.yaml # Bundle to single file +redocly build-docs -o out.html # Generate docs +``` + +## Architecture + +### Entry Point +- `src/main.yaml` - Root OpenAPI specification defining paths, tags, servers, and security schemes + +### Directory Structure +Each Hue API resource has its own directory under `src/`: +``` +src/{resource}/ +├── {resource}.yaml # Collection endpoint (GET all, POST) +├── {resource}_{id}.yaml # Item endpoint (GET/PUT/DELETE by ID) +└── schemas/ # Resource-specific schemas +``` + +Resources: `auth`, `bridge`, `bridge_home`, `device`, `device_power`, `grouped_light`, `light`, `light_level`, `motion`, `resource`, `room`, `scene`, `smart_scene`, `temperature`, `zone` + +### Shared Components +- `src/common/` - Reusable schemas (ApiResponse, error responses, Brightness, Color, Dimming, etc.) + +### Testing +- `http/` - IntelliJ HTTP Client files for manual endpoint testing +- Requires `http/http-client.private.env.json` with your bridge's apiKey and baseUrl + +## Specification Conventions + +- OpenAPI version: 3.0.3 +- Authentication: `hue-application-key` header (API key) +- All paths reference external YAML files via `$ref` +- Error responses defined in `src/common/error.yaml` and reused across endpoints + +## Code Style + +- 2-space indentation (YAML) +- LF line endings +- Trailing newline required +- Trim trailing whitespace diff --git a/src/behavior_instance/behavior_instance.yaml b/src/behavior_instance/behavior_instance.yaml new file mode 100644 index 0000000..0e8bb2c --- /dev/null +++ b/src/behavior_instance/behavior_instance.yaml @@ -0,0 +1,42 @@ +get: + operationId: getBehaviorInstances + summary: List behavior instance. + description: List all available behavior instance resources. + tags: + - BehaviorInstance + security: + - HueApplicationKey: [ ] + responses: + 200: + description: BehaviorInstance Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BehaviorInstanceGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/behavior_instance/behavior_instance_{behaviorInstanceId}.yaml b/src/behavior_instance/behavior_instance_{behaviorInstanceId}.yaml new file mode 100644 index 0000000..1f1cab6 --- /dev/null +++ b/src/behavior_instance/behavior_instance_{behaviorInstanceId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getBehaviorInstance + summary: Get behavior instance. + description: Get details of a single behavior instance resource from its given `{behaviorInstanceId}`. + tags: + - BehaviorInstance + security: + - HueApplicationKey: [ ] + parameters: + - name: behaviorInstanceId + in: path + schema: + type: string + required: true + description: ID of the behavior instance + responses: + 200: + description: BehaviorInstance Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BehaviorInstanceGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateBehaviorInstance + summary: Update behavior instance. + description: Update a single behavior instance resource from its given `{behaviorInstanceId}`. + tags: + - BehaviorInstance + security: + - HueApplicationKey: [ ] + parameters: + - name: behaviorInstanceId + in: path + schema: + type: string + required: true + description: ID of the behavior instance + requestBody: + content: + application/json: + schema: + $ref: './schemas/BehaviorInstancePut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/behavior_instance/schemas/BehaviorInstanceGet.yaml b/src/behavior_instance/schemas/BehaviorInstanceGet.yaml new file mode 100644 index 0000000..c35fa5e --- /dev/null +++ b/src/behavior_instance/schemas/BehaviorInstanceGet.yaml @@ -0,0 +1,36 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + script_id: + type: string + description: ID of the behavior script this instance is running. + enabled: + type: boolean + description: True if the behavior instance is enabled. + state: + type: object + description: Current state of the behavior instance. + configuration: + type: object + description: Configuration for this behavior instance. + dependees: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' + status: + type: string + enum: + - initializing + - running + - disabled + - errored + last_error: + type: string + description: Last error message if status is errored. + metadata: + type: object + properties: + name: + type: string diff --git a/src/behavior_instance/schemas/BehaviorInstancePut.yaml b/src/behavior_instance/schemas/BehaviorInstancePut.yaml new file mode 100644 index 0000000..e48005c --- /dev/null +++ b/src/behavior_instance/schemas/BehaviorInstancePut.yaml @@ -0,0 +1,16 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `behavior_instance` here) + enabled: + type: boolean + description: True to enable the behavior instance. + configuration: + type: object + description: Configuration for this behavior instance. + metadata: + type: object + properties: + name: + type: string diff --git a/src/behavior_script/behavior_script.yaml b/src/behavior_script/behavior_script.yaml new file mode 100644 index 0000000..98e6b38 --- /dev/null +++ b/src/behavior_script/behavior_script.yaml @@ -0,0 +1,42 @@ +get: + operationId: getBehaviorScripts + summary: List behavior script. + description: List all available behavior script resources. + tags: + - BehaviorScript + security: + - HueApplicationKey: [ ] + responses: + 200: + description: BehaviorScript Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BehaviorScriptGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/behavior_script/behavior_script_{behaviorScriptId}.yaml b/src/behavior_script/behavior_script_{behaviorScriptId}.yaml new file mode 100644 index 0000000..da00c6a --- /dev/null +++ b/src/behavior_script/behavior_script_{behaviorScriptId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getBehaviorScript + summary: Get behavior script. + description: Get details of a single behavior script resource from its given `{behaviorScriptId}`. + tags: + - BehaviorScript + security: + - HueApplicationKey: [ ] + parameters: + - name: behaviorScriptId + in: path + schema: + type: string + required: true + description: ID of the behavior script + responses: + 200: + description: BehaviorScript Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BehaviorScriptGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateBehaviorScript + summary: Update behavior script. + description: Update a single behavior script resource from its given `{behaviorScriptId}`. + tags: + - BehaviorScript + security: + - HueApplicationKey: [ ] + parameters: + - name: behaviorScriptId + in: path + schema: + type: string + required: true + description: ID of the behavior script + requestBody: + content: + application/json: + schema: + $ref: './schemas/BehaviorScriptPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/behavior_script/schemas/BehaviorScriptGet.yaml b/src/behavior_script/schemas/BehaviorScriptGet.yaml new file mode 100644 index 0000000..82568c5 --- /dev/null +++ b/src/behavior_script/schemas/BehaviorScriptGet.yaml @@ -0,0 +1,27 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + description: + type: string + description: Description of the behavior script. + configuration_schema: + type: object + description: JSON schema for configuration. + trigger_schema: + type: object + description: JSON schema for trigger. + state_schema: + type: object + description: JSON schema for state. + version: + type: string + description: Version of the behavior script. + metadata: + type: object + properties: + name: + type: string + category: + type: string diff --git a/src/behavior_script/schemas/BehaviorScriptPut.yaml b/src/behavior_script/schemas/BehaviorScriptPut.yaml new file mode 100644 index 0000000..5240943 --- /dev/null +++ b/src/behavior_script/schemas/BehaviorScriptPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `behavior_script` here) diff --git a/src/bell_button/bell_button.yaml b/src/bell_button/bell_button.yaml new file mode 100644 index 0000000..c7c4331 --- /dev/null +++ b/src/bell_button/bell_button.yaml @@ -0,0 +1,42 @@ +get: + operationId: getBellButtons + summary: List bell buttons. + description: List all available bell button resources. + tags: + - BellButton + security: + - HueApplicationKey: [ ] + responses: + 200: + description: BellButton Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BellButtonGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/bell_button/bell_button_{bellButtonId}.yaml b/src/bell_button/bell_button_{bellButtonId}.yaml new file mode 100644 index 0000000..113b872 --- /dev/null +++ b/src/bell_button/bell_button_{bellButtonId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getBellButton + summary: Get bell button. + description: Get details of a single bell button resource from its given `{bellButtonId}`. + tags: + - BellButton + security: + - HueApplicationKey: [ ] + parameters: + - name: bellButtonId + in: path + schema: + type: string + required: true + description: ID of the bell button + responses: + 200: + description: BellButton Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/BellButtonGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateBellButton + summary: Update bell button. + description: Update a single bell button resource from its given `{bellButtonId}`. + tags: + - BellButton + security: + - HueApplicationKey: [ ] + parameters: + - name: bellButtonId + in: path + schema: + type: string + required: true + description: ID of the bell button + requestBody: + content: + application/json: + schema: + $ref: './schemas/BellButtonPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/bell_button/schemas/BellButtonGet.yaml b/src/bell_button/schemas/BellButtonGet.yaml new file mode 100644 index 0000000..8beb83a --- /dev/null +++ b/src/bell_button/schemas/BellButtonGet.yaml @@ -0,0 +1,31 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + metadata: + type: object + properties: + control_id: + type: integer + description: Control identifier of the switch, unique within the device. + bell: + type: object + properties: + bell_report: + type: object + properties: + updated: + type: string + format: date-time + description: Last time the value of this property was updated. + event: + type: string + enum: + - ring + description: The bell button event that was triggered. + last_event: + type: string + enum: + - ring + description: Deprecated. Use bell_report instead. diff --git a/src/bell_button/schemas/BellButtonPut.yaml b/src/bell_button/schemas/BellButtonPut.yaml new file mode 100644 index 0000000..c424600 --- /dev/null +++ b/src/bell_button/schemas/BellButtonPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `bell_button` here) diff --git a/src/button/button.yaml b/src/button/button.yaml new file mode 100644 index 0000000..978d1da --- /dev/null +++ b/src/button/button.yaml @@ -0,0 +1,42 @@ +get: + operationId: getButtons + summary: List buttons. + description: List all available button resources. + tags: + - Button + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Button Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ButtonGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/button/button_{buttonId}.yaml b/src/button/button_{buttonId}.yaml new file mode 100644 index 0000000..3373a62 --- /dev/null +++ b/src/button/button_{buttonId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getButton + summary: Get button. + description: Get details of a single button resource from its given `{buttonId}`. + tags: + - Button + security: + - HueApplicationKey: [ ] + parameters: + - name: buttonId + in: path + schema: + type: string + required: true + description: ID of the button + responses: + 200: + description: Button Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ButtonGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateButton + summary: Update button. + description: Update a single button resource from its given `{buttonId}`. + tags: + - Button + security: + - HueApplicationKey: [ ] + parameters: + - name: buttonId + in: path + schema: + type: string + required: true + description: ID of the button + requestBody: + content: + application/json: + schema: + $ref: './schemas/ButtonPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/button/schemas/ButtonGet.yaml b/src/button/schemas/ButtonGet.yaml new file mode 100644 index 0000000..fcdc6f7 --- /dev/null +++ b/src/button/schemas/ButtonGet.yaml @@ -0,0 +1,56 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + metadata: + type: object + properties: + control_id: + type: integer + description: Control identifier of the switch, unique within the device. + button: + type: object + properties: + button_report: + type: object + properties: + updated: + type: string + format: date-time + description: Last time the value of this property was updated. + event: + type: string + enum: + - initial_press + - repeat + - short_release + - long_release + - double_short_release + - long_press + description: The button event that was triggered. + last_event: + type: string + enum: + - initial_press + - repeat + - short_release + - long_release + - double_short_release + - long_press + description: Deprecated. Use button_report instead. + repeat_interval: + type: integer + description: Interval in milliseconds for repeat events. + event_values: + type: array + items: + type: string + enum: + - initial_press + - repeat + - short_release + - long_release + - double_short_release + - long_press + description: List of supported button events. diff --git a/src/button/schemas/ButtonPut.yaml b/src/button/schemas/ButtonPut.yaml new file mode 100644 index 0000000..830abae --- /dev/null +++ b/src/button/schemas/ButtonPut.yaml @@ -0,0 +1,17 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `button` here) + metadata: + type: object + properties: + control_id: + type: integer + description: Control identifier of the switch, unique within the device. + button: + type: object + properties: + repeat_interval: + type: integer + description: Interval in milliseconds for repeat events. diff --git a/src/camera_motion/camera_motion.yaml b/src/camera_motion/camera_motion.yaml new file mode 100644 index 0000000..28ad227 --- /dev/null +++ b/src/camera_motion/camera_motion.yaml @@ -0,0 +1,42 @@ +get: + operationId: getCameraMotions + summary: List camera motion sensors. + description: List all available camera motion sensors resources. + tags: + - CameraMotion + security: + - HueApplicationKey: [ ] + responses: + 200: + description: CameraMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/CameraMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/camera_motion/camera_motion_{cameraMotionId}.yaml b/src/camera_motion/camera_motion_{cameraMotionId}.yaml new file mode 100644 index 0000000..1a4f824 --- /dev/null +++ b/src/camera_motion/camera_motion_{cameraMotionId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getCameraMotion + summary: Get camera motion. + description: Get details of a single camera motion resource from its given `{cameraMotionId}`. + tags: + - CameraMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: cameraMotionId + in: path + schema: + type: string + required: true + description: ID of the camera motion + responses: + 200: + description: CameraMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/CameraMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateCameraMotion + summary: Update camera motion. + description: Update a single camera motion resource from its given `{cameraMotionId}`. + tags: + - CameraMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: cameraMotionId + in: path + schema: + type: string + required: true + description: ID of the camera motion + requestBody: + content: + application/json: + schema: + $ref: './schemas/CameraMotionPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/camera_motion/schemas/CameraMotionGet.yaml b/src/camera_motion/schemas/CameraMotionGet.yaml new file mode 100644 index 0000000..aa4d208 --- /dev/null +++ b/src/camera_motion/schemas/CameraMotionGet.yaml @@ -0,0 +1,21 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. + motion: + type: object + properties: + motion_report: + type: object + properties: + changed: + type: string + format: date-time + description: Last time the value of this property was changed. + motion: + type: boolean + description: True if motion is detected. diff --git a/src/camera_motion/schemas/CameraMotionPut.yaml b/src/camera_motion/schemas/CameraMotionPut.yaml new file mode 100644 index 0000000..54940b3 --- /dev/null +++ b/src/camera_motion/schemas/CameraMotionPut.yaml @@ -0,0 +1,8 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `camera_motion` here) + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. diff --git a/src/contact/contact.yaml b/src/contact/contact.yaml new file mode 100644 index 0000000..767ac89 --- /dev/null +++ b/src/contact/contact.yaml @@ -0,0 +1,42 @@ +get: + operationId: getContacts + summary: List contact sensors. + description: List all available contact sensor resources. + tags: + - Contact + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Contact Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ContactGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/contact/contact_{contactId}.yaml b/src/contact/contact_{contactId}.yaml new file mode 100644 index 0000000..aaaab5a --- /dev/null +++ b/src/contact/contact_{contactId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getContact + summary: Get contact sensor. + description: Get details of a single contact sensor resource from its given `{contactId}`. + tags: + - Contact + security: + - HueApplicationKey: [ ] + parameters: + - name: contactId + in: path + schema: + type: string + required: true + description: ID of the contact sensor + responses: + 200: + description: Contact Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ContactGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateContact + summary: Update contact sensor. + description: Update a single contact sensor resource from its given `{contactId}`. + tags: + - Contact + security: + - HueApplicationKey: [ ] + parameters: + - name: contactId + in: path + schema: + type: string + required: true + description: ID of the contact sensor + requestBody: + content: + application/json: + schema: + $ref: './schemas/ContactPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/contact/schemas/ContactGet.yaml b/src/contact/schemas/ContactGet.yaml new file mode 100644 index 0000000..d31b1b1 --- /dev/null +++ b/src/contact/schemas/ContactGet.yaml @@ -0,0 +1,21 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. + contact_report: + type: object + properties: + changed: + type: string + format: date-time + description: Last time the value of this property was changed. + state: + type: string + enum: + - contact + - no_contact + description: State of the contact sensor. diff --git a/src/contact/schemas/ContactPut.yaml b/src/contact/schemas/ContactPut.yaml new file mode 100644 index 0000000..1508ffc --- /dev/null +++ b/src/contact/schemas/ContactPut.yaml @@ -0,0 +1,8 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `contact` here) + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. diff --git a/src/convenience_area_motion/convenience_area_motion.yaml b/src/convenience_area_motion/convenience_area_motion.yaml new file mode 100644 index 0000000..3e38b55 --- /dev/null +++ b/src/convenience_area_motion/convenience_area_motion.yaml @@ -0,0 +1,42 @@ +get: + operationId: getConvenienceAreaMotions + summary: List convenience area motion sensors. + description: List all available convenience area motion sensors resources. + tags: + - ConvenienceAreaMotion + security: + - HueApplicationKey: [ ] + responses: + 200: + description: ConvenienceAreaMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ConvenienceAreaMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/convenience_area_motion/convenience_area_motion_{convenienceAreaMotionId}.yaml b/src/convenience_area_motion/convenience_area_motion_{convenienceAreaMotionId}.yaml new file mode 100644 index 0000000..31c5b31 --- /dev/null +++ b/src/convenience_area_motion/convenience_area_motion_{convenienceAreaMotionId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getConvenienceAreaMotion + summary: Get convenience area motion. + description: Get details of a single convenience area motion resource from its given `{convenienceAreaMotionId}`. + tags: + - ConvenienceAreaMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: convenienceAreaMotionId + in: path + schema: + type: string + required: true + description: ID of the convenience area motion + responses: + 200: + description: ConvenienceAreaMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ConvenienceAreaMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateConvenienceAreaMotion + summary: Update convenience area motion. + description: Update a single convenience area motion resource from its given `{convenienceAreaMotionId}`. + tags: + - ConvenienceAreaMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: convenienceAreaMotionId + in: path + schema: + type: string + required: true + description: ID of the convenience area motion + requestBody: + content: + application/json: + schema: + $ref: './schemas/ConvenienceAreaMotionPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/convenience_area_motion/schemas/ConvenienceAreaMotionGet.yaml b/src/convenience_area_motion/schemas/ConvenienceAreaMotionGet.yaml new file mode 100644 index 0000000..e287109 --- /dev/null +++ b/src/convenience_area_motion/schemas/ConvenienceAreaMotionGet.yaml @@ -0,0 +1,14 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. + motion: + type: object + properties: + motion: + type: boolean + description: True if motion is detected. diff --git a/src/convenience_area_motion/schemas/ConvenienceAreaMotionPut.yaml b/src/convenience_area_motion/schemas/ConvenienceAreaMotionPut.yaml new file mode 100644 index 0000000..3bc7fd2 --- /dev/null +++ b/src/convenience_area_motion/schemas/ConvenienceAreaMotionPut.yaml @@ -0,0 +1,8 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `convenience_area_motion` here) + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. diff --git a/src/device_software_update/device_software_update.yaml b/src/device_software_update/device_software_update.yaml new file mode 100644 index 0000000..8b0ca2c --- /dev/null +++ b/src/device_software_update/device_software_update.yaml @@ -0,0 +1,42 @@ +get: + operationId: getDeviceSoftwareUpdates + summary: List device software update. + description: List all available device software update resources. + tags: + - DeviceSoftwareUpdate + security: + - HueApplicationKey: [ ] + responses: + 200: + description: DeviceSoftwareUpdate Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/DeviceSoftwareUpdateGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/device_software_update/device_software_update_{deviceSoftwareUpdateId}.yaml b/src/device_software_update/device_software_update_{deviceSoftwareUpdateId}.yaml new file mode 100644 index 0000000..504f431 --- /dev/null +++ b/src/device_software_update/device_software_update_{deviceSoftwareUpdateId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getDeviceSoftwareUpdate + summary: Get device software update. + description: Get details of a single device software update resource from its given `{deviceSoftwareUpdateId}`. + tags: + - DeviceSoftwareUpdate + security: + - HueApplicationKey: [ ] + parameters: + - name: deviceSoftwareUpdateId + in: path + schema: + type: string + required: true + description: ID of the device software update + responses: + 200: + description: DeviceSoftwareUpdate Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/DeviceSoftwareUpdateGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateDeviceSoftwareUpdate + summary: Update device software update. + description: Update a single device software update resource from its given `{deviceSoftwareUpdateId}`. + tags: + - DeviceSoftwareUpdate + security: + - HueApplicationKey: [ ] + parameters: + - name: deviceSoftwareUpdateId + in: path + schema: + type: string + required: true + description: ID of the device software update + requestBody: + content: + application/json: + schema: + $ref: './schemas/DeviceSoftwareUpdatePut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/device_software_update/schemas/DeviceSoftwareUpdateGet.yaml b/src/device_software_update/schemas/DeviceSoftwareUpdateGet.yaml new file mode 100644 index 0000000..9348298 --- /dev/null +++ b/src/device_software_update/schemas/DeviceSoftwareUpdateGet.yaml @@ -0,0 +1,19 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + state: + type: string + enum: + - no_update + - update_available + - ready_to_install + - installing + - install_failed + description: Current state of the software update. + problems: + type: array + items: + type: string + description: Problems preventing update. diff --git a/src/device_software_update/schemas/DeviceSoftwareUpdatePut.yaml b/src/device_software_update/schemas/DeviceSoftwareUpdatePut.yaml new file mode 100644 index 0000000..2b28f1b --- /dev/null +++ b/src/device_software_update/schemas/DeviceSoftwareUpdatePut.yaml @@ -0,0 +1,13 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `device_software_update` here) + install: + type: object + properties: + install_state: + type: string + enum: + - install + description: Set to install to start the update installation. diff --git a/src/entertainment/entertainment.yaml b/src/entertainment/entertainment.yaml new file mode 100644 index 0000000..93a5514 --- /dev/null +++ b/src/entertainment/entertainment.yaml @@ -0,0 +1,42 @@ +get: + operationId: getEntertainments + summary: List entertainment. + description: List all available entertainment resources. + tags: + - Entertainment + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Entertainment Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/EntertainmentGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/entertainment/entertainment_{entertainmentId}.yaml b/src/entertainment/entertainment_{entertainmentId}.yaml new file mode 100644 index 0000000..d7076f4 --- /dev/null +++ b/src/entertainment/entertainment_{entertainmentId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getEntertainment + summary: Get entertainment. + description: Get details of a single entertainment resource from its given `{entertainmentId}`. + tags: + - Entertainment + security: + - HueApplicationKey: [ ] + parameters: + - name: entertainmentId + in: path + schema: + type: string + required: true + description: ID of the entertainment + responses: + 200: + description: Entertainment Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/EntertainmentGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateEntertainment + summary: Update entertainment. + description: Update a single entertainment resource from its given `{entertainmentId}`. + tags: + - Entertainment + security: + - HueApplicationKey: [ ] + parameters: + - name: entertainmentId + in: path + schema: + type: string + required: true + description: ID of the entertainment + requestBody: + content: + application/json: + schema: + $ref: './schemas/EntertainmentPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/entertainment/schemas/EntertainmentGet.yaml b/src/entertainment/schemas/EntertainmentGet.yaml new file mode 100644 index 0000000..7827097 --- /dev/null +++ b/src/entertainment/schemas/EntertainmentGet.yaml @@ -0,0 +1,30 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + renderer: + type: boolean + description: Indicates if the device can be used for entertainment streaming. + proxy: + type: boolean + description: Indicates if the device is acting as entertainment proxy. + max_streams: + type: integer + description: Maximum number of streams this device supports. + segments: + type: object + properties: + configurable: + type: boolean + max_segments: + type: integer + segments: + type: array + items: + type: object + properties: + start: + type: integer + length: + type: integer diff --git a/src/entertainment/schemas/EntertainmentPut.yaml b/src/entertainment/schemas/EntertainmentPut.yaml new file mode 100644 index 0000000..097c4fe --- /dev/null +++ b/src/entertainment/schemas/EntertainmentPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `entertainment` here) diff --git a/src/entertainment_configuration/entertainment_configuration.yaml b/src/entertainment_configuration/entertainment_configuration.yaml new file mode 100644 index 0000000..b12c3f5 --- /dev/null +++ b/src/entertainment_configuration/entertainment_configuration.yaml @@ -0,0 +1,42 @@ +get: + operationId: getEntertainmentConfigurations + summary: List entertainment configuration. + description: List all available entertainment configuration resources. + tags: + - EntertainmentConfiguration + security: + - HueApplicationKey: [ ] + responses: + 200: + description: EntertainmentConfiguration Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/EntertainmentConfigurationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/entertainment_configuration/entertainment_configuration_{entertainmentConfigurationId}.yaml b/src/entertainment_configuration/entertainment_configuration_{entertainmentConfigurationId}.yaml new file mode 100644 index 0000000..5e36dff --- /dev/null +++ b/src/entertainment_configuration/entertainment_configuration_{entertainmentConfigurationId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getEntertainmentConfiguration + summary: Get entertainment configuration. + description: Get details of a single entertainment configuration resource from its given `{entertainmentConfigurationId}`. + tags: + - EntertainmentConfiguration + security: + - HueApplicationKey: [ ] + parameters: + - name: entertainmentConfigurationId + in: path + schema: + type: string + required: true + description: ID of the entertainment configuration + responses: + 200: + description: EntertainmentConfiguration Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/EntertainmentConfigurationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateEntertainmentConfiguration + summary: Update entertainment configuration. + description: Update a single entertainment configuration resource from its given `{entertainmentConfigurationId}`. + tags: + - EntertainmentConfiguration + security: + - HueApplicationKey: [ ] + parameters: + - name: entertainmentConfigurationId + in: path + schema: + type: string + required: true + description: ID of the entertainment configuration + requestBody: + content: + application/json: + schema: + $ref: './schemas/EntertainmentConfigurationPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/entertainment_configuration/schemas/EntertainmentConfigurationGet.yaml b/src/entertainment_configuration/schemas/EntertainmentConfigurationGet.yaml new file mode 100644 index 0000000..dbd62d7 --- /dev/null +++ b/src/entertainment_configuration/schemas/EntertainmentConfigurationGet.yaml @@ -0,0 +1,86 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + metadata: + type: object + properties: + name: + type: string + description: Human readable name of the configuration. + configuration_type: + type: string + enum: + - screen + - monitor + - music + - 3dspace + - other + description: Type of entertainment configuration. + status: + type: string + enum: + - active + - inactive + description: Status of the entertainment configuration. + stream_proxy: + type: object + properties: + mode: + type: string + enum: + - auto + - manual + node: + $ref: '../../common/ResourceIdentifier.yaml' + channels: + type: array + items: + type: object + properties: + channel_id: + type: integer + position: + type: object + properties: + x: + type: number + y: + type: number + z: + type: number + members: + type: array + items: + type: object + properties: + service: + $ref: '../../common/ResourceIdentifier.yaml' + index: + type: integer + locations: + type: object + properties: + service_locations: + type: array + items: + type: object + properties: + service: + $ref: '../../common/ResourceIdentifier.yaml' + positions: + type: array + items: + type: object + properties: + x: + type: number + y: + type: number + z: + type: number + light_services: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' diff --git a/src/entertainment_configuration/schemas/EntertainmentConfigurationPut.yaml b/src/entertainment_configuration/schemas/EntertainmentConfigurationPut.yaml new file mode 100644 index 0000000..d408347 --- /dev/null +++ b/src/entertainment_configuration/schemas/EntertainmentConfigurationPut.yaml @@ -0,0 +1,25 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `entertainment_configuration` here) + metadata: + type: object + properties: + name: + type: string + description: Human readable name of the configuration. + configuration_type: + type: string + enum: + - screen + - monitor + - music + - 3dspace + - other + action: + type: string + enum: + - start + - stop + description: Start or stop streaming. diff --git a/src/geofence_client/geofence_client.yaml b/src/geofence_client/geofence_client.yaml new file mode 100644 index 0000000..e340623 --- /dev/null +++ b/src/geofence_client/geofence_client.yaml @@ -0,0 +1,42 @@ +get: + operationId: getGeofenceClients + summary: List geofence client. + description: List all available geofence client resources. + tags: + - GeofenceClient + security: + - HueApplicationKey: [ ] + responses: + 200: + description: GeofenceClient Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GeofenceClientGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/geofence_client/geofence_client_{geofenceClientId}.yaml b/src/geofence_client/geofence_client_{geofenceClientId}.yaml new file mode 100644 index 0000000..87a11fe --- /dev/null +++ b/src/geofence_client/geofence_client_{geofenceClientId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getGeofenceClient + summary: Get geofence client. + description: Get details of a single geofence client resource from its given `{geofenceClientId}`. + tags: + - GeofenceClient + security: + - HueApplicationKey: [ ] + parameters: + - name: geofenceClientId + in: path + schema: + type: string + required: true + description: ID of the geofence client + responses: + 200: + description: GeofenceClient Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GeofenceClientGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateGeofenceClient + summary: Update geofence client. + description: Update a single geofence client resource from its given `{geofenceClientId}`. + tags: + - GeofenceClient + security: + - HueApplicationKey: [ ] + parameters: + - name: geofenceClientId + in: path + schema: + type: string + required: true + description: ID of the geofence client + requestBody: + content: + application/json: + schema: + $ref: './schemas/GeofenceClientPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/geofence_client/schemas/GeofenceClientGet.yaml b/src/geofence_client/schemas/GeofenceClientGet.yaml new file mode 100644 index 0000000..0fa8a97 --- /dev/null +++ b/src/geofence_client/schemas/GeofenceClientGet.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + name: + type: string + description: Name of the geofence client. + is_at_home: + type: boolean + description: True if the client is currently at home. diff --git a/src/geofence_client/schemas/GeofenceClientPut.yaml b/src/geofence_client/schemas/GeofenceClientPut.yaml new file mode 100644 index 0000000..30d4575 --- /dev/null +++ b/src/geofence_client/schemas/GeofenceClientPut.yaml @@ -0,0 +1,11 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `geofence_client` here) + name: + type: string + description: Name of the geofence client. + is_at_home: + type: boolean + description: True if the client is currently at home. diff --git a/src/geolocation/geolocation.yaml b/src/geolocation/geolocation.yaml new file mode 100644 index 0000000..2332df9 --- /dev/null +++ b/src/geolocation/geolocation.yaml @@ -0,0 +1,42 @@ +get: + operationId: getGeolocations + summary: List geolocation. + description: List all available geolocation resources. + tags: + - Geolocation + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Geolocation Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GeolocationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/geolocation/geolocation_{geolocationId}.yaml b/src/geolocation/geolocation_{geolocationId}.yaml new file mode 100644 index 0000000..69cc03d --- /dev/null +++ b/src/geolocation/geolocation_{geolocationId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getGeolocation + summary: Get geolocation. + description: Get details of a single geolocation resource from its given `{geolocationId}`. + tags: + - Geolocation + security: + - HueApplicationKey: [ ] + parameters: + - name: geolocationId + in: path + schema: + type: string + required: true + description: ID of the geolocation + responses: + 200: + description: Geolocation Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GeolocationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateGeolocation + summary: Update geolocation. + description: Update a single geolocation resource from its given `{geolocationId}`. + tags: + - Geolocation + security: + - HueApplicationKey: [ ] + parameters: + - name: geolocationId + in: path + schema: + type: string + required: true + description: ID of the geolocation + requestBody: + content: + application/json: + schema: + $ref: './schemas/GeolocationPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/geolocation/schemas/GeolocationGet.yaml b/src/geolocation/schemas/GeolocationGet.yaml new file mode 100644 index 0000000..787423c --- /dev/null +++ b/src/geolocation/schemas/GeolocationGet.yaml @@ -0,0 +1,8 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + is_configured: + type: boolean + description: True if geolocation is configured. diff --git a/src/geolocation/schemas/GeolocationPut.yaml b/src/geolocation/schemas/GeolocationPut.yaml new file mode 100644 index 0000000..907a4af --- /dev/null +++ b/src/geolocation/schemas/GeolocationPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `geolocation` here) diff --git a/src/grouped_light_level/grouped_light_level.yaml b/src/grouped_light_level/grouped_light_level.yaml new file mode 100644 index 0000000..1a4b9dc --- /dev/null +++ b/src/grouped_light_level/grouped_light_level.yaml @@ -0,0 +1,42 @@ +get: + operationId: getGroupedLightLevels + summary: List grouped light level sensors. + description: List all available grouped light level sensors resources. + tags: + - GroupedLightLevel + security: + - HueApplicationKey: [ ] + responses: + 200: + description: GroupedLightLevel Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GroupedLightLevelGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/grouped_light_level/grouped_light_level_{groupedLightLevelId}.yaml b/src/grouped_light_level/grouped_light_level_{groupedLightLevelId}.yaml new file mode 100644 index 0000000..09011b0 --- /dev/null +++ b/src/grouped_light_level/grouped_light_level_{groupedLightLevelId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getGroupedLightLevel + summary: Get grouped light level. + description: Get details of a single grouped light level resource from its given `{groupedLightLevelId}`. + tags: + - GroupedLightLevel + security: + - HueApplicationKey: [ ] + parameters: + - name: groupedLightLevelId + in: path + schema: + type: string + required: true + description: ID of the grouped light level + responses: + 200: + description: GroupedLightLevel Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GroupedLightLevelGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateGroupedLightLevel + summary: Update grouped light level. + description: Update a single grouped light level resource from its given `{groupedLightLevelId}`. + tags: + - GroupedLightLevel + security: + - HueApplicationKey: [ ] + parameters: + - name: groupedLightLevelId + in: path + schema: + type: string + required: true + description: ID of the grouped light level + requestBody: + content: + application/json: + schema: + $ref: './schemas/GroupedLightLevelPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/grouped_light_level/schemas/GroupedLightLevelGet.yaml b/src/grouped_light_level/schemas/GroupedLightLevelGet.yaml new file mode 100644 index 0000000..fb36442 --- /dev/null +++ b/src/grouped_light_level/schemas/GroupedLightLevelGet.yaml @@ -0,0 +1,14 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + light: + type: object + properties: + light_level: + type: integer + description: Light level in 10000*log10(lux)+1 measured by sensor. + light_level_valid: + type: boolean + description: True if light level is valid. diff --git a/src/grouped_light_level/schemas/GroupedLightLevelPut.yaml b/src/grouped_light_level/schemas/GroupedLightLevelPut.yaml new file mode 100644 index 0000000..8e01e4f --- /dev/null +++ b/src/grouped_light_level/schemas/GroupedLightLevelPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `grouped_light_level` here) diff --git a/src/grouped_motion/grouped_motion.yaml b/src/grouped_motion/grouped_motion.yaml new file mode 100644 index 0000000..1725523 --- /dev/null +++ b/src/grouped_motion/grouped_motion.yaml @@ -0,0 +1,42 @@ +get: + operationId: getGroupedMotions + summary: List grouped motion sensors. + description: List all available grouped motion sensors resources. + tags: + - GroupedMotion + security: + - HueApplicationKey: [ ] + responses: + 200: + description: GroupedMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GroupedMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/grouped_motion/grouped_motion_{groupedMotionId}.yaml b/src/grouped_motion/grouped_motion_{groupedMotionId}.yaml new file mode 100644 index 0000000..d8dc6ac --- /dev/null +++ b/src/grouped_motion/grouped_motion_{groupedMotionId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getGroupedMotion + summary: Get grouped motion. + description: Get details of a single grouped motion resource from its given `{groupedMotionId}`. + tags: + - GroupedMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: groupedMotionId + in: path + schema: + type: string + required: true + description: ID of the grouped motion + responses: + 200: + description: GroupedMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/GroupedMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateGroupedMotion + summary: Update grouped motion. + description: Update a single grouped motion resource from its given `{groupedMotionId}`. + tags: + - GroupedMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: groupedMotionId + in: path + schema: + type: string + required: true + description: ID of the grouped motion + requestBody: + content: + application/json: + schema: + $ref: './schemas/GroupedMotionPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/grouped_motion/schemas/GroupedMotionGet.yaml b/src/grouped_motion/schemas/GroupedMotionGet.yaml new file mode 100644 index 0000000..4d31d29 --- /dev/null +++ b/src/grouped_motion/schemas/GroupedMotionGet.yaml @@ -0,0 +1,14 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + motion: + type: object + properties: + motion: + type: boolean + description: True if motion is detected in any of the grouped sensors. + motion_valid: + type: boolean + description: True if any of the grouped motion sensors are reporting valid motion. diff --git a/src/grouped_motion/schemas/GroupedMotionPut.yaml b/src/grouped_motion/schemas/GroupedMotionPut.yaml new file mode 100644 index 0000000..0d47bd9 --- /dev/null +++ b/src/grouped_motion/schemas/GroupedMotionPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `grouped_motion` here) diff --git a/src/homekit/homekit.yaml b/src/homekit/homekit.yaml new file mode 100644 index 0000000..265901b --- /dev/null +++ b/src/homekit/homekit.yaml @@ -0,0 +1,42 @@ +get: + operationId: getHomekits + summary: List HomeKit. + description: List all available HomeKit resources. + tags: + - Homekit + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Homekit Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/HomekitGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/homekit/homekit_{homekitId}.yaml b/src/homekit/homekit_{homekitId}.yaml new file mode 100644 index 0000000..40edecb --- /dev/null +++ b/src/homekit/homekit_{homekitId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getHomekit + summary: Get homekit. + description: Get details of a single homekit resource from its given `{homekitId}`. + tags: + - Homekit + security: + - HueApplicationKey: [ ] + parameters: + - name: homekitId + in: path + schema: + type: string + required: true + description: ID of the homekit + responses: + 200: + description: Homekit Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/HomekitGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateHomekit + summary: Update homekit. + description: Update a single homekit resource from its given `{homekitId}`. + tags: + - Homekit + security: + - HueApplicationKey: [ ] + parameters: + - name: homekitId + in: path + schema: + type: string + required: true + description: ID of the homekit + requestBody: + content: + application/json: + schema: + $ref: './schemas/HomekitPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/homekit/schemas/HomekitGet.yaml b/src/homekit/schemas/HomekitGet.yaml new file mode 100644 index 0000000..e4907bd --- /dev/null +++ b/src/homekit/schemas/HomekitGet.yaml @@ -0,0 +1,17 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - paired + - pairing + - unpaired + description: Current HomeKit pairing status. + action: + type: string + enum: + - none + description: Current HomeKit action. diff --git a/src/homekit/schemas/HomekitPut.yaml b/src/homekit/schemas/HomekitPut.yaml new file mode 100644 index 0000000..911eb14 --- /dev/null +++ b/src/homekit/schemas/HomekitPut.yaml @@ -0,0 +1,10 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `homekit` here) + action: + type: string + enum: + - homekit_reset + description: Action to trigger on the HomeKit integration. diff --git a/src/main.yaml b/src/main.yaml index 217a22f..1e17f0e 100644 --- a/src/main.yaml +++ b/src/main.yaml @@ -50,6 +50,62 @@ tags: description: API to manage zones. Zones group services and each service can be part of multiple zones. - name: Temperature description: API to manage temperature services. These are offered by devices with temperature sensing capabilities. + - name: Button + description: API to manage button services. These are offered by devices with buttons. + - name: BellButton + description: API to manage bell button services. + - name: RelativeRotary + description: API to manage relative rotary controls. + - name: Contact + description: API to manage contact sensors. + - name: Tamper + description: API to manage tamper detection sensors. + - name: CameraMotion + description: API to manage camera motion detection. + - name: GroupedMotion + description: API to manage grouped motion sensors. + - name: GroupedLightLevel + description: API to manage grouped light level sensors. + - name: ConvenienceAreaMotion + description: API to manage convenience area motion. + - name: SecurityAreaMotion + description: API to manage security area motion. + - name: MotionAreaCandidate + description: API to manage motion area candidates. + - name: MotionAreaConfiguration + description: API to manage motion area configuration. + - name: ZigbeeConnectivity + description: API to manage zigbee connectivity status. + - name: ZgpConnectivity + description: API to manage Zigbee Green Power connectivity. + - name: WifiConnectivity + description: API to manage WiFi connectivity. + - name: ZigbeeDeviceDiscovery + description: API to manage zigbee device discovery. + - name: Homekit + description: API to manage Apple HomeKit integration. + - name: Matter + description: API to manage Matter protocol support. + - name: MatterFabric + description: API to manage Matter fabric configuration. + - name: Entertainment + description: API to manage entertainment services. + - name: EntertainmentConfiguration + description: API to manage entertainment configuration. + - name: Speaker + description: API to manage speaker devices. + - name: BehaviorScript + description: API to manage automation scripts. + - name: BehaviorInstance + description: API to manage automation instances. + - name: GeofenceClient + description: API to manage geofence clients. + - name: Geolocation + description: API to manage geolocation. + - name: DeviceSoftwareUpdate + description: API to manage device software updates. + - name: ServiceGroup + description: API to manage service groups. paths: # Authentication /api: @@ -122,6 +178,146 @@ paths: $ref: './temperature/temperature.yaml' /clip/v2/resource/temperature/{temperatureId}: $ref: './temperature/temperature_{temperatureId}.yaml' +# Button + /clip/v2/resource/button: + $ref: './button/button.yaml' + /clip/v2/resource/button/{buttonId}: + $ref: './button/button_{buttonId}.yaml' +# Bell Button + /clip/v2/resource/bell_button: + $ref: './bell_button/bell_button.yaml' + /clip/v2/resource/bell_button/{bellButtonId}: + $ref: './bell_button/bell_button_{bellButtonId}.yaml' +# Relative Rotary + /clip/v2/resource/relative_rotary: + $ref: './relative_rotary/relative_rotary.yaml' + /clip/v2/resource/relative_rotary/{relativeRotaryId}: + $ref: './relative_rotary/relative_rotary_{relativeRotaryId}.yaml' +# Contact + /clip/v2/resource/contact: + $ref: './contact/contact.yaml' + /clip/v2/resource/contact/{contactId}: + $ref: './contact/contact_{contactId}.yaml' +# Tamper + /clip/v2/resource/tamper: + $ref: './tamper/tamper.yaml' + /clip/v2/resource/tamper/{tamperId}: + $ref: './tamper/tamper_{tamperId}.yaml' +# Camera Motion + /clip/v2/resource/camera_motion: + $ref: './camera_motion/camera_motion.yaml' + /clip/v2/resource/camera_motion/{cameraMotionId}: + $ref: './camera_motion/camera_motion_{cameraMotionId}.yaml' +# Grouped Motion + /clip/v2/resource/grouped_motion: + $ref: './grouped_motion/grouped_motion.yaml' + /clip/v2/resource/grouped_motion/{groupedMotionId}: + $ref: './grouped_motion/grouped_motion_{groupedMotionId}.yaml' +# Grouped Light Level + /clip/v2/resource/grouped_light_level: + $ref: './grouped_light_level/grouped_light_level.yaml' + /clip/v2/resource/grouped_light_level/{groupedLightLevelId}: + $ref: './grouped_light_level/grouped_light_level_{groupedLightLevelId}.yaml' +# Convenience Area Motion + /clip/v2/resource/convenience_area_motion: + $ref: './convenience_area_motion/convenience_area_motion.yaml' + /clip/v2/resource/convenience_area_motion/{convenienceAreaMotionId}: + $ref: './convenience_area_motion/convenience_area_motion_{convenienceAreaMotionId}.yaml' +# Security Area Motion + /clip/v2/resource/security_area_motion: + $ref: './security_area_motion/security_area_motion.yaml' + /clip/v2/resource/security_area_motion/{securityAreaMotionId}: + $ref: './security_area_motion/security_area_motion_{securityAreaMotionId}.yaml' +# Motion Area Candidate + /clip/v2/resource/motion_area_candidate: + $ref: './motion_area_candidate/motion_area_candidate.yaml' + /clip/v2/resource/motion_area_candidate/{motionAreaCandidateId}: + $ref: './motion_area_candidate/motion_area_candidate_{motionAreaCandidateId}.yaml' +# Motion Area Configuration + /clip/v2/resource/motion_area_configuration: + $ref: './motion_area_configuration/motion_area_configuration.yaml' + /clip/v2/resource/motion_area_configuration/{motionAreaConfigurationId}: + $ref: './motion_area_configuration/motion_area_configuration_{motionAreaConfigurationId}.yaml' +# Zigbee Connectivity + /clip/v2/resource/zigbee_connectivity: + $ref: './zigbee_connectivity/zigbee_connectivity.yaml' + /clip/v2/resource/zigbee_connectivity/{zigbeeConnectivityId}: + $ref: './zigbee_connectivity/zigbee_connectivity_{zigbeeConnectivityId}.yaml' +# ZGP Connectivity + /clip/v2/resource/zgp_connectivity: + $ref: './zgp_connectivity/zgp_connectivity.yaml' + /clip/v2/resource/zgp_connectivity/{zgpConnectivityId}: + $ref: './zgp_connectivity/zgp_connectivity_{zgpConnectivityId}.yaml' +# WiFi Connectivity + /clip/v2/resource/wifi_connectivity: + $ref: './wifi_connectivity/wifi_connectivity.yaml' + /clip/v2/resource/wifi_connectivity/{wifiConnectivityId}: + $ref: './wifi_connectivity/wifi_connectivity_{wifiConnectivityId}.yaml' +# Zigbee Device Discovery + /clip/v2/resource/zigbee_device_discovery: + $ref: './zigbee_device_discovery/zigbee_device_discovery.yaml' + /clip/v2/resource/zigbee_device_discovery/{zigbeeDeviceDiscoveryId}: + $ref: './zigbee_device_discovery/zigbee_device_discovery_{zigbeeDeviceDiscoveryId}.yaml' +# HomeKit + /clip/v2/resource/homekit: + $ref: './homekit/homekit.yaml' + /clip/v2/resource/homekit/{homekitId}: + $ref: './homekit/homekit_{homekitId}.yaml' +# Matter + /clip/v2/resource/matter: + $ref: './matter/matter.yaml' + /clip/v2/resource/matter/{matterId}: + $ref: './matter/matter_{matterId}.yaml' +# Matter Fabric + /clip/v2/resource/matter_fabric: + $ref: './matter_fabric/matter_fabric.yaml' + /clip/v2/resource/matter_fabric/{matterFabricId}: + $ref: './matter_fabric/matter_fabric_{matterFabricId}.yaml' +# Entertainment + /clip/v2/resource/entertainment: + $ref: './entertainment/entertainment.yaml' + /clip/v2/resource/entertainment/{entertainmentId}: + $ref: './entertainment/entertainment_{entertainmentId}.yaml' +# Entertainment Configuration + /clip/v2/resource/entertainment_configuration: + $ref: './entertainment_configuration/entertainment_configuration.yaml' + /clip/v2/resource/entertainment_configuration/{entertainmentConfigurationId}: + $ref: './entertainment_configuration/entertainment_configuration_{entertainmentConfigurationId}.yaml' +# Speaker + /clip/v2/resource/speaker: + $ref: './speaker/speaker.yaml' + /clip/v2/resource/speaker/{speakerId}: + $ref: './speaker/speaker_{speakerId}.yaml' +# Behavior Script + /clip/v2/resource/behavior_script: + $ref: './behavior_script/behavior_script.yaml' + /clip/v2/resource/behavior_script/{behaviorScriptId}: + $ref: './behavior_script/behavior_script_{behaviorScriptId}.yaml' +# Behavior Instance + /clip/v2/resource/behavior_instance: + $ref: './behavior_instance/behavior_instance.yaml' + /clip/v2/resource/behavior_instance/{behaviorInstanceId}: + $ref: './behavior_instance/behavior_instance_{behaviorInstanceId}.yaml' +# Geofence Client + /clip/v2/resource/geofence_client: + $ref: './geofence_client/geofence_client.yaml' + /clip/v2/resource/geofence_client/{geofenceClientId}: + $ref: './geofence_client/geofence_client_{geofenceClientId}.yaml' +# Geolocation + /clip/v2/resource/geolocation: + $ref: './geolocation/geolocation.yaml' + /clip/v2/resource/geolocation/{geolocationId}: + $ref: './geolocation/geolocation_{geolocationId}.yaml' +# Device Software Update + /clip/v2/resource/device_software_update: + $ref: './device_software_update/device_software_update.yaml' + /clip/v2/resource/device_software_update/{deviceSoftwareUpdateId}: + $ref: './device_software_update/device_software_update_{deviceSoftwareUpdateId}.yaml' +# Service Group + /clip/v2/resource/service_group: + $ref: './service_group/service_group.yaml' + /clip/v2/resource/service_group/{serviceGroupId}: + $ref: './service_group/service_group_{serviceGroupId}.yaml' components: securitySchemes: HueApplicationKey: diff --git a/src/matter/matter.yaml b/src/matter/matter.yaml new file mode 100644 index 0000000..6b8711a --- /dev/null +++ b/src/matter/matter.yaml @@ -0,0 +1,42 @@ +get: + operationId: getMatters + summary: List Matter. + description: List all available Matter resources. + tags: + - Matter + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Matter Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MatterGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/matter/matter_{matterId}.yaml b/src/matter/matter_{matterId}.yaml new file mode 100644 index 0000000..ecb0d3e --- /dev/null +++ b/src/matter/matter_{matterId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getMatter + summary: Get matter. + description: Get details of a single matter resource from its given `{matterId}`. + tags: + - Matter + security: + - HueApplicationKey: [ ] + parameters: + - name: matterId + in: path + schema: + type: string + required: true + description: ID of the matter + responses: + 200: + description: Matter Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MatterGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateMatter + summary: Update matter. + description: Update a single matter resource from its given `{matterId}`. + tags: + - Matter + security: + - HueApplicationKey: [ ] + parameters: + - name: matterId + in: path + schema: + type: string + required: true + description: ID of the matter + requestBody: + content: + application/json: + schema: + $ref: './schemas/MatterPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/matter/schemas/MatterGet.yaml b/src/matter/schemas/MatterGet.yaml new file mode 100644 index 0000000..097f728 --- /dev/null +++ b/src/matter/schemas/MatterGet.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + has_qr_code: + type: boolean + description: Indicates if QR code for Matter commissioning is available. + max_fabrics: + type: integer + description: Maximum number of fabrics that can be added. diff --git a/src/matter/schemas/MatterPut.yaml b/src/matter/schemas/MatterPut.yaml new file mode 100644 index 0000000..06c9c2b --- /dev/null +++ b/src/matter/schemas/MatterPut.yaml @@ -0,0 +1,13 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `matter` here) + action: + type: object + properties: + action_type: + type: string + enum: + - matter_reset + description: Action to trigger on the Matter integration. diff --git a/src/matter_fabric/matter_fabric.yaml b/src/matter_fabric/matter_fabric.yaml new file mode 100644 index 0000000..8234da3 --- /dev/null +++ b/src/matter_fabric/matter_fabric.yaml @@ -0,0 +1,42 @@ +get: + operationId: getMatterFabrics + summary: List Matter fabric. + description: List all available Matter fabric resources. + tags: + - MatterFabric + security: + - HueApplicationKey: [ ] + responses: + 200: + description: MatterFabric Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MatterFabricGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/matter_fabric/matter_fabric_{matterFabricId}.yaml b/src/matter_fabric/matter_fabric_{matterFabricId}.yaml new file mode 100644 index 0000000..dc23851 --- /dev/null +++ b/src/matter_fabric/matter_fabric_{matterFabricId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getMatterFabric + summary: Get matter fabric. + description: Get details of a single matter fabric resource from its given `{matterFabricId}`. + tags: + - MatterFabric + security: + - HueApplicationKey: [ ] + parameters: + - name: matterFabricId + in: path + schema: + type: string + required: true + description: ID of the matter fabric + responses: + 200: + description: MatterFabric Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MatterFabricGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateMatterFabric + summary: Update matter fabric. + description: Update a single matter fabric resource from its given `{matterFabricId}`. + tags: + - MatterFabric + security: + - HueApplicationKey: [ ] + parameters: + - name: matterFabricId + in: path + schema: + type: string + required: true + description: ID of the matter fabric + requestBody: + content: + application/json: + schema: + $ref: './schemas/MatterFabricPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/matter_fabric/schemas/MatterFabricGet.yaml b/src/matter_fabric/schemas/MatterFabricGet.yaml new file mode 100644 index 0000000..96df05f --- /dev/null +++ b/src/matter_fabric/schemas/MatterFabricGet.yaml @@ -0,0 +1,24 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - paired + - timedout + description: Current Matter fabric status. + fabric_data: + type: object + properties: + label: + type: string + description: Label of the fabric. + vendor_id: + type: integer + description: Vendor ID of the commissioning controller. + creation_time: + type: string + format: date-time + description: Timestamp when the fabric was created. diff --git a/src/matter_fabric/schemas/MatterFabricPut.yaml b/src/matter_fabric/schemas/MatterFabricPut.yaml new file mode 100644 index 0000000..e5a63c3 --- /dev/null +++ b/src/matter_fabric/schemas/MatterFabricPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `matter_fabric` here) diff --git a/src/motion_area_candidate/motion_area_candidate.yaml b/src/motion_area_candidate/motion_area_candidate.yaml new file mode 100644 index 0000000..f47ad0c --- /dev/null +++ b/src/motion_area_candidate/motion_area_candidate.yaml @@ -0,0 +1,42 @@ +get: + operationId: getMotionAreaCandidates + summary: List motion area candidates. + description: List all available motion area candidates resources. + tags: + - MotionAreaCandidate + security: + - HueApplicationKey: [ ] + responses: + 200: + description: MotionAreaCandidate Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MotionAreaCandidateGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/motion_area_candidate/motion_area_candidate_{motionAreaCandidateId}.yaml b/src/motion_area_candidate/motion_area_candidate_{motionAreaCandidateId}.yaml new file mode 100644 index 0000000..bedcdf3 --- /dev/null +++ b/src/motion_area_candidate/motion_area_candidate_{motionAreaCandidateId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getMotionAreaCandidate + summary: Get motion area candidate. + description: Get details of a single motion area candidate resource from its given `{motionAreaCandidateId}`. + tags: + - MotionAreaCandidate + security: + - HueApplicationKey: [ ] + parameters: + - name: motionAreaCandidateId + in: path + schema: + type: string + required: true + description: ID of the motion area candidate + responses: + 200: + description: MotionAreaCandidate Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MotionAreaCandidateGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateMotionAreaCandidate + summary: Update motion area candidate. + description: Update a single motion area candidate resource from its given `{motionAreaCandidateId}`. + tags: + - MotionAreaCandidate + security: + - HueApplicationKey: [ ] + parameters: + - name: motionAreaCandidateId + in: path + schema: + type: string + required: true + description: ID of the motion area candidate + requestBody: + content: + application/json: + schema: + $ref: './schemas/MotionAreaCandidatePut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/motion_area_candidate/schemas/MotionAreaCandidateGet.yaml b/src/motion_area_candidate/schemas/MotionAreaCandidateGet.yaml new file mode 100644 index 0000000..f428f72 --- /dev/null +++ b/src/motion_area_candidate/schemas/MotionAreaCandidateGet.yaml @@ -0,0 +1,10 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + motion_sensors: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' + description: List of motion sensor resources that are candidates for this area. diff --git a/src/motion_area_candidate/schemas/MotionAreaCandidatePut.yaml b/src/motion_area_candidate/schemas/MotionAreaCandidatePut.yaml new file mode 100644 index 0000000..d7f89d8 --- /dev/null +++ b/src/motion_area_candidate/schemas/MotionAreaCandidatePut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `motion_area_candidate` here) diff --git a/src/motion_area_configuration/motion_area_configuration.yaml b/src/motion_area_configuration/motion_area_configuration.yaml new file mode 100644 index 0000000..cb45c0f --- /dev/null +++ b/src/motion_area_configuration/motion_area_configuration.yaml @@ -0,0 +1,42 @@ +get: + operationId: getMotionAreaConfigurations + summary: List motion area configurations. + description: List all available motion area configurations resources. + tags: + - MotionAreaConfiguration + security: + - HueApplicationKey: [ ] + responses: + 200: + description: MotionAreaConfiguration Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MotionAreaConfigurationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/motion_area_configuration/motion_area_configuration_{motionAreaConfigurationId}.yaml b/src/motion_area_configuration/motion_area_configuration_{motionAreaConfigurationId}.yaml new file mode 100644 index 0000000..5003581 --- /dev/null +++ b/src/motion_area_configuration/motion_area_configuration_{motionAreaConfigurationId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getMotionAreaConfiguration + summary: Get motion area configuration. + description: Get details of a single motion area configuration resource from its given `{motionAreaConfigurationId}`. + tags: + - MotionAreaConfiguration + security: + - HueApplicationKey: [ ] + parameters: + - name: motionAreaConfigurationId + in: path + schema: + type: string + required: true + description: ID of the motion area configuration + responses: + 200: + description: MotionAreaConfiguration Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/MotionAreaConfigurationGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateMotionAreaConfiguration + summary: Update motion area configuration. + description: Update a single motion area configuration resource from its given `{motionAreaConfigurationId}`. + tags: + - MotionAreaConfiguration + security: + - HueApplicationKey: [ ] + parameters: + - name: motionAreaConfigurationId + in: path + schema: + type: string + required: true + description: ID of the motion area configuration + requestBody: + content: + application/json: + schema: + $ref: './schemas/MotionAreaConfigurationPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/motion_area_configuration/schemas/MotionAreaConfigurationGet.yaml b/src/motion_area_configuration/schemas/MotionAreaConfigurationGet.yaml new file mode 100644 index 0000000..58f3dfb --- /dev/null +++ b/src/motion_area_configuration/schemas/MotionAreaConfigurationGet.yaml @@ -0,0 +1,13 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + enabled: + type: boolean + description: True when configuration is active. + motion_sensors: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' + description: List of motion sensors in this area configuration. diff --git a/src/motion_area_configuration/schemas/MotionAreaConfigurationPut.yaml b/src/motion_area_configuration/schemas/MotionAreaConfigurationPut.yaml new file mode 100644 index 0000000..5566902 --- /dev/null +++ b/src/motion_area_configuration/schemas/MotionAreaConfigurationPut.yaml @@ -0,0 +1,8 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `motion_area_configuration` here) + enabled: + type: boolean + description: True when configuration is active. diff --git a/src/relative_rotary/relative_rotary.yaml b/src/relative_rotary/relative_rotary.yaml new file mode 100644 index 0000000..28edc9c --- /dev/null +++ b/src/relative_rotary/relative_rotary.yaml @@ -0,0 +1,42 @@ +get: + operationId: getRelativeRotaries + summary: List relative rotary controls. + description: List all available relative rotary resources. + tags: + - RelativeRotary + security: + - HueApplicationKey: [ ] + responses: + 200: + description: RelativeRotary Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/RelativeRotaryGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/relative_rotary/relative_rotary_{relativeRotaryId}.yaml b/src/relative_rotary/relative_rotary_{relativeRotaryId}.yaml new file mode 100644 index 0000000..e073252 --- /dev/null +++ b/src/relative_rotary/relative_rotary_{relativeRotaryId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getRelativeRotary + summary: Get relative rotary. + description: Get details of a single relative rotary resource from its given `{relativeRotaryId}`. + tags: + - RelativeRotary + security: + - HueApplicationKey: [ ] + parameters: + - name: relativeRotaryId + in: path + schema: + type: string + required: true + description: ID of the relative rotary + responses: + 200: + description: RelativeRotary Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/RelativeRotaryGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateRelativeRotary + summary: Update relative rotary. + description: Update a single relative rotary resource from its given `{relativeRotaryId}`. + tags: + - RelativeRotary + security: + - HueApplicationKey: [ ] + parameters: + - name: relativeRotaryId + in: path + schema: + type: string + required: true + description: ID of the relative rotary + requestBody: + content: + application/json: + schema: + $ref: './schemas/RelativeRotaryPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/relative_rotary/schemas/RelativeRotaryGet.yaml b/src/relative_rotary/schemas/RelativeRotaryGet.yaml new file mode 100644 index 0000000..310042a --- /dev/null +++ b/src/relative_rotary/schemas/RelativeRotaryGet.yaml @@ -0,0 +1,63 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + metadata: + type: object + properties: + control_id: + type: integer + description: Control identifier of the switch, unique within the device. + relative_rotary: + type: object + properties: + rotary_report: + type: object + properties: + updated: + type: string + format: date-time + description: Last time the value of this property was updated. + action: + type: string + enum: + - start + - repeat + description: Type of rotary event. + rotation: + type: object + properties: + direction: + type: string + enum: + - clock_wise + - counter_clock_wise + description: Direction of rotation. + steps: + type: integer + description: Amount of rotation since last event in case of repeat. + duration: + type: integer + description: Duration of rotation since last event in milliseconds. + last_event: + type: object + description: Deprecated. Use rotary_report instead. + properties: + action: + type: string + enum: + - start + - repeat + rotation: + type: object + properties: + direction: + type: string + enum: + - clock_wise + - counter_clock_wise + steps: + type: integer + duration: + type: integer diff --git a/src/relative_rotary/schemas/RelativeRotaryPut.yaml b/src/relative_rotary/schemas/RelativeRotaryPut.yaml new file mode 100644 index 0000000..d12b335 --- /dev/null +++ b/src/relative_rotary/schemas/RelativeRotaryPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `relative_rotary` here) diff --git a/src/security_area_motion/schemas/SecurityAreaMotionGet.yaml b/src/security_area_motion/schemas/SecurityAreaMotionGet.yaml new file mode 100644 index 0000000..e287109 --- /dev/null +++ b/src/security_area_motion/schemas/SecurityAreaMotionGet.yaml @@ -0,0 +1,14 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. + motion: + type: object + properties: + motion: + type: boolean + description: True if motion is detected. diff --git a/src/security_area_motion/schemas/SecurityAreaMotionPut.yaml b/src/security_area_motion/schemas/SecurityAreaMotionPut.yaml new file mode 100644 index 0000000..3671b55 --- /dev/null +++ b/src/security_area_motion/schemas/SecurityAreaMotionPut.yaml @@ -0,0 +1,8 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `security_area_motion` here) + enabled: + type: boolean + description: True when sensor is activated, false when deactivated. diff --git a/src/security_area_motion/security_area_motion.yaml b/src/security_area_motion/security_area_motion.yaml new file mode 100644 index 0000000..e98206d --- /dev/null +++ b/src/security_area_motion/security_area_motion.yaml @@ -0,0 +1,42 @@ +get: + operationId: getSecurityAreaMotions + summary: List security area motion sensors. + description: List all available security area motion sensors resources. + tags: + - SecurityAreaMotion + security: + - HueApplicationKey: [ ] + responses: + 200: + description: SecurityAreaMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/SecurityAreaMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/security_area_motion/security_area_motion_{securityAreaMotionId}.yaml b/src/security_area_motion/security_area_motion_{securityAreaMotionId}.yaml new file mode 100644 index 0000000..5a8d37d --- /dev/null +++ b/src/security_area_motion/security_area_motion_{securityAreaMotionId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getSecurityAreaMotion + summary: Get security area motion. + description: Get details of a single security area motion resource from its given `{securityAreaMotionId}`. + tags: + - SecurityAreaMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: securityAreaMotionId + in: path + schema: + type: string + required: true + description: ID of the security area motion + responses: + 200: + description: SecurityAreaMotion Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/SecurityAreaMotionGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateSecurityAreaMotion + summary: Update security area motion. + description: Update a single security area motion resource from its given `{securityAreaMotionId}`. + tags: + - SecurityAreaMotion + security: + - HueApplicationKey: [ ] + parameters: + - name: securityAreaMotionId + in: path + schema: + type: string + required: true + description: ID of the security area motion + requestBody: + content: + application/json: + schema: + $ref: './schemas/SecurityAreaMotionPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/service_group/schemas/ServiceGroupGet.yaml b/src/service_group/schemas/ServiceGroupGet.yaml new file mode 100644 index 0000000..b16941c --- /dev/null +++ b/src/service_group/schemas/ServiceGroupGet.yaml @@ -0,0 +1,10 @@ +type: object +allOf: + - $ref: '../../common/Resource.yaml' + - type: object + properties: + services: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' + description: List of services in this group. diff --git a/src/service_group/schemas/ServiceGroupPut.yaml b/src/service_group/schemas/ServiceGroupPut.yaml new file mode 100644 index 0000000..357e74e --- /dev/null +++ b/src/service_group/schemas/ServiceGroupPut.yaml @@ -0,0 +1,10 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `service_group` here) + services: + type: array + items: + $ref: '../../common/ResourceIdentifier.yaml' + description: List of services to include in this group. diff --git a/src/service_group/service_group.yaml b/src/service_group/service_group.yaml new file mode 100644 index 0000000..80e8486 --- /dev/null +++ b/src/service_group/service_group.yaml @@ -0,0 +1,42 @@ +get: + operationId: getServiceGroups + summary: List service group. + description: List all available service group resources. + tags: + - ServiceGroup + security: + - HueApplicationKey: [ ] + responses: + 200: + description: ServiceGroup Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ServiceGroupGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/service_group/service_group_{serviceGroupId}.yaml b/src/service_group/service_group_{serviceGroupId}.yaml new file mode 100644 index 0000000..04c4ba0 --- /dev/null +++ b/src/service_group/service_group_{serviceGroupId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getServiceGroup + summary: Get service group. + description: Get details of a single service group resource from its given `{serviceGroupId}`. + tags: + - ServiceGroup + security: + - HueApplicationKey: [ ] + parameters: + - name: serviceGroupId + in: path + schema: + type: string + required: true + description: ID of the service group + responses: + 200: + description: ServiceGroup Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ServiceGroupGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateServiceGroup + summary: Update service group. + description: Update a single service group resource from its given `{serviceGroupId}`. + tags: + - ServiceGroup + security: + - HueApplicationKey: [ ] + parameters: + - name: serviceGroupId + in: path + schema: + type: string + required: true + description: ID of the service group + requestBody: + content: + application/json: + schema: + $ref: './schemas/ServiceGroupPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/speaker/schemas/SpeakerGet.yaml b/src/speaker/schemas/SpeakerGet.yaml new file mode 100644 index 0000000..06a82ce --- /dev/null +++ b/src/speaker/schemas/SpeakerGet.yaml @@ -0,0 +1,12 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + alerts: + type: array + items: + type: string + enum: + - soundloop + description: Supported speaker alerts. diff --git a/src/speaker/schemas/SpeakerPut.yaml b/src/speaker/schemas/SpeakerPut.yaml new file mode 100644 index 0000000..c204421 --- /dev/null +++ b/src/speaker/schemas/SpeakerPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `speaker` here) diff --git a/src/speaker/speaker.yaml b/src/speaker/speaker.yaml new file mode 100644 index 0000000..de2cc67 --- /dev/null +++ b/src/speaker/speaker.yaml @@ -0,0 +1,42 @@ +get: + operationId: getSpeakers + summary: List speaker. + description: List all available speaker resources. + tags: + - Speaker + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Speaker Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/SpeakerGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/speaker/speaker_{speakerId}.yaml b/src/speaker/speaker_{speakerId}.yaml new file mode 100644 index 0000000..f148254 --- /dev/null +++ b/src/speaker/speaker_{speakerId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getSpeaker + summary: Get speaker. + description: Get details of a single speaker resource from its given `{speakerId}`. + tags: + - Speaker + security: + - HueApplicationKey: [ ] + parameters: + - name: speakerId + in: path + schema: + type: string + required: true + description: ID of the speaker + responses: + 200: + description: Speaker Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/SpeakerGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateSpeaker + summary: Update speaker. + description: Update a single speaker resource from its given `{speakerId}`. + tags: + - Speaker + security: + - HueApplicationKey: [ ] + parameters: + - name: speakerId + in: path + schema: + type: string + required: true + description: ID of the speaker + requestBody: + content: + application/json: + schema: + $ref: './schemas/SpeakerPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/tamper/schemas/TamperGet.yaml b/src/tamper/schemas/TamperGet.yaml new file mode 100644 index 0000000..063d8fb --- /dev/null +++ b/src/tamper/schemas/TamperGet.yaml @@ -0,0 +1,23 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + tamper_reports: + type: array + items: + type: object + properties: + changed: + type: string + format: date-time + description: Last time the value of this property was changed. + source: + type: string + description: Source of the tamper event. + state: + type: string + enum: + - tampered + - not_tampered + description: State of the tamper sensor. diff --git a/src/tamper/schemas/TamperPut.yaml b/src/tamper/schemas/TamperPut.yaml new file mode 100644 index 0000000..42a57fe --- /dev/null +++ b/src/tamper/schemas/TamperPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `tamper` here) diff --git a/src/tamper/tamper.yaml b/src/tamper/tamper.yaml new file mode 100644 index 0000000..ed538eb --- /dev/null +++ b/src/tamper/tamper.yaml @@ -0,0 +1,42 @@ +get: + operationId: getTampers + summary: List tamper sensors. + description: List all available tamper sensor resources. + tags: + - Tamper + security: + - HueApplicationKey: [ ] + responses: + 200: + description: Tamper Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/TamperGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/tamper/tamper_{tamperId}.yaml b/src/tamper/tamper_{tamperId}.yaml new file mode 100644 index 0000000..c834cf5 --- /dev/null +++ b/src/tamper/tamper_{tamperId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getTamper + summary: Get tamper sensor. + description: Get details of a single tamper sensor resource from its given `{tamperId}`. + tags: + - Tamper + security: + - HueApplicationKey: [ ] + parameters: + - name: tamperId + in: path + schema: + type: string + required: true + description: ID of the tamper sensor + responses: + 200: + description: Tamper Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/TamperGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateTamper + summary: Update tamper sensor. + description: Update a single tamper sensor resource from its given `{tamperId}`. + tags: + - Tamper + security: + - HueApplicationKey: [ ] + parameters: + - name: tamperId + in: path + schema: + type: string + required: true + description: ID of the tamper sensor + requestBody: + content: + application/json: + schema: + $ref: './schemas/TamperPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/wifi_connectivity/schemas/WifiConnectivityGet.yaml b/src/wifi_connectivity/schemas/WifiConnectivityGet.yaml new file mode 100644 index 0000000..4ab33b2 --- /dev/null +++ b/src/wifi_connectivity/schemas/WifiConnectivityGet.yaml @@ -0,0 +1,27 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - connected + - disconnected + - connectivity_issue + description: Current WiFi connectivity status of the device. + mac_address: + type: string + description: MAC address of the device. + signal_strength: + type: object + properties: + status: + type: string + enum: + - good + - fair + - bad + value: + type: integer + description: Signal strength in dBm. diff --git a/src/wifi_connectivity/schemas/WifiConnectivityPut.yaml b/src/wifi_connectivity/schemas/WifiConnectivityPut.yaml new file mode 100644 index 0000000..504985f --- /dev/null +++ b/src/wifi_connectivity/schemas/WifiConnectivityPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `wifi_connectivity` here) diff --git a/src/wifi_connectivity/wifi_connectivity.yaml b/src/wifi_connectivity/wifi_connectivity.yaml new file mode 100644 index 0000000..dae880d --- /dev/null +++ b/src/wifi_connectivity/wifi_connectivity.yaml @@ -0,0 +1,42 @@ +get: + operationId: getWifiConnectivities + summary: List WiFi connectivity. + description: List all available WiFi connectivity resources. + tags: + - WifiConnectivity + security: + - HueApplicationKey: [ ] + responses: + 200: + description: WifiConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/WifiConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/wifi_connectivity/wifi_connectivity_{wifiConnectivityId}.yaml b/src/wifi_connectivity/wifi_connectivity_{wifiConnectivityId}.yaml new file mode 100644 index 0000000..3c903e2 --- /dev/null +++ b/src/wifi_connectivity/wifi_connectivity_{wifiConnectivityId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getWifiConnectivity + summary: Get WiFi connectivity. + description: Get details of a single WiFi connectivity resource from its given `{wifiConnectivityId}`. + tags: + - WifiConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: wifiConnectivityId + in: path + schema: + type: string + required: true + description: ID of the WiFi connectivity + responses: + 200: + description: WifiConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/WifiConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateWifiConnectivity + summary: Update WiFi connectivity. + description: Update a single WiFi connectivity resource from its given `{wifiConnectivityId}`. + tags: + - WifiConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: wifiConnectivityId + in: path + schema: + type: string + required: true + description: ID of the WiFi connectivity + requestBody: + content: + application/json: + schema: + $ref: './schemas/WifiConnectivityPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zgp_connectivity/schemas/ZgpConnectivityGet.yaml b/src/zgp_connectivity/schemas/ZgpConnectivityGet.yaml new file mode 100644 index 0000000..a90d9b0 --- /dev/null +++ b/src/zgp_connectivity/schemas/ZgpConnectivityGet.yaml @@ -0,0 +1,15 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - connected + - disconnected + - connectivity_issue + description: Current connectivity status of the device. + source_id: + type: string + description: Source ID of the ZGP device. diff --git a/src/zgp_connectivity/schemas/ZgpConnectivityPut.yaml b/src/zgp_connectivity/schemas/ZgpConnectivityPut.yaml new file mode 100644 index 0000000..584531e --- /dev/null +++ b/src/zgp_connectivity/schemas/ZgpConnectivityPut.yaml @@ -0,0 +1,5 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `zgp_connectivity` here) diff --git a/src/zgp_connectivity/zgp_connectivity.yaml b/src/zgp_connectivity/zgp_connectivity.yaml new file mode 100644 index 0000000..d64791f --- /dev/null +++ b/src/zgp_connectivity/zgp_connectivity.yaml @@ -0,0 +1,42 @@ +get: + operationId: getZgpConnectivities + summary: List ZGP connectivity. + description: List all available Zigbee Green Power connectivity resources. + tags: + - ZgpConnectivity + security: + - HueApplicationKey: [ ] + responses: + 200: + description: ZgpConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZgpConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zgp_connectivity/zgp_connectivity_{zgpConnectivityId}.yaml b/src/zgp_connectivity/zgp_connectivity_{zgpConnectivityId}.yaml new file mode 100644 index 0000000..83ded9c --- /dev/null +++ b/src/zgp_connectivity/zgp_connectivity_{zgpConnectivityId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getZgpConnectivity + summary: Get ZGP connectivity. + description: Get details of a single ZGP connectivity resource from its given `{zgpConnectivityId}`. + tags: + - ZgpConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: zgpConnectivityId + in: path + schema: + type: string + required: true + description: ID of the ZGP connectivity + responses: + 200: + description: ZgpConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZgpConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateZgpConnectivity + summary: Update ZGP connectivity. + description: Update a single ZGP connectivity resource from its given `{zgpConnectivityId}`. + tags: + - ZgpConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: zgpConnectivityId + in: path + schema: + type: string + required: true + description: ID of the ZGP connectivity + requestBody: + content: + application/json: + schema: + $ref: './schemas/ZgpConnectivityPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zigbee_connectivity/schemas/ZigbeeConnectivityGet.yaml b/src/zigbee_connectivity/schemas/ZigbeeConnectivityGet.yaml new file mode 100644 index 0000000..0ff8b7f --- /dev/null +++ b/src/zigbee_connectivity/schemas/ZigbeeConnectivityGet.yaml @@ -0,0 +1,35 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - connected + - disconnected + - connectivity_issue + - unidirectional_incoming + description: Current connectivity status of the device. + mac_address: + type: string + description: MAC address of the device. + channel: + type: object + properties: + status: + type: string + enum: + - set + - changing + value: + type: string + enum: + - channel_11 + - channel_15 + - channel_20 + - channel_25 + description: Current zigbee channel. + extended_pan_id: + type: string + description: Extended PAN ID of the zigbee network. diff --git a/src/zigbee_connectivity/schemas/ZigbeeConnectivityPut.yaml b/src/zigbee_connectivity/schemas/ZigbeeConnectivityPut.yaml new file mode 100644 index 0000000..00d0124 --- /dev/null +++ b/src/zigbee_connectivity/schemas/ZigbeeConnectivityPut.yaml @@ -0,0 +1,16 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `zigbee_connectivity` here) + channel: + type: object + properties: + value: + type: string + enum: + - channel_11 + - channel_15 + - channel_20 + - channel_25 + description: Zigbee channel to set. diff --git a/src/zigbee_connectivity/zigbee_connectivity.yaml b/src/zigbee_connectivity/zigbee_connectivity.yaml new file mode 100644 index 0000000..9199678 --- /dev/null +++ b/src/zigbee_connectivity/zigbee_connectivity.yaml @@ -0,0 +1,42 @@ +get: + operationId: getZigbeeConnectivities + summary: List zigbee connectivity. + description: List all available zigbee connectivity resources. + tags: + - ZigbeeConnectivity + security: + - HueApplicationKey: [ ] + responses: + 200: + description: ZigbeeConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZigbeeConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zigbee_connectivity/zigbee_connectivity_{zigbeeConnectivityId}.yaml b/src/zigbee_connectivity/zigbee_connectivity_{zigbeeConnectivityId}.yaml new file mode 100644 index 0000000..3ff666c --- /dev/null +++ b/src/zigbee_connectivity/zigbee_connectivity_{zigbeeConnectivityId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getZigbeeConnectivity + summary: Get zigbee connectivity. + description: Get details of a single zigbee connectivity resource from its given `{zigbeeConnectivityId}`. + tags: + - ZigbeeConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: zigbeeConnectivityId + in: path + schema: + type: string + required: true + description: ID of the zigbee connectivity + responses: + 200: + description: ZigbeeConnectivity Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZigbeeConnectivityGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateZigbeeConnectivity + summary: Update zigbee connectivity. + description: Update a single zigbee connectivity resource from its given `{zigbeeConnectivityId}`. + tags: + - ZigbeeConnectivity + security: + - HueApplicationKey: [ ] + parameters: + - name: zigbeeConnectivityId + in: path + schema: + type: string + required: true + description: ID of the zigbee connectivity + requestBody: + content: + application/json: + schema: + $ref: './schemas/ZigbeeConnectivityPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryGet.yaml b/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryGet.yaml new file mode 100644 index 0000000..8b20ea7 --- /dev/null +++ b/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryGet.yaml @@ -0,0 +1,11 @@ +type: object +allOf: + - $ref: '../../common/ResourceOwned.yaml' + - type: object + properties: + status: + type: string + enum: + - active + - ready + description: Current status of the device discovery. diff --git a/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryPut.yaml b/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryPut.yaml new file mode 100644 index 0000000..a9b3a4f --- /dev/null +++ b/src/zigbee_device_discovery/schemas/ZigbeeDeviceDiscoveryPut.yaml @@ -0,0 +1,13 @@ +type: object +properties: + type: + type: string + description: Type of the supported resources (always `zigbee_device_discovery` here) + action: + type: object + properties: + action_type: + type: string + enum: + - search + description: Action to trigger device discovery. diff --git a/src/zigbee_device_discovery/zigbee_device_discovery.yaml b/src/zigbee_device_discovery/zigbee_device_discovery.yaml new file mode 100644 index 0000000..25c8fa3 --- /dev/null +++ b/src/zigbee_device_discovery/zigbee_device_discovery.yaml @@ -0,0 +1,42 @@ +get: + operationId: getZigbeeDeviceDiscoveries + summary: List zigbee device discovery. + description: List all available zigbee device discovery resources. + tags: + - ZigbeeDeviceDiscovery + security: + - HueApplicationKey: [ ] + responses: + 200: + description: ZigbeeDeviceDiscovery Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZigbeeDeviceDiscoveryGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' diff --git a/src/zigbee_device_discovery/zigbee_device_discovery_{zigbeeDeviceDiscoveryId}.yaml b/src/zigbee_device_discovery/zigbee_device_discovery_{zigbeeDeviceDiscoveryId}.yaml new file mode 100644 index 0000000..849642a --- /dev/null +++ b/src/zigbee_device_discovery/zigbee_device_discovery_{zigbeeDeviceDiscoveryId}.yaml @@ -0,0 +1,103 @@ +get: + operationId: getZigbeeDeviceDiscovery + summary: Get zigbee device discovery. + description: Get details of a single zigbee device discovery resource from its given `{zigbeeDeviceDiscoveryId}`. + tags: + - ZigbeeDeviceDiscovery + security: + - HueApplicationKey: [ ] + parameters: + - name: zigbeeDeviceDiscoveryId + in: path + schema: + type: string + required: true + description: ID of the zigbee device discovery + responses: + 200: + description: ZigbeeDeviceDiscovery Success Response + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: './schemas/ZigbeeDeviceDiscoveryGet.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage' +put: + operationId: updateZigbeeDeviceDiscovery + summary: Update zigbee device discovery. + description: Update a single zigbee device discovery resource from its given `{zigbeeDeviceDiscoveryId}`. + tags: + - ZigbeeDeviceDiscovery + security: + - HueApplicationKey: [ ] + parameters: + - name: zigbeeDeviceDiscoveryId + in: path + schema: + type: string + required: true + description: ID of the zigbee device discovery + requestBody: + content: + application/json: + schema: + $ref: './schemas/ZigbeeDeviceDiscoveryPut.yaml' + responses: + 200: + description: Success + content: + application/json: + schema: + allOf: + - $ref: '../common/ApiResponse.yaml' + - type: object + properties: + data: + type: array + items: + $ref: '../common/ResourceIdentifier.yaml' + 401: + $ref: '../common/error.yaml#/components/responses/Unauthorized' + 403: + $ref: '../common/error.yaml#/components/responses/Forbidden' + 404: + $ref: '../common/error.yaml#/components/responses/NotFound' + 405: + $ref: '../common/error.yaml#/components/responses/MethodNotAllowed' + 406: + $ref: '../common/error.yaml#/components/responses/NotAcceptable' + 409: + $ref: '../common/error.yaml#/components/responses/Conflict' + 429: + $ref: '../common/error.yaml#/components/responses/TooManyRequests' + 500: + $ref: '../common/error.yaml#/components/responses/InternalServerError' + 503: + $ref: '../common/error.yaml#/components/responses/ServiceUnavailable' + 507: + $ref: '../common/error.yaml#/components/responses/InsufficientStorage'