diff --git a/APIs/ConfigurationAPI.raml b/APIs/ConfigurationAPI.raml index 2b9b8e2..c017e41 100644 --- a/APIs/ConfigurationAPI.raml +++ b/APIs/ConfigurationAPI.raml @@ -34,7 +34,9 @@ documentation: example: !include ../examples/rolePaths-base-get-200.json type: !include schemas/rolePaths-base.json /{rolePath}: - displayName: 'Attributes of a Role Path' + uriParameters: + rolePath: + type: string get: description: 'Get attributes of the object specified by rolePath' responses: @@ -60,6 +62,11 @@ documentation: type: !include schemas/bulkProperties-get-response.json example: !include ../examples/bulkProperties-get-200.json options: + description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes + responses: + 200: + 403: + patch: description: 'Validate an NcBulkValuesHolder object against the Device Model' body: type: !include schemas/bulkProperties-validate-request.json @@ -102,7 +109,15 @@ documentation: example: !include ../examples/methods-base-get-200.json type: !include schemas/methods-base.json /{methodId}: - displayName: 'Invoke Method.' + uriParameters: + methodId: + type: string + pattern: "^[0-9]+m[0-9]+" + options: + description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes + responses: + 200: + 403: patch: description: 'Invoke method.' body: @@ -135,7 +150,10 @@ documentation: example: !include ../examples/properties-base-get-200.json type: !include schemas/properties-base.json /{propertyId}: - displayName: 'Attributes of a Property' + uriParameters: + propertyId: + type: string + pattern: "^[0-9]+p[0-9]+" get: description: 'Get attributes of a Property' responses: @@ -173,6 +191,11 @@ documentation: description: 'Returned when the Property was unable to be retrieved. Corresponds to NcMethodStatus code 500.' body: type: !include schemas/ms05-error.json + options: + description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes + responses: + 200: + 403: put: descriptions: 'Put value of a Property' body: diff --git a/APIs/schemas/methods-base.json b/APIs/schemas/methods-base.json index dd30ab1..6b9222b 100644 --- a/APIs/schemas/methods-base.json +++ b/APIs/schemas/methods-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/methods base", "title": "Configuration API /rolePaths/{rolePath}/methods base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+m[0-9]+" }, "uniqueItems": true } diff --git a/APIs/schemas/properties-base.json b/APIs/schemas/properties-base.json index ae1a931..72c3f54 100644 --- a/APIs/schemas/properties-base.json +++ b/APIs/schemas/properties-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/properties base", "title": "Configuration API /rolePaths/{rolePath}/properties base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+p[0-9]+" }, "uniqueItems": true } diff --git a/APIs/schemas/rolePath.json b/APIs/schemas/rolePath.json index 0cafe9c..03cf62b 100644 --- a/APIs/schemas/rolePath.json +++ b/APIs/schemas/rolePath.json @@ -6,8 +6,8 @@ "items": { "type": "string", "enum": [ - "bulkProperties", - "descriptors/", + "bulkProperties/", + "descriptor/", "methods/", "properties/" ] diff --git a/examples/class-descriptor-get-200.json b/examples/class-descriptor-get-200.json index f9e25e0..a40d962 100644 --- a/examples/class-descriptor-get-200.json +++ b/examples/class-descriptor-get-200.json @@ -1,324 +1,327 @@ { - "description": "NcObject class descriptor", - "classId": [ - 1 - ], - "name": "NcObject", - "fixedRole": null, - "properties": [ - { - "description": "Static value. All instances of the same class will have the same identity value", - "id": { - "level": 1, - "index": 1 - }, - "name": "classId", - "typeName": "NcClassId", - "isReadOnly": true, - "isNullable": false, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "Object identifier", - "id": { - "level": 1, - "index": 2 - }, - "name": "oid", - "typeName": "NcOid", - "isReadOnly": true, - "isNullable": false, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "TRUE iff OID is hardwired into device", - "id": { - "level": 1, - "index": 3 - }, - "name": "constantOid", - "typeName": "NcBoolean", - "isReadOnly": true, - "isNullable": false, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "OID of containing block. Can only ever be null for the root block", - "id": { - "level": 1, - "index": 4 - }, - "name": "owner", - "typeName": "NcOid", - "isReadOnly": true, - "isNullable": true, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "Role of object in the containing block", - "id": { - "level": 1, - "index": 5 + "status": 200, + "value": { + "description": "NcObject class descriptor", + "classId": [ + 1 + ], + "name": "NcObject", + "fixedRole": null, + "properties": [ + { + "description": "Static value. All instances of the same class will have the same identity value", + "id": { + "level": 1, + "index": 1 + }, + "name": "classId", + "typeName": "NcClassId", + "isReadOnly": true, + "isNullable": false, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "role", - "typeName": "NcString", - "isReadOnly": true, - "isNullable": false, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "Scribble strip", - "id": { - "level": 1, - "index": 6 + { + "description": "Object identifier", + "id": { + "level": 1, + "index": 2 + }, + "name": "oid", + "typeName": "NcOid", + "isReadOnly": true, + "isNullable": false, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "userLabel", - "typeName": "NcString", - "isReadOnly": false, - "isNullable": true, - "isSequence": false, - "isDeprecated": false, - "constraints": null - }, - { - "description": "Touchpoints to other contexts", - "id": { - "level": 1, - "index": 7 + { + "description": "TRUE iff OID is hardwired into device", + "id": { + "level": 1, + "index": 3 + }, + "name": "constantOid", + "typeName": "NcBoolean", + "isReadOnly": true, + "isNullable": false, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "touchpoints", - "typeName": "NcTouchpoint", - "isReadOnly": true, - "isNullable": true, - "isSequence": true, - "isDeprecated": false, - "constraints": null - }, - { - "description": "Runtime property constraints", - "id": { - "level": 1, - "index": 8 + { + "description": "OID of containing block. Can only ever be null for the root block", + "id": { + "level": 1, + "index": 4 + }, + "name": "owner", + "typeName": "NcOid", + "isReadOnly": true, + "isNullable": true, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "runtimePropertyConstraints", - "typeName": "NcPropertyConstraints", - "isReadOnly": true, - "isNullable": true, - "isSequence": true, - "isDeprecated": false, - "constraints": null - } - ], - "methods": [ - { - "description": "Get property value", - "id": { - "level": 1, - "index": 1 + { + "description": "Role of object in the containing block", + "id": { + "level": 1, + "index": 5 + }, + "name": "role", + "typeName": "NcString", + "isReadOnly": true, + "isNullable": false, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "Get", - "resultDatatype": "NcMethodResultPropertyValue", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Set property value", - "id": { - "level": 1, - "index": 2 + { + "description": "Scribble strip", + "id": { + "level": 1, + "index": 6 + }, + "name": "userLabel", + "typeName": "NcString", + "isReadOnly": false, + "isNullable": true, + "isSequence": false, + "isDeprecated": false, + "constraints": null }, - "name": "Set", - "resultDatatype": "NcMethodResult", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null + { + "description": "Touchpoints to other contexts", + "id": { + "level": 1, + "index": 7 }, - { - "description": "Property value", - "name": "value", - "typeName": null, - "isNullable": true, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Get sequence item", - "id": { - "level": 1, - "index": 3 + "name": "touchpoints", + "typeName": "NcTouchpoint", + "isReadOnly": true, + "isNullable": true, + "isSequence": true, + "isDeprecated": false, + "constraints": null }, - "name": "GetSequenceItem", - "resultDatatype": "NcMethodResultPropertyValue", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null + { + "description": "Runtime property constraints", + "id": { + "level": 1, + "index": 8 }, - { - "description": "Index of item in the sequence", - "name": "index", - "typeName": "NcId", - "isNullable": false, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Set sequence item value", - "id": { - "level": 1, - "index": 4 + "name": "runtimePropertyConstraints", + "typeName": "NcPropertyConstraints", + "isReadOnly": true, + "isNullable": true, + "isSequence": true, + "isDeprecated": false, + "constraints": null + } + ], + "methods": [ + { + "description": "Get property value", + "id": { + "level": 1, + "index": 1 + }, + "name": "Get", + "resultDatatype": "NcMethodResultPropertyValue", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false }, - "name": "SetSequenceItem", - "resultDatatype": "NcMethodResult", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null + { + "description": "Set property value", + "id": { + "level": 1, + "index": 2 }, - { - "description": "Index of item in the sequence", - "name": "index", - "typeName": "NcId", - "isNullable": false, - "isSequence": false, - "constraints": null + "name": "Set", + "resultDatatype": "NcMethodResult", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Property value", + "name": "value", + "typeName": null, + "isNullable": true, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false + }, + { + "description": "Get sequence item", + "id": { + "level": 1, + "index": 3 }, - { - "description": "Value", - "name": "value", - "typeName": null, - "isNullable": true, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Add item to sequence", - "id": { - "level": 1, - "index": 5 + "name": "GetSequenceItem", + "resultDatatype": "NcMethodResultPropertyValue", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Index of item in the sequence", + "name": "index", + "typeName": "NcId", + "isNullable": false, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false }, - "name": "AddSequenceItem", - "resultDatatype": "NcMethodResultId", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null + { + "description": "Set sequence item value", + "id": { + "level": 1, + "index": 4 }, - { - "description": "Value", - "name": "value", - "typeName": null, - "isNullable": true, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Delete sequence item", - "id": { - "level": 1, - "index": 6 + "name": "SetSequenceItem", + "resultDatatype": "NcMethodResult", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Index of item in the sequence", + "name": "index", + "typeName": "NcId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Value", + "name": "value", + "typeName": null, + "isNullable": true, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false }, - "name": "RemoveSequenceItem", - "resultDatatype": "NcMethodResult", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null + { + "description": "Add item to sequence", + "id": { + "level": 1, + "index": 5 }, - { - "description": "Index of item in the sequence", - "name": "index", - "typeName": "NcId", - "isNullable": false, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - }, - { - "description": "Get sequence length", - "id": { - "level": 1, - "index": 7 + "name": "AddSequenceItem", + "resultDatatype": "NcMethodResultId", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Value", + "name": "value", + "typeName": null, + "isNullable": true, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false }, - "name": "GetSequenceLength", - "resultDatatype": "NcMethodResultLength", - "parameters": [ - { - "description": "Property id", - "name": "id", - "typeName": "NcPropertyId", - "isNullable": false, - "isSequence": false, - "constraints": null - } - ], - "isDeprecated": false - } - ], - "events": [ - { - "description": "Property changed event", - "id": { - "level": 1, - "index": 1 + { + "description": "Delete sequence item", + "id": { + "level": 1, + "index": 6 + }, + "name": "RemoveSequenceItem", + "resultDatatype": "NcMethodResult", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Index of item in the sequence", + "name": "index", + "typeName": "NcId", + "isNullable": false, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false }, - "name": "PropertyChanged", - "eventDatatype": "NcPropertyChangedEventData", - "isDeprecated": false - } - ] + { + "description": "Get sequence length", + "id": { + "level": 1, + "index": 7 + }, + "name": "GetSequenceLength", + "resultDatatype": "NcMethodResultLength", + "parameters": [ + { + "description": "Property id", + "name": "id", + "typeName": "NcPropertyId", + "isNullable": false, + "isSequence": false, + "constraints": null + } + ], + "isDeprecated": false + } + ], + "events": [ + { + "description": "Property changed event", + "id": { + "level": 1, + "index": 1 + }, + "name": "PropertyChanged", + "eventDatatype": "NcPropertyChangedEventData", + "isDeprecated": false + } + ] + } } diff --git a/examples/property-descriptor-get-200.json b/examples/property-descriptor-get-200.json index 1dee579..41f4dbc 100644 --- a/examples/property-descriptor-get-200.json +++ b/examples/property-descriptor-get-200.json @@ -1,57 +1,60 @@ { - "description": "Descriptor which is specific to a block member", - "name": "NcBlockMemberDescriptor", - "type": 2, - "fields": [ - { - "description": "Role of member in its containing block", - "name": "role", - "typeName": "NcString", - "isNullable": false, - "isSequence": false, - "constraints": null - }, - { - "description": "OID of member", - "name": "oid", - "typeName": "NcOid", - "isNullable": false, - "isSequence": false, - "constraints": null - }, - { - "description": "TRUE iff member's OID is hardwired into device", - "name": "constantOid", - "typeName": "NcBoolean", - "isNullable": false, - "isSequence": false, - "constraints": null - }, - { - "description": "Class ID", - "name": "classId", - "typeName": "NcClassId", - "isNullable": false, - "isSequence": false, - "constraints": null - }, - { - "description": "User label", - "name": "userLabel", - "typeName": "NcString", - "isNullable": true, - "isSequence": false, - "constraints": null - }, - { - "description": "Containing block's OID", - "name": "owner", - "typeName": "NcOid", - "isNullable": false, - "isSequence": false, - "constraints": null - } - ], - "parentType": "NcDescriptor", - "constraints": null + "status": 200, + "value": { + "description": "Descriptor which is specific to a block member", + "name": "NcBlockMemberDescriptor", + "type": 2, + "fields": [ + { + "description": "Role of member in its containing block", + "name": "role", + "typeName": "NcString", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "OID of member", + "name": "oid", + "typeName": "NcOid", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "TRUE iff member's OID is hardwired into device", + "name": "constantOid", + "typeName": "NcBoolean", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "Class ID", + "name": "classId", + "typeName": "NcClassId", + "isNullable": false, + "isSequence": false, + "constraints": null + }, + { + "description": "User label", + "name": "userLabel", + "typeName": "NcString", + "isNullable": true, + "isSequence": false, + "constraints": null + }, + { + "description": "Containing block's OID", + "name": "owner", + "typeName": "NcOid", + "isNullable": false, + "isSequence": false, + "constraints": null + } + ], + "parentType": "NcDescriptor", + "constraints": null + } } diff --git a/examples/rolePath-get-200.json b/examples/rolePath-get-200.json index 8608385..2e34201 100644 --- a/examples/rolePath-get-200.json +++ b/examples/rolePath-get-200.json @@ -1,6 +1,6 @@ [ - "bulkProperties", - "descriptors/", + "bulkProperties/", + "descriptor/", "methods/", "properties/" ]