aboutsummaryrefslogtreecommitdiffstats
path: root/profiles/http/src
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2018-02-01 04:46:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-01 04:46:02 +0000
commit3e8603790c2cf85f140f531cbbd0698547ba2ebc (patch)
tree58a33a791f6a93ba64d8a834dffb732ff0994438 /profiles/http/src
parent753ff2c8dec0f95169dd3f630961e3ee4f231c50 (diff)
parentb2baffc887a7f0bd22345e334917c8768048fc39 (diff)
Merge "Add validation for attributes missing in result"
Diffstat (limited to 'profiles/http/src')
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java3
1 files changed, 3 insertions, 0 deletions
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 6dd15884..52ced397 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
@@ -332,6 +332,9 @@ public class OnapCommandSchemaHttpLoader {
List<String> invaliResultMapParams = resultMapParams.stream()
.filter(p -> !resultAttNames.contains(p)).collect(Collectors.toList());
+ List<String> attributesMissing = resultAttNames.stream()
+ .filter(p -> !resultMapParams.contains(p)).collect(Collectors.toList());
+ invaliResultMapParams.addAll(attributesMissing);
if (!invaliResultMapParams.isEmpty()) {
OnapCommandUtils.throwOrCollect(new OnapCommandHttpInvalidResultMap(invaliResultMapParams), errorList, true);