diff --git a/DISCLAIMER.md b/DISCLAIMER.md new file mode 100644 index 0000000..4e81410 --- /dev/null +++ b/DISCLAIMER.md @@ -0,0 +1 @@ +THIS SOFTWARE IS PROVIDED BY THE OPEN CONNECTIVITY FOUNDATION, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN CONNECTIVITY FOUNDATION, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0e4811b --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,3 @@ +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. diff --git a/oic.core.json b/oic.core.json deleted file mode 100755 index 0324908..0000000 --- a/oic.core.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "id": "http://openinterconnect.org/schemas/oic.core#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "title": "Core", - "definitions": { - "oic.core": { - "type": "object", - "properties": { - "rt": { - "type": "string", - "description": "ReadOnly, Resource Type" - }, - "if": { - "type": "array", - "items": [ - { - "type" : "string", - "enum" : ["oic.if.def", "oic.if.ll", "oic.if.b", "oic.if.rp", "oic.if.p", "oic.if.a", "oic.if.s" ] - } - ], - "minItems": 1, - "description": "ReadOnly, The interface set supported by this resource" - }, - "p": { - "type": "string", - "description": "ReadOnly, bitmap indicating observable and discoverable" - }, - "n": { - "type": "string", - "description": "Friendly name of the resource" - } - } - } - }, - "type": "object", - "allOf": [ - {"$ref": "#/definitions/oic.core"} - ] -} diff --git a/oic.oic-link.json b/oic.oic-link.json deleted file mode 100755 index f4f805f..0000000 --- a/oic.oic-link.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/rm/oic.oic-link.json", - "type": "object", - "properties": { - "href": { - "type": "string", - "description": "RFC5988 style web-links serialized into JSON. This is the target URI", - "format": "uri" - }, - "rel": { - "type": "string", - "default": "advertises", - "description": "The relation of the target URI referenced by the link to the context URI" - }, - "rt": { - "type": "string", - "description": "Resource Type - A standard OIC specified or vendor defined resource type of the resource referenced by the target URI" - }, - "if": { - "type": "string", - "description": "Interface - The interfaces supported by the resource referenced by the target URI" - }, - "obs": { - "type": "boolean", - "description": "Specifies if the resource referenced by the target URIis observable or not", - "default": false - }, - "title": { - "type": "string", - "description": "A title for the link relation. Can be used by the UI to provide a context" - }, - "anchor": { - "type": "string", - "description": "This is used to override the context URI e.g. override the URI of the containing collection", - "format": "uri" - }, - "ins": { - "oneOf": [ - { - "type": "integer", - "description": "An ordinal number that is not repeated - must be unique in the collection context" - }, - { - "type": "string", - "description": "Any unique string including a URI" - }, - { - "type": "string", - "format": "uuid", - "description": "Use UUID for universal uniqueness - used in /oic/res to identify the device" - } - ], - "description": "The instance identifier for this web link in an array of web links - used in collections" - }, - "ttl": { - "type": "integer", - "description": "The time to live for this link in seconds - value is specified in a request only and is not returned on response. Max integer size to represent time is 4 octets" - }, - "type": { - "type": "string", - "description": "A hint at the representation of the resource referenced by the target URI", - "default": "application/json" - } - }, - "required": [ "href", "rt", "if" ] -} \ No newline at end of file diff --git a/oic.wk.con.raml b/oic.wk.con.raml index 7e0cc41..2bc4537 100755 --- a/oic.wk.con.raml +++ b/oic.wk.con.raml @@ -1,30 +1,31 @@ #%RAML 0.8 title: OIC Configuration -version: v1-20150807 +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Configuration: !include oic.wk.con.json - - + - Configuration: !include schemas/oic.wk.con-schema.json + + traits: - interface: queryParameters: if: - enum: ["oic.if.rw"] + enum: ["oic.if.rw", "oic.if.baseline"] /oic/con: displayName: OIC Configuration is: [ interface ] description: | - Known resource that is hosted by every OIC Server. + Known resource that is hosted by every Server. Allows for device specific information to be configured. get: @@ -37,7 +38,7 @@ traits: schema: Configuration example: | { - "rt": "oic.wk.con", + "rt": ["oic.wk.con"], "n": "My Friendly Device Name", "loc": "My Location Information", "locn": "My Location Name", @@ -47,7 +48,7 @@ traits: post: description: | - Update the information about the OIC device + Update the information about the Device body: application/json: schema: Configuration diff --git a/oic.wk.d.raml b/oic.wk.d.raml index 49ec76f..9e51e49 100755 --- a/oic.wk.d.raml +++ b/oic.wk.d.raml @@ -1,32 +1,33 @@ #%RAML 0.8 title: OIC Root Device -version: v1-20150811 +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Device: !include oic.wk.d.json + - Device: !include schemas/oic.wk.d-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/d: - displayName: OIC Logical Device + displayName: Device is: [ interface ] description: | - Known resource that is hosted by every OIC Server. + Known resource that is hosted by every Server. Allows for logical device specific information to be discovered. get: description: | - Retrieve the information about the OIC device + Retrieve the information about the Device responses: 200: body: @@ -35,7 +36,8 @@ traits: example: | { "n": "Device 1", - "rt": "oic.wk.d", + "rt": ["oic.wk.d"], "di": "54919CA5-4101-4AE4-595B-353C51AA983C", - "icv": "OIC 1.0" + "icv": "core.1.1.0", + "dmv": "res.1.1.0" } diff --git a/oic.wk.ifs.json b/oic.wk.ifs.json deleted file mode 100755 index 6cf8d17..0000000 --- a/oic.wk.ifs.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.ifs#", - "definitions": { - "oic.wk.ifs": { - "type": "object", - "properties": { - "il": { - "type": "string", - "description": "Readonly, list of interface names", - "format": "bsv" - } - } - } - }, - "type": "object", - "allOf": [ - { "$ref": "#/definitions/oic.wk.ifs" } - ], - "required": ["il"] -} diff --git a/oic.wk.ifs.raml b/oic.wk.ifs.raml index 10fc648..4daa522 100755 --- a/oic.wk.ifs.raml +++ b/oic.wk.ifs.raml @@ -1,28 +1,29 @@ #%RAML 0.8 -title: OIC Interface Types -version: v1-20150811 +title: Interface Types +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - IFS: !include oic.wk.ifs.json + - IFS: !include schemas/oic.wk.ifs-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/ifs: - displayName: OIC Inteface Types + displayName: Inteface Types is: [ interface ] description: | - List of resource interfaces that are supported by this OIC Server + List of resource interfaces that are supported by this Server get: description: Retrieve the resource interface list responses: @@ -32,6 +33,6 @@ traits: schema: IFS example: | { - "rt": "oic.wk.ifs", - "il": "oic.if.ll oic.if.bat oic.if.r" + "rt": ["oic.wk.ifs"], + "il": ["oic.if.ll", "oic.if.b", "oic.if.r"] } diff --git a/oic.wk.mnt.raml b/oic.wk.mnt.raml index cc71910..d2b5847 100755 --- a/oic.wk.mnt.raml +++ b/oic.wk.mnt.raml @@ -1,28 +1,29 @@ #%RAML 0.8 -title: OIC Maintenance -version: v1-20150811 +title: Maintenance +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - MNT: !include oic.wk.mnt.json + - MNT: !include schemas/oic.wk.mnt-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/mnt: - displayName: OIC Maintenance + displayName: Maintenance is: [ interface ] description: | - The resource through which an OIC Device is maintained and can be used for diagnostic purposes. + The resource through which an Device is maintained and can be used for diagnostic purposes. fr (Factory Reset) is a boolean. The value 0 means No action (Default), the value 1 means Start Factory Reset After factory reset, this value shall be changed back to the default value @@ -44,7 +45,7 @@ traits: schema: MNT example: | { - "rt": "oic.wk.mnt", + "rt": ["oic.wk.mnt"], "n": "My Maintenance Actions", "fr": false, "rb": false, diff --git a/oic.wk.mon.raml b/oic.wk.mon.raml index 7f901b2..d3a6efa 100755 --- a/oic.wk.mon.raml +++ b/oic.wk.mon.raml @@ -1,28 +1,29 @@ #%RAML 0.8 -title: OIC Monitoring -version: v1-20150401 +title: Monitoring +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - MON: !include oic.wk.mon.json + - MON: !include schemas/oic.wk.mon-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/mon: - displayName: OIC Monitoring + displayName: Monitoring is: [ interface ] description: | - The resource through which an OIC Device is monitored. + The resource through which an Device is monitored. get: description: Retrieve the monitor information responses: @@ -32,9 +33,9 @@ traits: schema: MON example: | { - "rt": "oic.wk.mon", + "rt": ["oic.wk.mon"], "name": "My Monitor Information", "av": true, "lat": 50, - "ds": "1500, 2750, 0" + "ds": ["1500", "2750", "0"] } diff --git a/oic.wk.p.raml b/oic.wk.p.raml index c4c1204..7b1f09a 100755 --- a/oic.wk.p.raml +++ b/oic.wk.p.raml @@ -1,32 +1,33 @@ #%RAML 0.8 -title: OIC Base Platform -version: v1-20150804 +title: Platform +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Platform: !include oic.wk.p.json + - Platform: !include schemas/oic.wk.p-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/p: - displayName: OIC Base Platform + displayName: Platform is: [ interface ] description: | - Known resource that is defines the platform on which an OIC Server is hosted. + Known resource that is defines the platform on which an Server is hosted. Allows for platform specific information to be discovered. get: description: | - Retrieve the information about the OIC Platform + Retrieve the information about the Platform responses: 200: @@ -35,7 +36,7 @@ traits: schema: Platform example: | { - "pi": "my-platform-identfier", - "rt": "oic.wk.p", + "pi": "54919CA5-4101-4AE4-595B-353C51AA983C", + "rt": ["oic.wk.p"], "mnmn": "Acme, Inc" } diff --git a/oic.wk.ping.raml b/oic.wk.ping.raml index 5108089..87bdc94 100755 --- a/oic.wk.ping.raml +++ b/oic.wk.ping.raml @@ -1,28 +1,29 @@ #%RAML 0.8 -title: OIC Ping -version: v1-20150814 +title: Ping +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - PING: !include oic.wk.ping.json + - PING: !include schemas/oic.wk.ping-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.rw"] + enum: ["oic.if.rw", "oic.if.baseline"] /oic/ping: - displayName: OIC Ping + displayName: Ping is: [ interface ] description: | - The resource using which an OIC Client keeps its Connection with an OIC Server active. + The resource using which an Client keeps its Connection with an Server active. get: description: Retrieve the ping information responses: @@ -32,7 +33,7 @@ traits: schema: PING example: | { - "rt": "oic.wk.ping", - "name": "Ping Information", + "rt": ["oic.wk.ping"], + "n": "Ping Information", "in": 16 } diff --git a/oic.wk.res.raml b/oic.wk.res.raml index e16e6bc..8998d4d 100755 --- a/oic.wk.res.raml +++ b/oic.wk.res.raml @@ -1,28 +1,30 @@ #%RAML 0.8 -title: OIC Discoverable Resources -version: v1-20150807 +title: Discoverable Resources +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Resources: !include oic.wk.res.json + - Resources: !include schemas/oic.wk.res-schema.json + traits: - interface: queryParameters: if: - enum: ["oic.if.ll"] + enum: ["oic.if.ll", "oic.if.baseline"] /oic/res: - displayName: OIC Discoverable Resources + displayName: Discoverable Resources is: [ interface ] description: | - The resource through which the corresponding OIC Server is discovered and introspected for available resources. + The resource through which the corresponding Server is discovered and introspected for available resources. get: description: | Retrieve the discoverable resource set @@ -33,21 +35,24 @@ traits: application/json: schema: Resources example: | - [{ - "rt": "oic.wk.res", + [ + { + "rt": ["oic.wk.res"], "di": "0685B960-736F-46F7-BEC0-9E6CBD61ADC1", "links": [ { "href": "/res", "rel": "self", - "rt": "oic.r.collection", - "if": "oic.if.ll" }, + "rt": ["oic.r.collection"], + "if": ["oic.if.ll"] + }, { "href": "/smartDevice", "rel": "contained", - "rt": "oic.d.smartDevice", - "if": "oic.if.a" + "rt": ["oic.d.smartDevice"], + "if": ["oic.if.a"] } ] - }] + } + ] diff --git a/oic.wk.rts.json b/oic.wk.rts.json deleted file mode 100755 index e0ee9de..0000000 --- a/oic.wk.rts.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.rts#", - "definitions": { - "oic.wk.rts": { - "type": "object", - "properties": { - "tl": { - "type": "string", - "description": "Readonly, list of resource type names", - "format": "bsv" - } - } - } - }, - "type": "object", - "allOf": [ - { "$ref": "#/definitions/oic.wk.rts" } - ], - "required": ["tl"] -} \ No newline at end of file diff --git a/oic.wk.rts.raml b/oic.wk.rts.raml index 5871f35..0af8b13 100755 --- a/oic.wk.rts.raml +++ b/oic.wk.rts.raml @@ -1,29 +1,30 @@ #%RAML 0.8 -title: OIC Resource Types -version: v1-20150811 +title: Resource Types +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - RTS: !include oic.wk.rts.json + - RTS: !include schemas/oic.wk.rts-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.r"] + enum: ["oic.if.r", "oic.if.baseline"] /oic/rts: - displayName: OIC Resource Types + displayName: Resource Types is: [ interface ] description: | - List of resource types that are supported by this OIC Server + List of resource types that are supported by this Server get: description: Retrieve the resource type list responses: @@ -33,6 +34,6 @@ traits: schema: RTS example: | { - "rt": "oic.wk.rts", - "tl": "oic.r.example oic.r.other-example" + "rt": ["oic.wk.rts"], + "tl": ["oic.r.example", "oic.r.other-example"] } diff --git a/rdpublish.raml b/rdpublish.raml index 7a2e892..8a7f346 100755 --- a/rdpublish.raml +++ b/rdpublish.raml @@ -1,51 +1,50 @@ #%RAML 0.8 -#RAML for OIC Resource Directory +#RAML for Resource Directory title: Resource Directory -version: 1.0-090215 +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -documentation: - - title: OIC Rsource Directory + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + + - title: Resource Directory content: | - A Resoure Directory is an OIC Device that helps other OIC Devices to be discovered. + A Resoure Directory is an Device that helps other Devices to be discovered. - title: Introduction content: | - For resource in other OIC Devices to be discovered using the Resource Directory, these other devices have to publish the resource links they would otherwise have advertised through /oic/res to the Resource Directory. Once the information has been published then the OIC Devices may stop responding to discovery queries and may also go to sleep. + For resource in other Devices to be discovered using the Resource Directory, these other devices have to publish the resource links they would otherwise have advertised through /oic/res to the Resource Directory. Once the information has been published then the Devices may stop responding to discovery queries and may also go to sleep. The Resource Directory will respond to all discovery queries with resources that it directly advertises and also the resource information that has been published to it. - title: Resource Directory discovery content: | - Before an OIC Device publishes its resource information, it must first discover available Resource Directories and then select one of those to publish the information to. + Before a Device publishes its resource information, it must first discover available Resource Directories and then select one of those to publish the information to. - This doscovery is done with a multicast query to /oic/rd. The information returned is either a bais factor or a list of attributes that help the discovering OIC Device to select one of the RDs. This RD will be used till the RD does not respond or another RD is selected. + This doscovery is done with a multicast query to /oic/rd. The information returned is either a bais factor or a list of attributes that help the discovering Device to select one of the RDs. This RD will be used till the RD does not respond or another RD is selected. - title: Resource Directory publish content: | - Once the RD has been discovery and selected, the OIC Device can publish its resoure information. The resource information are published to the /oic/rd resource using the "publish" interface. The information that needs to tbe available in /oic/res is then populated by the Resource Directory. + Once the RD has been discovery and selected, the Device can publish its resoure information. The resource information are published to the /oic/rd resource using the "publish" interface. The information that needs to tbe available in /oic/res is then populated by the Resource Directory. - Periodically based on the TTL set by the publishing OIC Device, the information that is published has to be refreshed with a new TTL or the TTL can be updated if there is no change in the information. It is the responsibility of the publishing OIC Device to ensure that the information or TTL is updated before the previous TTL expires; failing this the RD will garbage collect all the information related to the publishing OIC Device. + Periodically based on the TTL set by the publishing Device, the information that is published has to be refreshed with a new TTL or the TTL can be updated if there is no change in the information. It is the responsibility of the publishing Device to ensure that the information or TTL is updated before the previous TTL expires; failing this the RD will garbage collect all the information related to the publishing Device. - title: Resource discovery content: | - The discovery of resources is done in the same manner as for any OIC Server. A query to /oic/res either over multicast or uincast is required. + The discovery of resources is done in the same manner as for any Server. A query to /oic/res either over multicast or uincast is required. schemas: -- # Each schema represents an OIC Resource Type. The baseline interface operates on the entire representation - rdPublish: !include oic.rd.publish.json - rdSelection: !include oic.rd.selection.json - # rdDelLink: !include oic.rd.del-link.json +- rdPublish: !include schemas/oic.rd.publish-schema.json +- rdSelection: !include schemas/oic.rd.selection-schema.json + # rdDelLink: !include schemas/oic.rd.del-link-schema.json traits: - rddefinterface: queryParameters: if: description: | - Interface is optional since there is only one interface supported for the OIC Resource Type + Interface is optional since there is only one interface supported for the Resource Type Both for RD selectin and for publish type: string enum: [ "oic.if.baseline" ] @@ -57,14 +56,14 @@ traits: /oic/rd: displayName: Resource directory resource description: | - Resource to be exposed by any OIC Device that can act as a Resource Directory + Resource to be exposed by any Device that can act as a Resource Directory get: description: | Get the attributes of the Resource Directory for selection purposes. queryParameters: rt: description: | - Only one OIC Resource Type is used for GET; OIC RT is optional + Only one Resource Type is used for GET; RT is optional type: string enum: [ "oic.wk.rd" ] default: "oic.wk.rd" @@ -94,7 +93,7 @@ traits: queryParameters: rt: description: | - Only one OIC Resource Type is used for GET; OIC RT is optional + Only one Resource Type is used for GET; RT is optional type: string enum: [ "oic.wk.rdpub" ] default: "oic.wk.rdpub" diff --git a/rules.raml b/rules.raml index f7c43ec..cf04214 100755 --- a/rules.raml +++ b/rules.raml @@ -1,26 +1,27 @@ #%RAML 0.8 -title: OICRules -version: v1.0-20150810 +title: Rules +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Collection: !include oic.collection.json - Rule: !include oic.rule.json - RuleUpdate: !include oic.rule-Update.json - RuleMember: !include oic.ruleMember.json + - Collection: !include schemas/oic.collection-schema.json + - Rule: !include schemas/oic.rule-schema.json + - RuleUpdate: !include schemas/oic.rule-Update-schema.json + - RuleMember: !include schemas/oic.ruleMember-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.a", "oic.if.ll"] + enum: ["oic.if.a", "oic.if.ll", "oic.if.baseline"] /RuleListResURI: diff --git a/scene.raml b/scene.raml index 53a0c2a..f59aabd 100755 --- a/scene.raml +++ b/scene.raml @@ -1,26 +1,27 @@ #%RAML 0.8 -title: OICScene -version: v1.0-20150630 +title: Scene +version: v1-20160622 documentation: - - title: Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved. - content: | - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + - title: OCF Copyright + content: Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved. + - title: OCF License + content: !include LICENSE.md + - title: OCF Disclaimer + content: !include DISCLAIMER.md + schemas: - - Collection: !include oic.collection.json - SceneCollection: !include oic.sceneCollection.json - SceneCollectionUpdate: !include oic.sceneCollection-Update.json - SceneMember: !include oic.sceneMember.json + - Collection: !include schemas/oic.collection-schema.json + - SceneCollection: !include schemas/oic.sceneCollection-schema.json + - SceneCollectionUpdate: !include schemas/oic.sceneCollection-Update-schema.json + - SceneMember: !include schemas/oic.sceneMember-schema.json traits: - interface: queryParameters: if: - enum: ["oic.if.a", "oic.if.ll"] + enum: ["oic.if.a", "oic.if.ll", "oic.if.baseline"] /SceneListResURI: diff --git a/schemas/DISCLAIMER.md b/schemas/DISCLAIMER.md new file mode 100644 index 0000000..4e81410 --- /dev/null +++ b/schemas/DISCLAIMER.md @@ -0,0 +1 @@ +THIS SOFTWARE IS PROVIDED BY THE OPEN CONNECTIVITY FOUNDATION, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN CONNECTIVITY FOUNDATION, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/schemas/LICENSE.md b/schemas/LICENSE.md new file mode 100644 index 0000000..0e4811b --- /dev/null +++ b/schemas/LICENSE.md @@ -0,0 +1,3 @@ +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. diff --git a/oic.collection.json b/schemas/oic.collection-schema.json similarity index 93% rename from oic.collection.json rename to schemas/oic.collection-schema.json index 7685c88..c75a551 100755 --- a/oic.collection.json +++ b/schemas/oic.collection-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.collection.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.collection-schema.json#", "title": "Collection", "definitions": { "oic.collection.setoflinks": { @@ -14,7 +14,7 @@ "items": { "allOf": [ { - "$ref": "oic.oic-link.json#" + "$ref": "oic.oic-link-schema.json#" } ], "required": ["ins"] @@ -132,7 +132,7 @@ "type": "object", "allOf": [ { - "$ref": "oic.core.json#/definitions/oic.core" + "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.collection" diff --git a/schemas/oic.core-schema.json b/schemas/oic.core-schema.json new file mode 100755 index 0000000..29a5c33 --- /dev/null +++ b/schemas/oic.core-schema.json @@ -0,0 +1,49 @@ +{ + "id": "http://openconnectivityfoundation.org/core/schemas/oic.core-schema.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "title": "Core", + "definitions": { + "oic.core": { + "type": "object", + "properties": { + "rt": { + "type": "array", + "items" : [ + { + "type" : "string", + "maxLength": 64 + } + ], + "minItems" : 1, + "description": "ReadOnly, Resource Type" + }, + "if": { + "type": "array", + "items": [ + { + "type" : "string", + "enum" : ["oic.if.baseline", "oic.if.ll", "oic.if.b", "oic.if.lb", "oic.if.rw", "oic.if.r", "oic.if.a", "oic.if.s" ] + } + ], + "minItems": 1, + "description": "ReadOnly, The interface set supported by this resource" + }, + "n": { + "type": "string", + "maxLength": 64, + "description": "ReadOnly, Friendly name of the resource" + }, + "id": { + "type": "string", + "maxLength": 64, + "description": "ReadOnly, Instance ID of this specific resource" + } + } + } + }, + "type": "object", + "allOf": [ + { "$ref": "#/definitions/oic.core"} + ] +} diff --git a/schemas/oic.oic-link-schema.json b/schemas/oic.oic-link-schema.json new file mode 100755 index 0000000..55c6c4b --- /dev/null +++ b/schemas/oic.oic-link-schema.json @@ -0,0 +1,134 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.oic-link-schema.json#", + "definitions": { + "oic.oic-link": { + "type": "object", + "properties": { + "href": { + "type": "string", + "maxLength": 256, + "description": "This is the target URI – can be specified as a Relative Reference or fully-qualified URI. Relative Reference should be used along with the di parameter to make it unique.", + "format": "uri" + }, + "rel": { + "type": "string", + "default": "advertises", + "maxLength": 64, + "description": "The relation of the target URI referenced by the link to the context URI" + }, + "rt": { + "type": "array", + "items" : [ + { + "type" : "string", + "maxLength": 64 + } + ], + "minItems" : 1, + "description": "ReadOnly, Resource Type" + }, + "if": { + "type": "array", + "items": [ + { + "type" : "string", + "enum" : ["oic.if.baseline", "oic.if.ll", "oic.if.b", "oic.if.lb", "oic.if.rw", "oic.if.r", "oic.if.a", "oic.if.s" ] + } + ], + "minItems": 1, + "description": "ReadOnly, The interface set supported by this resource" + }, + "di": { + "type": "string", + "description": "The Device ID on which the Relative Reference in href is to be resolved on. Base URI should be used in preference where possible", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" + }, + "buri": { + "type": "string", + "description": "The base URI used to fully qualify a Relative Reference in the href parameter. Use the OCF Schema for URI", + "maxLength": 256, + "format": "uri" + }, + "p": { + "description": "ReadOnly, Specifies the framework policies on the Resource referenced by the target URI", + "type": "object", + "properties": { + "bm": { + "description": "ReadOnly, Specifies the framework policies on the Resource referenced by the target URI for e.g. observable and discoverable", + "type": "integer" + }, + "sec": { + "description": "ReadOnly, Specifies if security needs to be turned on when looking to interact with the Resource", + "type": "boolean" + }, + "port": { + "description": "ReadOnly, Secure port to be used for connection", + "type": "integer" + }, + "required" : ["bm"] + } + }, + "bp": { + "type": "object", + "properties": { + "q": { + "type": "string", + "maxLength": 64, + "description": "This defines the query string to be used when batch request is forwarded through this Link" + } + } + }, + "title": { + "type": "string", + "maxLength": 64, + "description": "A title for the link relation. Can be used by the UI to provide a context" + }, + "anchor": { + "type": "string", + "maxLength": 256, + "description": "This is used to override the context URI e.g. override the URI of the containing collection", + "format": "uri" + }, + "ins": { + "oneOf": [ + { + "type": "integer", + "description": "An ordinal number that is not repeated - must be unique in the collection context" + }, + { + "type": "string", + "maxLength": 256, + "format" : "uri", + "description": "Any unique string including a URI" + }, + { + "type": "string", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "description": "Use UUID for universal uniqueness - used in /oic/res to identify the device" + } + ], + "description": "The instance identifier for this web link in an array of web links - used in collections" + }, + "type": { + "type": "array", + "description": "A hint at the representation of the resource referenced by the target URI. This represents the media types that are used for both accepting and emitting", + "items" : [ + { + "type": "string", + "maxLength": 64 + } + ], + "minItems": 1, + "default": "application/cbor" + } + }, + "required": [ "href", "rt", "if" ] + } + }, + "type": "object", + "allOf": [ + { "$ref": "#/definitions/oic.oic-link" } + ] +} diff --git a/oic.rd.publish.json b/schemas/oic.rd.publish-schema.json similarity index 72% rename from oic.rd.publish.json rename to schemas/oic.rd.publish-schema.json index c94a6bb..2e1ad10 100755 --- a/oic.rd.publish.json +++ b/schemas/oic.rd.publish-schema.json @@ -1,14 +1,14 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.rd.publish.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.rd.publish-schema.json#", "title": "RD Publish & Update", "definitions": { "oic.rd.publish": { "description": "Publishes resources as OIC Links into the resource directory", "properties": { "linkSet": { - "$ref": "oic.collection.json#/definitions/oic.collection.setof-tagged-setoflinks" + "$ref": "oic.collection-schema.json#/definitions/oic.collection.setof-tagged-setoflinks" }, "ttl": { "type": "integer", diff --git a/oic.rd.selection.json b/schemas/oic.rd.selection-schema.json similarity index 93% rename from oic.rd.selection.json rename to schemas/oic.rd.selection-schema.json index b52054c..afd3b47 100755 --- a/oic.rd.selection.json +++ b/schemas/oic.rd.selection-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.rd.selection.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.rd.selection-schema.json#", "title" : "RD Selection", "definitions": { "oic.rd.attributes": { diff --git a/oic.rule-Update.json b/schemas/oic.rule-Update-schema.json similarity index 82% rename from oic.rule-Update.json rename to schemas/oic.rule-Update-schema.json index 2b200da..b7d563d 100755 --- a/oic.rule-Update.json +++ b/schemas/oic.rule-Update-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.rule.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.rule-schema.json#", "title" : "Rule", "definitions": { "oic.rule": { @@ -38,7 +38,7 @@ "description": "Array of OIC web links that are the rule members, this is the script", "items" : { "allOf": [ - { "$ref": "http://openinterconnect.org/schemas/oic.oic-link.json#" }, + { "$ref": "oic.oic-link-schema.json#/definitions/oic.oic-link" }, { "required" : [ "ins" ] } ] } @@ -50,7 +50,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.rule" } ] } diff --git a/oic.rule.json b/schemas/oic.rule-schema.json similarity index 82% rename from oic.rule.json rename to schemas/oic.rule-schema.json index 4ed0911..cabbe03 100755 --- a/oic.rule.json +++ b/schemas/oic.rule-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.rule.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.rule-schema.json#", "title" : "Rule", "definitions": { "oic.rule": { @@ -38,7 +38,7 @@ "description": "Array of OIC web links that are the rule members, this is the script", "items" : { "allOf": [ - { "$ref": "http://openinterconnect.org/schemas/oic.oic-link.json#" }, + { "$ref": "oic.oic-link-schema.json#/definitions/oic.oic-link#" }, { "required" : [ "ins" ] } ] } @@ -50,7 +50,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.rule" } ] } diff --git a/oic.ruleMember.json b/schemas/oic.ruleMember-schema.json similarity index 81% rename from oic.ruleMember.json rename to schemas/oic.ruleMember-schema.json index 9f4895f..a419060 100755 --- a/oic.ruleMember.json +++ b/schemas/oic.ruleMember-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.ruleMember.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.ruleMember-schema.json#", "title" : "Rule Member", "definitions": { "oic.ruleMember": { @@ -31,7 +31,7 @@ "link": { "type": "string", "description": "web link that points at a resource", - "$ref": "oic.oic-link.json#" + "$ref": "oic.oic-link-schema.json#" } }, "required": [ "id", "link", "memberProperty", "memberValue" ], @@ -41,7 +41,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.ruleMember" } ] } diff --git a/oic.sceneCollection-Update.json b/schemas/oic.sceneCollection-Update-schema.json similarity index 77% rename from oic.sceneCollection-Update.json rename to schemas/oic.sceneCollection-Update-schema.json index f5ccfe8..969685c 100755 --- a/oic.sceneCollection-Update.json +++ b/schemas/oic.sceneCollection-Update-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.sceneCollection.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.sceneCollection-schema.json#", "title" : "Scene Collection", "definitions": { "oic.sceneCollection": { @@ -23,8 +23,8 @@ "format": "UTF8" }, "id": { - "type": "string", - "description" : "A unique string that could be a hash or similarly unique" + "type": "string", + "description" : "A unique string that could be a hash or similarly unique" }, "rts": { "type": "string", @@ -36,7 +36,7 @@ "description": "Array of OIC web links that are reference from this collection", "items" : { "allOf": [ - { "$ref": "http://openinterconnect.org/schemas/oic.oic-link.json#" }, + { "$ref": "oic.oic-link-schema.json#/definitions/oic.oic-link" }, { "required" : [ "ins" ] } ] } @@ -48,7 +48,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.sceneCollection" } ] } diff --git a/oic.sceneCollection.json b/schemas/oic.sceneCollection-schema.json similarity index 78% rename from oic.sceneCollection.json rename to schemas/oic.sceneCollection-schema.json index a56fc4c..c6d6fe8 100755 --- a/oic.sceneCollection.json +++ b/schemas/oic.sceneCollection-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.sceneCollection.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.sceneCollection-schema.json#", "title" : "Scene Collection", "definitions": { "oic.sceneCollection": { @@ -23,8 +23,8 @@ "format": "UTF8" }, "id": { - "type": "string", - "description" : "A unique string that could be a hash or similarly unique" + "type": "string", + "description" : "A unique string that could be a hash or similarly unique" }, "rts": { "type": "string", @@ -36,7 +36,7 @@ "description": "Array of OIC web links that are reference from this collection", "items" : { "allOf": [ - { "$ref": "http://openinterconnect.org/schemas/oic.oic-link.json#" }, + { "$ref": "oic.oic-link-schema.json#/definitions/oic.oic-link" }, { "required" : [ "ins" ] } ] } @@ -48,7 +48,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.sceneCollection" } ] } diff --git a/oic.sceneMember.json b/schemas/oic.sceneMember-schema.json similarity index 84% rename from oic.sceneMember.json rename to schemas/oic.sceneMember-schema.json index 1e4d26b..036b66e 100755 --- a/oic.sceneMember.json +++ b/schemas/oic.sceneMember-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.sceneMember.json#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.sceneMember-schema.json#", "title" : "Scene Member", "definitions": { "oic.sceneMember": { @@ -44,7 +44,7 @@ "link": { "type": "string", "description": "web link that points at an resource", - "$ref": "oic.oic-link.json#" + "$ref": "oic.oic-link-schema.json#" } }, "required": [ "link" ] @@ -53,7 +53,7 @@ "type": "object", "allOf" : [ - { "$ref": "oic.core.json#/definitions/oic.core" }, + { "$ref": "oic.core-schema.json#/definitions/oic.core" }, { "$ref": "#/definitions/oic.sceneMember" } ] } diff --git a/oic.wk.con.json b/schemas/oic.wk.con-schema.json similarity index 63% rename from oic.wk.con.json rename to schemas/oic.wk.con-schema.json index f499c13..7467e0b 100755 --- a/oic.wk.con.json +++ b/schemas/oic.wk.con-schema.json @@ -1,30 +1,33 @@ { - "id": "http://openinterconnect.org/oic.wk.con#", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.con-schema.json#", "$schema": "http://json-schema.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", "definitions": { "oic.wk.con": { "type": "object", "properties": { "n": { "type": "string", + "maxLength": 64, "description": "Human friendly name" }, "loc": { "type": "string", - "description": "Location information", - "format": "json" + "description": "Location information" }, "locn": { "type": "string", + "maxLength": 64, "description": "Human Friendly Name" }, "c": { "type": "string", + "maxLength": 64, "description": "Currency" }, "r": { "type": "string", + "maxLength": 64, "description": "Region" } } @@ -32,7 +35,7 @@ }, "type": "object", "allOf": [ - {"$ref": "oic.core.json#/definitions/oic.core"}, + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, { "$ref": "#/definitions/oic.wk.con" } ], "required": [ "n" ] diff --git a/oic.wk.d.json b/schemas/oic.wk.d-schema.json similarity index 56% rename from oic.wk.d.json rename to schemas/oic.wk.d-schema.json index 3450dbf..6214c64 100755 --- a/oic.wk.d.json +++ b/schemas/oic.wk.d-schema.json @@ -1,35 +1,39 @@ { "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.d#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.d-schema.json#", "definitions": { "oic.wk.d": { "type": "object", "properties": { "n": { "type": "string", + "maxLength": 64, "description": "Readonly, Human friendly name" }, "di": { "type": "string", - "description": "ReadOnly, Unique identifier for device (UUID)", - "format": "uuid" + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "format": "uuid", + "description": "ReadOnly, Unique identifier for device (UUID)" }, "icv": { "type": "string", + "maxLength": 64, "description": "ReadOnly, The version of the OIC Server" }, "dmv": { "type": "string", - "description": "ReadOnly, The spec version of the vertical specification", - "format": "csv" + "maxLength": 64, + "description": "ReadOnly, The spec version of the vertical and/or resource specification" } } } }, "type": "object", "allOf": [ + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, { "$ref": "#/definitions/oic.wk.d" } ], - "required": [ "n", "di", "icv" ] + "required": [ "n", "di", "icv", "dmv" ] } diff --git a/schemas/oic.wk.ifs-schema.json b/schemas/oic.wk.ifs-schema.json new file mode 100755 index 0000000..e35e85f --- /dev/null +++ b/schemas/oic.wk.ifs-schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schemas.org/draft-04/schema#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.ifs-schema.json#", + "definitions": { + "oic.wk.ifs": { + "type": "object", + "properties": { + "il": { + "type": "array", + "items" : [ + { + "type" : "string", + "enum" : ["oic.if.baseline", "oic.if.ll", "oic.if.b", "oic.if.lb", "oic.if.rw", "oic.if.r", "oic.if.a", "oic.if.s" ] + } + ], + "description": "Readonly, list of interface names" + } + } + } + }, + "type": "object", + "allOf": [ + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, + { "$ref": "#/definitions/oic.wk.ifs" } + ], + "required": ["il"] +} diff --git a/oic.wk.mnt.json b/schemas/oic.wk.mnt-schema.json similarity index 51% rename from oic.wk.mnt.json rename to schemas/oic.wk.mnt-schema.json index 445e6bc..d64b43d 100755 --- a/oic.wk.mnt.json +++ b/schemas/oic.wk.mnt-schema.json @@ -1,10 +1,16 @@ { "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.mnt#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.mnt-schema.json#", "definitions": { "oic.wk.mnt": { "type": "object", + "properties": { + "n": { + "type" : "string", + "maxLength" : 64, + "description": "Name" + }, "fr":{ "type": "boolean", "description": "Factory Reset" @@ -18,11 +24,12 @@ "description": "Start Stat Collection Action Toggle" } } + } }, "type": "object", "allOf": [ - {"$ref": "http://openinterconnect.org/oic.core.json#/definitions/oic.core"}, - {"$ref": "#/definitions/oic.wk.mnt" } + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, + { "$ref": "#/definitions/oic.wk.mnt" } ], - "required": ["fr", "rb", "ssc"] + "required": ["fr"] } diff --git a/oic.wk.mon.json b/schemas/oic.wk.mon-schema.json similarity index 65% rename from oic.wk.mon.json rename to schemas/oic.wk.mon-schema.json index 81ce5ac..6783e0a 100755 --- a/oic.wk.mon.json +++ b/schemas/oic.wk.mon-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.mon#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.mon-schema.json#", "definitions": { "oic.wk.mon": { "type": "object", @@ -15,16 +15,21 @@ "description": "ReadOnly, Indicates the elapsed time in seconds after the device was invoked or acted upon" }, "ds": { - "type": "string", - "description": "ReadOnly, Contains Device Statistics Info (no. of received packets, no. of sent packets, time to respond etc.)", - "format": "csv" + "type": "array", + "items" : [ + { + "type" : "string", + "maxLength": 64 + } + ], + "description": "ReadOnly, Contains Device Statistics Info (no. of received packets, no. of sent packets, time to respond etc.)" } } } }, "type": "object", "allOf": [ - {"$ref": "oic.core.json#/definitions/oic.core"}, + {"$ref": "oic.core-schema.json#/definitions/oic.core"}, {"$ref": "#/definitions/oic.wk.mon"} ], "required": ["av", "lat"] diff --git a/oic.wk.p.json b/schemas/oic.wk.p-schema.json similarity index 53% rename from oic.wk.p.json rename to schemas/oic.wk.p-schema.json index a471c99..decde5c 100755 --- a/oic.wk.p.json +++ b/schemas/oic.wk.p-schema.json @@ -1,66 +1,82 @@ { "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.p#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.p-schema.json#", "definitions": { "oic.wk.p": { "type": "object", "properties": { "pi": { "type": "string", - "description": "ReadOnly, Platform Identifier" + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "format": "uuid", + "description": "ReadOnly, Platform Identifier as a UUID" }, "mnmn": { "type": "string", "description": "ReadOnly, Manufacturer Name", - "maxLength": 16 + "maxLength": 64 }, "mnml": { "type": "string", "description": "ReadOnly, Manufacturer's URL", - "maxLength": 32, + "maxLength": 256, "format": "uri" }, "mnmo": { "type": "string", + "maxLength": 64, "description": "ReadOnly, Model number as designated by manufacturer" }, "mndt": { "type": "string", - "description": "ReadOnly, Manufacturing Date", + "description": "ReadOnly, Manufacturing Date as defined in ISO 8601, where the format is [yyyy]-[mm]-[dd].", + "pattern": "^([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])$", "format": "date-time" }, "mnpv": { "type": "string", + "maxLength": 64, "description": "ReadOnly, Platform Version" }, "mnos": { "type": "string", + "maxLength": 64, "description": "Readonly, Platform Resident OS Version" }, "mnhw": { "type": "string", + "maxLength": 64, "description": "Readonly, Platform Hardware Version" }, "mnfv": { "type": "string", + "maxLength": 64, "description": "ReadOnly, Manufacturer's firmware version" }, "mnsl": { "type": "string", "description": "ReadOnly, Manufacturer's Support Information URL", + "maxLength": 256, "format": "uri" }, "st": { "type": "string", - "description": "ReadOnly, Reference time for the device", + "description": "ReadOnly, Reference time for the device as defined in ISO 8601, where concatenation of 'date' and 'time' with the 'T' as a delimiter between 'date' and 'time'. The format is [yyyy]-[mm]-[dd]T[hh]:[mm]:[ss]Z.", + "pattern": "^([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])T(2[0-3]|1[0-9]|0[0-9]):([0-5][0-9]):([0-5][0-9])Z$", "format": "date-time" + }, + "vid": { + "type": "string", + "maxLength": 64, + "description": "ReadOnly, Manufacturer's defined string for the platform. The string is freeform and up to the manufacturer on what text to populate it" } } } }, "type": "object", "allOf": [ + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, { "$ref": "#/definitions/oic.wk.p" } ], "required": [ "pi", "mnmn" ] diff --git a/oic.wk.ping.json b/schemas/oic.wk.ping-schema.json similarity index 57% rename from oic.wk.ping.json rename to schemas/oic.wk.ping-schema.json index bf6f524..96f4b48 100755 --- a/oic.wk.ping.json +++ b/schemas/oic.wk.ping-schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schemas.org/draft-04/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/oic.wk.ping#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.ping-schema.json#", "definitions": { "oic.wk.ping": { "type": "object", @@ -15,12 +15,8 @@ }, "type": "object", "allOf": [ - { - "$ref": "oic.core.json#/definitions/oic.core" - }, - { - "$ref": "#/definitions/oic.wk.ping" - } + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, + { "$ref": "#/definitions/oic.wk.ping"} ], "required": [ "in" diff --git a/oic.wk.res.json b/schemas/oic.wk.res-schema.json similarity index 50% rename from oic.wk.res.json rename to schemas/oic.wk.res-schema.json index 89dea19..843d479 100755 --- a/oic.wk.res.json +++ b/schemas/oic.wk.res-schema.json @@ -1,37 +1,40 @@ { "$schema": "http://json-schema.org/draft-v4/schema#", - "description" : "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.", - "id": "http://openinterconnect.org/schemas/oic.wk.res.json/", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.res-schema.json#", "definitions": { "oic.res-links.json": { "type": "object", "properties": { "n": { "type": "string", + "maxLength": 64, "description": "ReadOnly, Human friendly name" }, "di": { - "description": "The device identifier as indicated by the /oic/d resource of the device", "type": "string", - "format": "UUID" + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "format": "uuid", + "description": "ReadOnly, Unique identifier for device (UUID) as indicated by the /oic/d resource of the device" }, "mpro": { "description": "ReadOnly, Supported messaging protocols", - "type": "string" + "type": "string", + "maxLength": 64 }, "links": { "type": "array", "items": { - "$ref": "oic.oic-link.json#" + "$ref": "oic.oic-link-schema.json#/definitions/oic.oic-link" } } - } + }, + "required": ["di", "links"] } }, "description": "The list of resources expressed as OIC links", "type": "array", "items": { "$ref": "#/definitions/oic.res-links.json" - }, - "required": ["di", "links"] + } } diff --git a/schemas/oic.wk.rts-schema.json b/schemas/oic.wk.rts-schema.json new file mode 100755 index 0000000..9edfeed --- /dev/null +++ b/schemas/oic.wk.rts-schema.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schemas.org/draft-04/schema#", + "description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.", + "id": "http://openconnectivityfoundation.org/core/schemas/oic.wk.rts-schema.json#", + "definitions": { + "oic.wk.rts": { + "type": "object", + "properties": { + "tl": { + "type": "array", + "items" : [ + { + "type" : "string", + "maxLength": 64 + } + ], + "description": "Readonly, list of resource type names" + } + } + } + }, + "type": "object", + "allOf": [ + { "$ref": "oic.core-schema.json#/definitions/oic.core"}, + { "$ref": "#/definitions/oic.wk.rts" } + ], + "required": ["tl"] +}