diff --git a/APIs/ConfigurationAPI.raml b/APIs/ConfigurationAPI.raml index b1969e3..d810b96 100644 --- a/APIs/ConfigurationAPI.raml +++ b/APIs/ConfigurationAPI.raml @@ -49,17 +49,34 @@ documentation: /bulkProperties: displayName: 'Bulk Properties' get: - description: 'Get Bulk Properties of the object' - body: - type: !include schemas/bulkProperties-get-request.json + description: 'Get Bulk Properties of the object, returned as a NcMethodResultBulkValuesHolder object.' queryParameters: recurse: - description: True will get Bulk Properties for this object and all child objects + description: 'True will get Bulk Properties for this object and all child objects' type: boolean responses: 200: body: type: !include schemas/bulkProperties-get-response.json + example: !include examples/bulkProperties-get-200.json + options: + description: 'Validate an NcBulkValuesHolder object against the Device Model' + body: + type: !include schemas/bulkProperties-validate-request.json + example: !include examples/bulkProperties-validate-request.json + responses: + 200: + body: + type: !include schemas/bulkProperties-validate-response.json + example: !include examples/bulkProperties-validate-200.json + put: + description: 'Set a Bulk Properties object on the Device Model' + body: + type: !include schemas/bulkProperties-set-request.json + responses: + 200: + body: + type: !include schemas/bulkProperties-set-response.json /properties: displayName: 'Properties' get: @@ -168,56 +185,3 @@ documentation: description: 'Returned when the Class Descriptor of this object was unable to be retrieved. Corresponds to NcMethodStatus code 500.' body: type: !include schemas/ms05-error.json -/bulkProperties: - displayName: 'Bulk Properties Functions' - get: - description: 'Shows the Bulk Properties functions' - responses: - 200: - body: - /validate: - displayName: 'Validate Bulk Properties' - patch: - description: 'Validate a Bulk Properties object against the Device Model' - body: - type: !include schemas/bulkProperties-validate-request.json - responses: - 200: - body: - type: !include schemas/bulkProperties-validate-response.json - /set: - displayName: 'Set Bulk Properties' - put: - description: 'Set a Bulk Properties object on the Device Model' - body: - type: !include schemas/bulkProperties-set-request.json - responses: - 200: - body: - type: !include schemas/bulkProperties-set-response.json -/bulkProperties_alternative: - displayName: 'Bulk Properties Functions' - get: - description: 'GET /rolePaths/root/bulkProperties' - body: - type: !include schemas/bulkProperties-get-request.json - responses: - 200: - body: - type: !include schemas/bulkProperties-get-response.json - patch: - description: 'Validate a Bulk Properties object against the Device Model' - body: - type: !include schemas/bulkProperties-validate-request.json - responses: - 200: - body: - type: !include schemas/bulkProperties-validate-response.json - put: - description: 'Set a Bulk Properties object on the Device Model' - body: - type: !include schemas/bulkProperties-set-request.json - responses: - 200: - body: - type: !include schemas/bulkProperties-set-response.json diff --git a/APIs/schemas/bulkProperties-get-request.json b/APIs/schemas/bulkProperties-get-request.json deleted file mode 100644 index cc4f97e..0000000 --- a/APIs/schemas/bulkProperties-get-request.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "description": "GET request body for invoking GetPropertiesByPath method on NcBulkPropertiesManager", - "title": "GetPropertiesByPath", - "required": [ - "arguments" - ], - "arguments": { - "type": "object", - "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." - } -} diff --git a/APIs/schemas/bulkProperties-get-response.json b/APIs/schemas/bulkProperties-get-response.json index e05cb62..9ddc05e 100644 --- a/APIs/schemas/bulkProperties-get-response.json +++ b/APIs/schemas/bulkProperties-get-response.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "NcMethodResultBulkValuesHolder", + "description": "Returns a NcMethodResultBulkValuesHolder from a bulkProperties GET", "title": "NcMethodResultBulkValuesHolder" } diff --git a/APIs/schemas/bulkProperties-set-request.json b/APIs/schemas/bulkProperties-set-request.json index 83b96de..04c69a0 100644 --- a/APIs/schemas/bulkProperties-set-request.json +++ b/APIs/schemas/bulkProperties-set-request.json @@ -6,8 +6,10 @@ "required": [ "arguments" ], - "arguments": { - "type": "object", - "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + "properties": { + "arguments": { + "type": "object", + "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + } } } diff --git a/APIs/schemas/bulkProperties-set-response.json b/APIs/schemas/bulkProperties-set-response.json index 6ef6249..6b5885c 100644 --- a/APIs/schemas/bulkProperties-set-response.json +++ b/APIs/schemas/bulkProperties-set-response.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "NcMethodResultObjectPropertiesSetValidation", + "description": "Returns a NcMethodResultObjectPropertiesSetValidation from a bulkProperties PUT", "title": "NcMethodResultObjectPropertiesSetValidation" } diff --git a/APIs/schemas/bulkProperties-validate-request.json b/APIs/schemas/bulkProperties-validate-request.json index 1f59a4a..a645997 100644 --- a/APIs/schemas/bulkProperties-validate-request.json +++ b/APIs/schemas/bulkProperties-validate-request.json @@ -1,13 +1,15 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "PATCH request body for invoking ValidateSetPropertiesByPaths method on NcBulkPropertiesManager", + "description": "PATCH request body for validating NcBulkValuesHolder object.", "title": "ValidateSetPropertiesByPaths", "required": [ "arguments" ], - "arguments": { - "type": "object", - "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + "properties": { + "arguments": { + "type": "object", + "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + } } } diff --git a/APIs/schemas/bulkProperties-validate-response.json b/APIs/schemas/bulkProperties-validate-response.json index 6ef6249..0a077c2 100644 --- a/APIs/schemas/bulkProperties-validate-response.json +++ b/APIs/schemas/bulkProperties-validate-response.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "NcMethodResultObjectPropertiesSetValidation", + "description": "Returns a NcMethodResultObjectPropertiesSetValidation from a bulkProperties OPTIONS", "title": "NcMethodResultObjectPropertiesSetValidation" } diff --git a/examples/bulkProperties-get-200.json b/examples/bulkProperties-get-200.json new file mode 100644 index 0000000..495b1a1 --- /dev/null +++ b/examples/bulkProperties-get-200.json @@ -0,0 +1,29 @@ +{ + "status": 200, + "validationFingerprint": null, + "values": [ + { + "rolePath": [ "root", "stereo-gain" ], + "values": [ + { + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "isReadOnly": false, + "value": "this is the property value" + }, + { + "id": { + "level": 2, + "index": 1 + }, + "name": "enabled", + "isReadOnly": false, + "value": true + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/bulkProperties-set-200.json b/examples/bulkProperties-set-200.json new file mode 100644 index 0000000..f40025e --- /dev/null +++ b/examples/bulkProperties-set-200.json @@ -0,0 +1,14 @@ +{ + "value": [ + { + "rolePath": [ "root", "stereo-gain" ], + "status": 200, + "statusMessage": "OK" + }, + { + "rolePath": [ "root", "channel-gain" ], + "status": 200, + "statusMessage": "OK" + } + ] +} diff --git a/examples/bulkProperties-set-request.json b/examples/bulkProperties-set-request.json new file mode 100644 index 0000000..0d62a5b --- /dev/null +++ b/examples/bulkProperties-set-request.json @@ -0,0 +1,56 @@ +{ + "arguments": { + "dataSet": { + "validationFingerprint": null, + "values": [ + { + "rolePath": [ "root", "stereo-gain" ], + "values": [ + { + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "isReadOnly": false, + "value": "Stereo Gain Block" + }, + { + "id": { + "level": 2, + "index": 1 + }, + "name": "enabled", + "isReadOnly": false, + "value": true + } + ] + }, + { + "rolePath": [ "root", "channel-gain" ], + "values": [ + { + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "isReadOnly": false, + "value": "Channel Gain Block" + }, + { + "id": { + "level": 2, + "index": 1 + }, + "name": "enabled", + "isReadOnly": false, + "value": true + } + ] + } + ] + }, + "recurse": false + } +} diff --git a/examples/bulkProperties-validate-200.json b/examples/bulkProperties-validate-200.json new file mode 100644 index 0000000..f40025e --- /dev/null +++ b/examples/bulkProperties-validate-200.json @@ -0,0 +1,14 @@ +{ + "value": [ + { + "rolePath": [ "root", "stereo-gain" ], + "status": 200, + "statusMessage": "OK" + }, + { + "rolePath": [ "root", "channel-gain" ], + "status": 200, + "statusMessage": "OK" + } + ] +} diff --git a/examples/bulkProperties-validate-request.json b/examples/bulkProperties-validate-request.json new file mode 100644 index 0000000..0d62a5b --- /dev/null +++ b/examples/bulkProperties-validate-request.json @@ -0,0 +1,56 @@ +{ + "arguments": { + "dataSet": { + "validationFingerprint": null, + "values": [ + { + "rolePath": [ "root", "stereo-gain" ], + "values": [ + { + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "isReadOnly": false, + "value": "Stereo Gain Block" + }, + { + "id": { + "level": 2, + "index": 1 + }, + "name": "enabled", + "isReadOnly": false, + "value": true + } + ] + }, + { + "rolePath": [ "root", "channel-gain" ], + "values": [ + { + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "isReadOnly": false, + "value": "Channel Gain Block" + }, + { + "id": { + "level": 2, + "index": 1 + }, + "name": "enabled", + "isReadOnly": false, + "value": true + } + ] + } + ] + }, + "recurse": false + } +}