aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/http/src')
-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
-rw-r--r--profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml5
3 files changed, 8 insertions, 8 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();
diff --git a/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
index 9029e273..69e82b3b 100644
--- a/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
+++ b/profiles/http/src/main/resources/open-cli-schema/http/default_input_parameters_http.yaml
@@ -1,10 +1,5 @@
open_cli_schema_version: 1.0
-info:
- product: open-cli
- service: default-param
- ignore: true
-
parameters:
- name: host-username
type: string