Minor bug fixes.
authorG S Senthil Kumar <senthil.gs@samsung.com>
Fri, 4 Mar 2016 11:38:00 +0000 (17:08 +0530)
committerMadan Lanka <lanka.madan@samsung.com>
Sat, 5 Mar 2016 14:40:31 +0000 (14:40 +0000)
Added code to parse "oneOf" property from JSON file.
Edited UI hint comment shown during resource creation.

Change-Id: Ieec60675657e0b8ae8b2ed5d878f300b68ba7775
Signed-off-by: G S Senthil Kumar <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5431
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java
service/simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp

index 2ea42cf..60c90ac 100644 (file)
@@ -89,9 +89,9 @@ public class MainPage extends WizardPage {
             public void widgetSelected(SelectionEvent e) {
                 description
                         .setText("Create a simple resource by manually entering all the details given below.\n"
-                                + "\t1. Basic resource details: URI, Name, Resource Types, etc.\n"
-                                + "\t2. Options such as Observable, allowed request types, start/stop resource etc.\n"
-                                + "\t3. Adding attributes.");
+                                + "\t1. Basic resource details: URI, Name, Resource Type, and Interface types.\n"
+                                + "\t2. Options such as Observable and Discoverable.\n"
+                                + "\t3. Adding simple attributes.");
                 option = Option.SIMPLE;
                 getWizard().getContainer().updateButtons();
             }
@@ -104,8 +104,7 @@ public class MainPage extends WizardPage {
                         .setText("Create a simple resource from RAML configuration file.\n"
                                 + "\t1. Resource details, attributes, and other properties will be read from RAML.\n"
                                 + "\t2. Supports multi-instance creation.\n"
-                                + "\t3. For single instance creation, allows editing the URI and Name of the resource.\n"
-                                + "\t4. Allows to start or stop the resource(s).");
+                                + "\t3. For single instance creation, allows editing the URI and Name of the resource.");
                 option = Option.SIMPLE_FROM_RAML;
                 getWizard().getContainer().updateButtons();
             }
index 0207404..826e67d 100755 (executable)
@@ -584,6 +584,15 @@ namespace RAML
         {\r
             readAllOf(itemAllOf , param);\r
         }\r
+        else\r
+        {\r
+            cJSON *itemOneOf = cJSON_GetObjectItem(item, "oneOf");\r
+            if (itemOneOf)\r
+            {\r
+                readAllOf(itemOneOf , param);\r
+            }\r
+        }\r
+\r
         cJSON *itemReference = cJSON_GetObjectItem(item, "$ref");\r
         if (itemReference)\r
         {\r