Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Approved: Bugzilla-1556-CleanupForSwagger
- Loading branch information
1 parent
872162e
commit 8481921
Showing
6 changed files
with
297 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,80 @@ | ||
#%RAML 0.8 | ||
title: OICSelectableLevels | ||
version: v1.1.0-20160519 | ||
documentation: | ||
- title: © 2016 Open Connectivity Foundation, 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 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. | ||
schemas: | ||
- SelectableLevels: !include oic.r.selectablelevels.json | ||
- UpdateSchema: !include oic.r.selectablelevels-Update.json | ||
|
||
traits: | ||
- interface: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.a","oic.if.baseline"] | ||
|
||
/SelectableLevelsResURI: | ||
description: | | ||
This Resource provides a set of device defined 'levels' that can be selected for an operation. | ||
For example where a humidifier has a discrete set that model different humidity levels that can be set. | ||
availablelevels is an array of the levels that can be selected, these can be a number or an integer. | ||
targetlevel is the level that has currently been selected and is written to in order to select a new level. | ||
When retrieved the targetlevel provides the actual value that has been selected. | ||
displayName: Selectable Levels | ||
is: [ interface ] # valid for all methods | ||
|
||
get: | ||
description: | | ||
Retrieves the current selectable levels. | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: SelectableLevels | ||
example: | | ||
{ | ||
"rt": ["oic.r.selectablelevels"], | ||
"id": "unique_example_id", | ||
"availablelevels":[0,2,4,6,8], | ||
"targetlevel": 2 | ||
} | ||
post: | ||
description: | ||
Sets the current level from the set that is selectable | ||
body: | ||
application/json: | ||
schema: UpdateSchema | ||
example: | | ||
{ | ||
"targetlevel": 4 | ||
} | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: UpdateSchema | ||
example: | | ||
{ | ||
"targetlevel": 4 | ||
} | ||
403: | ||
description: | ||
Generated by a Server when an attempt is made to update to a targetlevel that is not in the set of availablelevels | ||
#%RAML 0.8 | ||
title: OICSelectableLevels | ||
version: v1.1.0-20160519 | ||
documentation: | ||
- title: © 2016 Open Connectivity Foundation, 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 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. | ||
schemas: | ||
- SelectableLevels: !include oic.r.selectablelevels.json | ||
- UpdateSchema: !include oic.r.selectablelevels-Update.json | ||
|
||
traits: | ||
- interface: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.a","oic.if.baseline"] | ||
|
||
/SelectableLevelsResURI: | ||
description: | | ||
This Resource provides a set of device defined 'levels' that can be selected for an operation. | ||
For example where a humidifier has a discrete set that model different humidity levels that can be set. | ||
availablelevels is an array of the levels that can be selected, these can be a number or an integer. | ||
targetlevel is the level that has currently been selected and is written to in order to select a new level. | ||
When retrieved the targetlevel provides the actual value that has been selected. | ||
displayName: Selectable Levels | ||
is: [ interface ] # valid for all methods | ||
|
||
get: | ||
description: | | ||
Retrieves the current selectable levels. | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: SelectableLevels | ||
example: | | ||
{ | ||
"rt": ["oic.r.selectablelevels"], | ||
"id": "unique_example_id", | ||
"availablelevels":[0,2,4,6,8], | ||
"targetlevel": 2 | ||
} | ||
post: | ||
description: | ||
Sets the current level from the set that is selectable | ||
body: | ||
application/json: | ||
schema: UpdateSchema | ||
example: | | ||
{ | ||
"targetlevel": 4 | ||
} | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: UpdateSchema | ||
example: | | ||
{ | ||
"targetlevel": 4 | ||
} | ||
403: | ||
description: | ||
Generated by a Server when an attempt is made to update to a targetlevel that is not in the set of availablelevels | ||
body: | ||
application/json: | ||
schema: SelectableLevels | ||
example: | | ||
{ | ||
"id": "unique_example_id", | ||
"availablelevels":[0,2,4,6,8], | ||
"targetlevel": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,70 @@ | ||
#%RAML 0.8 | ||
title: OICBaseResourceSchema | ||
version: v1.1.0-20160519 | ||
documentation: | ||
- title: © 2016 Open Connectivity Foundation, 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 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. | ||
schemas: | ||
- baseCore: !include oic.basecorecomposite.json | ||
- base: !include oic.baseResource.json | ||
|
||
|
||
traits: | ||
- interface-a: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.a"] | ||
- interface-baseline: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.baseline"] | ||
|
||
/BaseResourceSchemaResURI: | ||
description: | | ||
This is the base resource schema on which all other resources defined in this specification build. | ||
value is the sensed or actuated value of the Resource. | ||
precision is the accuracy granularity of the value. | ||
range is the range over which value is valid. | ||
step is the step function over the defined range if applicable (e.g. always step by '2'). | ||
displayName: Base Resource Schema | ||
|
||
get: | ||
is: [ interface-baseline ] | ||
description: retrieves the state of the resource. | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: baseCore | ||
example: | | ||
{ | ||
"rt" : ["oic.baseresource"], | ||
"if": ["oic.if.baseline"], | ||
"id": "unique_example_id", | ||
"value": 10.5, | ||
"precision": 0.5, | ||
"range": [0.0,100.0] | ||
} | ||
post: | ||
is: [ interface-a ] | ||
description: sets the read-write resource properties | ||
body: | ||
application/json: | ||
schema: base | ||
example: | | ||
{ | ||
"value": 20.5 | ||
} | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: base | ||
example: | | ||
{ | ||
"value": 20.5 | ||
} | ||
#%RAML 0.8 | ||
title: OICBaseResourceSchema | ||
version: v1.1.0-20160519 | ||
documentation: | ||
- title: © 2016 Open Connectivity Foundation, 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 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. | ||
schemas: | ||
- base: !include oic.baseResource.json | ||
|
||
traits: | ||
- interface-a: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.a"] | ||
- interface-baseline: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.baseline"] | ||
|
||
/BaseResourceSchemaResURI: | ||
description: | | ||
This is the base resource schema on which all other resources defined in this specification build. | ||
value is the sensed or actuated value of the Resource. | ||
precision is the accuracy granularity of the value. | ||
range is the range over which value is valid. | ||
step is the step function over the defined range if applicable (e.g. always step by '2'). | ||
displayName: Base Resource Schema | ||
|
||
get: | ||
is: [ interface-baseline ] | ||
description: retrieves the state of the resource. | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: base | ||
example: | | ||
{ | ||
"rt" : ["oic.baseresource"], | ||
"if": ["oic.if.baseline"], | ||
"id": "unique_example_id", | ||
"value": 10.5, | ||
"precision": 0.5, | ||
"range": [0.0,100.0] | ||
} | ||
post: | ||
is: [ interface-a ] | ||
description: sets the read-write resource properties | ||
body: | ||
application/json: | ||
schema: base | ||
example: | | ||
{ | ||
"value": 20.5 | ||
} | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: base | ||
example: | | ||
{ | ||
"value": 20.5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.