Java SDK and Eclipse plugin for simulator.
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / resource / Light / oic.r.light.raml
1 #%RAML 0.8
2 title: OICLight
3 version: v1.0-20150910
4 schemas:
5   - OICLight: !include oic.r.light.json
6     OICLightError: !include oic.r.light-error.json
7
8 traits:
9   - interface:
10       queryParameters:
11         if:
12           enum: ["oic.if.a"]
13
14 /oic/r/light:
15   description: |
16     Resource to be exposed by any OIC Device that can act as Light.
17   displayName: OIC Light
18   is: [ interface ] # valid for all methods
19
20   get:
21     responses:
22       200:
23         body:
24           application/json:
25             schema: OICLight
26             example: |
27               {
28                 "rt":     "oic.r.light",
29                 "id":     "light_id",
30                 "power":  "off"
31               }
32   post:
33     body:
34       application/json:
35         schema: OICLight
36         example: |
37           {
38             "id":    "light_id",
39             "power":  "off"
40           }
41     responses:
42       200:
43         body:
44           application/json:
45             schema: OICLight
46             example: |
47               {
48                 "id":    "light_id",
49                 "power":  "off"
50               }
51       403:
52         description: |
53           This response is generated by the OIC Server when the client sends:
54             An update with an out of range property value for intensity.
55           The server responds with the range property illustrating the error.
56         body:
57           application/json:
58             schema: OICLightError
59             example: |
60               {
61                 "id":     "light_id",
62                 "range":  "10,20"
63               }