From b700e6ff100b5b3397182915c85b7052f7a84d5f Mon Sep 17 00:00:00 2001 From: G S Senthil Kumar Date: Fri, 4 Mar 2016 17:08:00 +0530 Subject: [PATCH] Minor bug fixes. 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/5431 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- .../src/oic/simulator/serviceprovider/view/dialogs/MainPage.java | 9 ++++----- .../simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp | 9 +++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java index 2ea42cf..60c90ac 100644 --- a/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java +++ b/service/simulator/java/eclipse-plugin/ServiceProviderPlugin/src/oic/simulator/serviceprovider/view/dialogs/MainPage.java @@ -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(); } diff --git a/service/simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp b/service/simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp index 0207404..826e67d 100755 --- a/service/simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp +++ b/service/simulator/ramlparser/raml/jsonSchemaParser/JsonSchema.cpp @@ -584,6 +584,15 @@ namespace RAML { readAllOf(itemAllOf , param); } + else + { + cJSON *itemOneOf = cJSON_GetObjectItem(item, "oneOf"); + if (itemOneOf) + { + readAllOf(itemOneOf , param); + } + } + cJSON *itemReference = cJSON_GetObjectItem(item, "$ref"); if (itemReference) { -- 2.7.4