IOT-2793 Add introspection for simpleserver 71/23871/5
authorGeorge Nash <george.nash@intel.com>
Fri, 27 Oct 2017 18:59:33 +0000 (11:59 -0700)
committerRick Bell <richard.s.bell@intel.com>
Sat, 6 Jan 2018 01:08:31 +0000 (01:08 +0000)
The light_introspection file was used in the
simpleserver instrospection. The light introspection
contained the oneiota defined interfaces for
BinarySwitch and Brighness. The problem is the
simpleserver does not contain those interfaces.

The simpleserver has a single resource core.light
with three properties name, power, and state.

Change-Id: Ib418b867afcf5d112481542bdd37d5689c1bf235
Signed-off-by: George Nash <george.nash@intel.com>
java/examples-java/simpleserver/SConscript
java/examples-java/simpleserver/src/main/assets/light_introspection.dat [deleted file]
java/examples-java/simpleserver/src/main/assets/light_introspection.json [deleted file]
java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.dat [new file with mode: 0644]
java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.json [new file with mode: 0644]
java/examples-java/simpleserver/src/main/java/org/iotivity/base/examples/SimpleServer.java
resource/examples/SConscript
resource/examples/simpleserver.cpp
resource/examples/simpleserver_introspection.dat [new file with mode: 0644]
resource/examples/simpleserver_introspection.json [new file with mode: 0644]

index 3f999b3..86b2524 100644 (file)
@@ -34,4 +34,4 @@ example_jar = jdk_env.Jar(target='simpleserver.jar',
 jdk_env.Install("../..", example_jar)
 if jdk_env.get('SECURED') == '1':
     jdk_env.Install(target="../..", source=['src/main/assets/oic_svr_db_server.dat'])
-    jdk_env.Install(target="../..", source=['src/main/assets/light_introspection.dat'])
+    jdk_env.Install(target="../..", source=['src/main/assets/simpleserver_introspection.dat'])
diff --git a/java/examples-java/simpleserver/src/main/assets/light_introspection.dat b/java/examples-java/simpleserver/src/main/assets/light_introspection.dat
deleted file mode 100644 (file)
index 5bafcf8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-¿gswaggerc2.0dinfo¿etitleqmy_example_devicegversionqmy device versionÿgschemes\9fdhttpÿhconsumes\9fpapplication/jsonÿhproduces\9fpapplication/jsonÿepaths¿g/switch¿cget¿jparameters\9f¿dnamebifbinequerykdescription`denum\9fhoic.if.aooic.if.baselineÿdtypefstringÿÿiresponses¿c200¿kdescription`fschema¿d$refx\1a#/definitions/BinarySwitchÿÿÿÿdpost¿jparameters\9f¿dnamebifbinequerykdescription`denum\9fhoic.if.aooic.if.baselineÿdtypefstringÿ¿dnamedbodybindbodyhrequiredôfschema¿d$refx\1a#/definitions/BinarySwitchÿÿÿiresponses¿c200¿kdescription`fschema¿d$refx\1a#/definitions/BinarySwitchÿÿÿÿÿk/brightness¿cget¿jparameters\9f¿dnamebifbinequerykdescription`denum\9fhoic.if.aooic.if.baselineÿdtypefstringÿÿiresponses¿c200¿kdescription`fschema¿d$refx\18#/definitions/Brightnessÿÿÿÿdpost¿jparameters\9f¿dnamebifbinequerykdescription`denum\9fhoic.if.aooic.if.baselineÿdtypefstringÿ¿dnamedbodybindbodyhrequiredôfschema¿d$refx\18#/definitions/Brightnessÿÿÿiresponses¿c200¿kdescription`fschema¿d$refx\18#/definitions/Brightnessÿÿÿÿÿÿkdefinitions¿lBinarySwitch¿dtypefobjecthrequired\9fbidÿjproperties¿evalue¿dtypegbooleankdescriptiontStatus of the switchÿbrt¿dtypeearrayeitems\9f¿dtypefstringimaxLength\18@ÿÿhminItems\ 1kdescriptionmResource TypehreadOnlyõgdefault\9fsoic.r.switch.binaryÿÿbif¿dtypeearraykdescriptionx,The interface set supported by this resourcehreadOnlyõeitems¿dtypefstringdenum\9fooic.if.baselinehoic.if.aÿÿÿap¿dtypegintegerkdescriptionx-Bitmap indicating observable and discoverablehreadOnlyõÿan¿dtypefstringkdescriptionx\1dFriendly name of the resourcehreadOnlyõÿbid¿dtypefstringkdescriptionx%Instance ID of this specific resourcehreadOnlyõÿerange¿dtypeearraykdescriptionx&The valid range for the value PropertyhreadOnlyõhminItems\ 2hmaxItems\ 2eitems¿dtypefnumberÿÿÿÿjBrightness¿dtypefobjecthrequired\9fbidÿjproperties¿ibrighness¿dtypegintegerkdescriptionx*Current sensed or set value for Brightnessÿbrt¿dtypeearrayeitems\9f¿dtypefstringimaxLength\18@ÿÿhminItems\ 1kdescriptionmResource TypehreadOnlyõgdefault\9fvoic.r.light.brightnessÿÿbif¿dtypeearraykdescriptionx,The interface set supported by this resourcehreadOnlyõeitems¿dtypefstringdenum\9fooic.if.baselinehoic.if.aÿÿÿap¿dtypegintegerkdescriptionx-Bitmap indicating observable and discoverablehreadOnlyõÿan¿dtypefstringkdescriptionx\1dFriendly name of the resourcehreadOnlyõÿbid¿dtypefstringkdescriptionx%Instance ID of this specific resourcehreadOnlyõÿerange¿dtypeearraykdescriptionx&The valid range for the value PropertyhreadOnlyõhminItems\ 2hmaxItems\ 2eitems¿dtypefnumberÿÿÿÿÿÿ
\ No newline at end of file
diff --git a/java/examples-java/simpleserver/src/main/assets/light_introspection.json b/java/examples-java/simpleserver/src/main/assets/light_introspection.json
deleted file mode 100644 (file)
index baab37f..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-{\r
-    "swagger": "2.0",\r
-    "info": {\r
-      "title": "my_example_device",\r
-      "version": "my device version"\r
-    },\r
-\r
-\r
-    "schemes": [\r
-        "http"\r
-    ],\r
-    "consumes": [\r
-        "application/json"\r
-    ],\r
-    "produces": [\r
-        "application/json"\r
-    ],\r
-    "paths": {\r
-       "/switch": {\r
-\r
-          "get": {\r
-\r
-\r
-            "parameters": [\r
-               {\r
-                 "name": "if",\r
-                 "in": "query",\r
-                 "description": "",\r
-                 "enum": [ "oic.if.a","oic.if.baseline" ],\r
-\r
-                 "type": "string"\r
-                }\r
-            ],\r
-            "responses": {\r
-              "200" : {\r
-                  "description" : "",\r
-                  "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/BinarySwitch"\r
-                  }\r
-               }\r
-            }\r
-\r
-           },\r
-\r
-          "post": {\r
-\r
-\r
-            "parameters": [\r
-               {\r
-                 "name": "if",\r
-                 "in": "query",\r
-                 "description": "",\r
-                 "enum": [ "oic.if.a","oic.if.baseline" ],\r
-\r
-                 "type": "string"\r
-                }\r
-                 ,{\r
-                  "name": "body",\r
-                  "in": "body",\r
-                  "required": false,\r
-                   "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/BinarySwitch"\r
-                  }\r
-\r
-                }\r
-            ],\r
-            "responses": {\r
-              "200" : {\r
-                  "description" : "",\r
-                   "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/BinarySwitch"\r
-                  }\r
-\r
-               }\r
-            }\r
-          }\r
-        },\r
-       "/brightness": {\r
-\r
-          "get": {\r
-\r
-\r
-            "parameters": [\r
-               {\r
-                 "name": "if",\r
-                 "in": "query",\r
-                 "description": "",\r
-                 "enum": [ "oic.if.a","oic.if.baseline" ],\r
-\r
-                 "type": "string"\r
-                }\r
-            ],\r
-            "responses": {\r
-              "200" : {\r
-                  "description" : "",\r
-                 "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/Brightness"\r
-                  }\r
-               }\r
-            }\r
-\r
-           },\r
-\r
-          "post": {\r
-\r
-\r
-            "parameters": [\r
-               {\r
-                 "name": "if",\r
-                 "in": "query",\r
-                 "description": "",\r
-                 "enum": [ "oic.if.a","oic.if.baseline" ],\r
-\r
-                 "type": "string"\r
-                }\r
-                 ,{\r
-                  "name": "body",\r
-                  "in": "body",\r
-                  "required": false,\r
-                 "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/Brightness"\r
-                  }\r
-                }\r
-            ],\r
-            "responses": {\r
-              "200" : {\r
-                  "description" : "",\r
-                 "schema" :\r
-                  {\r
-                    "$ref": "#/definitions/Brightness"\r
-                  }\r
-\r
-               }\r
-            }\r
-\r
-          }\r
-        }\r
-    },\r
-    "definitions":\r
-    {\r
-        "BinarySwitch": {\r
-           "type": "object",\r
-           "required": [\r
-             "id"\r
-           ],\r
-           "properties":  {\r
-               "value": {\r
-                  "type": "boolean",\r
-                  "description": "Status of the switch"\r
-                },\r
-                "rt": {\r
-                "type": "array",\r
-                "items" : [\r
-                  {\r
-                    "type" : "string",\r
-                    "maxLength": 64\r
-                  }\r
-                ],\r
-                "minItems" : 1,\r
-                "description": "Resource Type",\r
-                "readOnly" : true,\r
-                "default" : [ "oic.r.switch.binary" ]\r
-                },\r
-                "if": {\r
-                    "type": "array",\r
-                    "description": "The interface set supported by this resource",\r
-                    "readOnly" : true,\r
-                    "items": {\r
-                        "type": "string",\r
-                        "enum": [\r
-                            "oic.if.baseline",\r
-                            "oic.if.a"\r
-                        ]\r
-                    }\r
-                },\r
-                "p": {\r
-                    "type": "integer",\r
-                    "description": "Bitmap indicating observable and discoverable",\r
-                    "readOnly" : true\r
-                },\r
-                "n": {\r
-                    "type": "string",\r
-                    "description": "Friendly name of the resource",\r
-                    "readOnly" : true\r
-                },\r
-                "id": {\r
-                    "type": "string",\r
-                    "description": "Instance ID of this specific resource",\r
-                    "readOnly" : true\r
-                },\r
-                "range": {\r
-                    "type": "array",\r
-                    "description": "The valid range for the value Property",\r
-                    "readOnly" : true,\r
-                    "minItems": 2,\r
-                    "maxItems": 2,\r
-                    "items": {\r
-                        "type": "number"\r
-                    }\r
-                }\r
-            }\r
-        },\r
-        "Brightness": {\r
-           "type": "object",\r
-           "required": [\r
-             "id"\r
-           ],\r
-           "properties":  {\r
-               "brighness": {\r
-                  "type": "integer",\r
-                  "description": "Current sensed or set value for Brightness"\r
-                },\r
-                "rt": {\r
-                "type": "array",\r
-                "items" : [\r
-                  {\r
-                    "type" : "string",\r
-                    "maxLength": 64\r
-                  }\r
-                ],\r
-                "minItems" : 1,\r
-                "description": "Resource Type",\r
-                "readOnly" : true,\r
-                "default" : [ "oic.r.light.brightness" ]\r
-                },\r
-                "if": {\r
-                    "type": "array",\r
-                    "description": "The interface set supported by this resource",\r
-                    "readOnly" : true,\r
-                    "items": {\r
-                        "type": "string",\r
-                        "enum": [\r
-                            "oic.if.baseline",\r
-                            "oic.if.a"\r
-                        ]\r
-                    }\r
-                },\r
-                "p": {\r
-                    "type": "integer",\r
-                    "description": "Bitmap indicating observable and discoverable",\r
-                    "readOnly" : true\r
-                },\r
-                "n": {\r
-                    "type": "string",\r
-                    "description": "Friendly name of the resource",\r
-                    "readOnly" : true\r
-                },\r
-                "id": {\r
-                    "type": "string",\r
-                    "description": "Instance ID of this specific resource",\r
-                    "readOnly" : true\r
-                },\r
-                "range": {\r
-                    "type": "array",\r
-                    "description": "The valid range for the value Property",\r
-                    "readOnly" : true,\r
-                    "minItems": 2,\r
-                    "maxItems": 2,\r
-                    "items": {\r
-                        "type": "number"\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    }\r
-\r
-}\r
diff --git a/java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.dat b/java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.dat
new file mode 100644 (file)
index 0000000..4f4a650
Binary files /dev/null and b/java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.dat differ
diff --git a/java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.json b/java/examples-java/simpleserver/src/main/assets/simpleserver_introspection.json
new file mode 100644 (file)
index 0000000..7e29f8c
--- /dev/null
@@ -0,0 +1,298 @@
+{
+    "swagger":"2.0",
+    "info":{
+        "title":"SimpleSever sample",
+        "version":"1.0"
+    },
+    "schemes":[
+        "http"
+    ],
+    "consumes":[
+        "application/json"
+    ],
+    "produces":[
+        "application/json"
+    ],
+    "paths":{
+        "/a/light":{
+            "get":{
+                "parameters":[
+                    {
+                        "in":"query",
+                        "name":"if",
+                        "description":"",
+                        "type":"string",
+                        "enum":[
+                            "oic.if.a",
+                            "oic.if.baseline"
+                        ]
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                }
+            },
+            "post":{
+                "parameters":[
+                    {
+                        "in":"query",
+                        "name":"if",
+                        "description":"",
+                        "enum":[
+                            "oic.if.a",
+                            "oic.if.baseline"
+                        ],
+                        "type":"string"
+                    },
+                    {
+                        "name":"body",
+                        "in":"body",
+                        "required":false,
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                }
+            }
+        },
+        "/oic/p":{
+            "get":{
+                "description":"",
+                "parameters":[
+                    {
+                        "$ref":"#/parameters/interface"
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/Platform"
+                        }
+                    }
+                }
+            }
+        }
+    },
+    "definitions":{
+        "CoreLight":{
+            "type":"object",
+            "required":[
+                "id"
+            ],
+            "properties":{
+                "name":{
+                    "type":"string",
+                    "description":"Device Name",
+                    "maxLength":64
+                },
+                "power":{
+                    "type":"integer",
+                    "description":"Current sensed or set value for Brightness"
+                },
+                "state":{
+                    "type":"boolean",
+                    "description":"Status of the switch"
+                },
+                "rt":{
+                    "type":"array",
+                    "items":[
+                        {
+                            "type":"string",
+                            "maxLength":64
+                        }
+                    ],
+                    "minItems":1,
+                    "description":"Resource Type",
+                    "readOnly":true,
+                    "default":[
+                        "core.light"
+                    ]
+                },
+                "if":{
+                    "type":"array",
+                    "description":"The interface set supported by this resource",
+                    "readOnly":true,
+                    "items":{
+                        "type":"string",
+                        "enum":[
+                            "oic.if.baseline",
+                            "oic.if.a"
+                        ]
+                    }
+                },
+                "p":{
+                    "type":"integer",
+                    "description":"Bitmap indicating observable and discoverable",
+                    "readOnly":true
+                },
+                "n":{
+                    "type":"string",
+                    "description":"Friendly name of the resource",
+                    "readOnly":true
+                },
+                "id":{
+                    "type":"string",
+                    "description":"Instance ID of this specific resource",
+                    "readOnly":true
+                }
+            }
+        },
+        "Platform":{
+            "properties":{
+                "id":{
+                    "anyOf":[
+                        {
+                            "maxLength":64,
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "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}$",
+                            "type":"string"
+                        }
+                    ],
+                    "description":"",
+                    "readOnly":true
+                },
+                "if":{
+                    "description":"",
+                    "items":{
+                        "enum":[
+                            "oic.if.baseline",
+                            "oic.if.r"
+                        ],
+                        "type":"string"
+                    },
+                    "minItems":1,
+                    "readOnly":true,
+                    "type":"array"
+                },
+                "mndt":{
+                    "allOf":[
+                        {
+                            "description":"",
+                            "pattern":"^([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])$",
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "readOnly":true
+                        }
+                    ]
+                },
+                "mnfv":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnhw":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnml":{
+                    "description":"",
+                    "format":"uri",
+                    "maxLength":256,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnmn":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnmo":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnos":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnpv":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnsl":{
+                    "description":"",
+                    "format":"uri",
+                    "maxLength":256,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "pi":{
+                    "allOf":[
+                        {
+                            "description":"",
+                            "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}$",
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "readOnly":true
+                        }
+                    ]
+                },
+                "rt":{
+                    "default":[
+                        "oic.wk.p"
+                    ],
+                    "description":"",
+                    "items":{
+                        "maxLength":64,
+                        "type":"string"
+                    },
+                    "minItems":1,
+                    "readOnly":true,
+                    "type":"array"
+                },
+                "st":{
+                    "description":"",
+                    "format":"date-time",
+                    "readOnly":true,
+                    "type":"string"
+                }
+            },
+            "required":[
+                "pi",
+                "mnmn"
+            ],
+            "type":"object"
+        }
+    },
+    "parameters":{
+        "interface":{
+            "enum":[
+                "oic.if.baseline",
+                "oic.if.r"
+            ],
+            "in":"query",
+            "name":"if",
+            "type":"string"
+        }
+    }
+}
\ No newline at end of file
index b766ff1..e1db921 100644 (file)
@@ -64,7 +64,7 @@ public class SimpleServer {
                 0,         // Uses randomly available port
                 QualityOfService.LOW,
                 path + "/oic_svr_db_server.dat",
-                path + "/light_introspection.dat"
+                path + "/simpleserver_introspection.dat"
         );
 
         msg("Configuring platform.");
index 08d22e8..4c55fe8 100644 (file)
@@ -133,7 +133,6 @@ examples = list(map(make_single_file_cpp_program, example_names))
 ######################################################################
 # Other examples
 ######################################################################
-
 cbor = examples_env.ScanJSON()
 examples_env.Alias("install", cbor)
 examples += cbor
index f87cd7f..06e408d 100644 (file)
@@ -626,7 +626,7 @@ static FILE* client_open(const char* path, const char* mode)
     }
     else if (0 == strcmp(path, OC_INTROSPECTION_FILE_NAME))
     {
-        filename = "light_introspection.json";
+        filename = "simpleserver_introspection.dat";
     }
     return fopen(filename, mode);
 }
diff --git a/resource/examples/simpleserver_introspection.dat b/resource/examples/simpleserver_introspection.dat
new file mode 100644 (file)
index 0000000..4f4a650
Binary files /dev/null and b/resource/examples/simpleserver_introspection.dat differ
diff --git a/resource/examples/simpleserver_introspection.json b/resource/examples/simpleserver_introspection.json
new file mode 100644 (file)
index 0000000..7e29f8c
--- /dev/null
@@ -0,0 +1,298 @@
+{
+    "swagger":"2.0",
+    "info":{
+        "title":"SimpleSever sample",
+        "version":"1.0"
+    },
+    "schemes":[
+        "http"
+    ],
+    "consumes":[
+        "application/json"
+    ],
+    "produces":[
+        "application/json"
+    ],
+    "paths":{
+        "/a/light":{
+            "get":{
+                "parameters":[
+                    {
+                        "in":"query",
+                        "name":"if",
+                        "description":"",
+                        "type":"string",
+                        "enum":[
+                            "oic.if.a",
+                            "oic.if.baseline"
+                        ]
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                }
+            },
+            "post":{
+                "parameters":[
+                    {
+                        "in":"query",
+                        "name":"if",
+                        "description":"",
+                        "enum":[
+                            "oic.if.a",
+                            "oic.if.baseline"
+                        ],
+                        "type":"string"
+                    },
+                    {
+                        "name":"body",
+                        "in":"body",
+                        "required":false,
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/CoreLight"
+                        }
+                    }
+                }
+            }
+        },
+        "/oic/p":{
+            "get":{
+                "description":"",
+                "parameters":[
+                    {
+                        "$ref":"#/parameters/interface"
+                    }
+                ],
+                "responses":{
+                    "200":{
+                        "description":"",
+                        "schema":{
+                            "$ref":"#/definitions/Platform"
+                        }
+                    }
+                }
+            }
+        }
+    },
+    "definitions":{
+        "CoreLight":{
+            "type":"object",
+            "required":[
+                "id"
+            ],
+            "properties":{
+                "name":{
+                    "type":"string",
+                    "description":"Device Name",
+                    "maxLength":64
+                },
+                "power":{
+                    "type":"integer",
+                    "description":"Current sensed or set value for Brightness"
+                },
+                "state":{
+                    "type":"boolean",
+                    "description":"Status of the switch"
+                },
+                "rt":{
+                    "type":"array",
+                    "items":[
+                        {
+                            "type":"string",
+                            "maxLength":64
+                        }
+                    ],
+                    "minItems":1,
+                    "description":"Resource Type",
+                    "readOnly":true,
+                    "default":[
+                        "core.light"
+                    ]
+                },
+                "if":{
+                    "type":"array",
+                    "description":"The interface set supported by this resource",
+                    "readOnly":true,
+                    "items":{
+                        "type":"string",
+                        "enum":[
+                            "oic.if.baseline",
+                            "oic.if.a"
+                        ]
+                    }
+                },
+                "p":{
+                    "type":"integer",
+                    "description":"Bitmap indicating observable and discoverable",
+                    "readOnly":true
+                },
+                "n":{
+                    "type":"string",
+                    "description":"Friendly name of the resource",
+                    "readOnly":true
+                },
+                "id":{
+                    "type":"string",
+                    "description":"Instance ID of this specific resource",
+                    "readOnly":true
+                }
+            }
+        },
+        "Platform":{
+            "properties":{
+                "id":{
+                    "anyOf":[
+                        {
+                            "maxLength":64,
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "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}$",
+                            "type":"string"
+                        }
+                    ],
+                    "description":"",
+                    "readOnly":true
+                },
+                "if":{
+                    "description":"",
+                    "items":{
+                        "enum":[
+                            "oic.if.baseline",
+                            "oic.if.r"
+                        ],
+                        "type":"string"
+                    },
+                    "minItems":1,
+                    "readOnly":true,
+                    "type":"array"
+                },
+                "mndt":{
+                    "allOf":[
+                        {
+                            "description":"",
+                            "pattern":"^([0-9]{4})-(1[0-2]|0[1-9])-(3[0-1]|2[0-9]|1[0-9]|0[1-9])$",
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "readOnly":true
+                        }
+                    ]
+                },
+                "mnfv":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnhw":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnml":{
+                    "description":"",
+                    "format":"uri",
+                    "maxLength":256,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnmn":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnmo":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnos":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnpv":{
+                    "description":"",
+                    "maxLength":64,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "mnsl":{
+                    "description":"",
+                    "format":"uri",
+                    "maxLength":256,
+                    "readOnly":true,
+                    "type":"string"
+                },
+                "pi":{
+                    "allOf":[
+                        {
+                            "description":"",
+                            "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}$",
+                            "type":"string"
+                        },
+                        {
+                            "description":"",
+                            "readOnly":true
+                        }
+                    ]
+                },
+                "rt":{
+                    "default":[
+                        "oic.wk.p"
+                    ],
+                    "description":"",
+                    "items":{
+                        "maxLength":64,
+                        "type":"string"
+                    },
+                    "minItems":1,
+                    "readOnly":true,
+                    "type":"array"
+                },
+                "st":{
+                    "description":"",
+                    "format":"date-time",
+                    "readOnly":true,
+                    "type":"string"
+                }
+            },
+            "required":[
+                "pi",
+                "mnmn"
+            ],
+            "type":"object"
+        }
+    },
+    "parameters":{
+        "interface":{
+            "enum":[
+                "oic.if.baseline",
+                "oic.if.r"
+            ],
+            "in":"query",
+            "name":"if",
+            "type":"string"
+        }
+    }
+}
\ No newline at end of file