aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http/src/main/java/org')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java8
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java3
2 files changed, 8 insertions, 3 deletions
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
index 12309341..17d9c731 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/cmd/OnapHttpCommand.java
@@ -61,6 +61,10 @@ public class OnapHttpCommand extends OnapCommand {
private OnapCommandHttpService oclipService = new OnapCommandHttpService();
+ public OnapHttpCommand() {
+ super.addDefaultSchemas(OnapCommandHttpConstants.DEFAULT_PARAMETER_HTTP_FILE_NAME);
+ }
+
public void setInput(HttpInput input) {
this.input = input;
}
@@ -102,8 +106,8 @@ public class OnapHttpCommand extends OnapCommand {
}
@Override
- protected List<String> initializeProfileSchema(boolean validate) throws OnapCommandException {
- return OnapCommandSchemaHttpLoader.loadHttpSchema(this, this.getSchemaName(), true, validate);
+ protected List<String> initializeProfileSchema(Map<String, ?> schemaMap, boolean validate) throws OnapCommandException {
+ return OnapCommandSchemaHttpLoader.parseHttpSchema(this, schemaMap, validate);
}
@Override
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
index 08a70782..6dd15884 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java
@@ -87,7 +87,7 @@ public class OnapCommandSchemaHttpLoader {
* @throws OnapCommandException
* on error
*/
- static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
+ public static ArrayList<String> parseHttpSchema(OnapHttpCommand cmd,
final Map<String, ?> values,
boolean validate) throws OnapCommandException {
ArrayList<String> errorList = new ArrayList<>();
@@ -98,6 +98,7 @@ public class OnapCommandSchemaHttpLoader {
if (validate) {
OnapCommandUtils.validateTags(errorList, valMap, OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_SECTIONS),
OnapCommandConfig.getCommaSeparatedList(OnapCommandHttpConstants.HTTP_MANDATORY_SECTIONS), OnapCommandHttpConstants.HTTP);
+ errorList.addAll(validateHttpSchemaSection(values));
}
for (Map.Entry<String, ?> entry1 : valMap.entrySet()) {
String key1 = entry1.getKey();