diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2018-02-01 04:46:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-02-01 04:46:02 +0000 |
commit | 3e8603790c2cf85f140f531cbbd0698547ba2ebc (patch) | |
tree | 58a33a791f6a93ba64d8a834dffb732ff0994438 /profiles/http/src/main | |
parent | 753ff2c8dec0f95169dd3f630961e3ee4f231c50 (diff) | |
parent | b2baffc887a7f0bd22345e334917c8768048fc39 (diff) |
Merge "Add validation for attributes missing in result"
Diffstat (limited to 'profiles/http/src/main')
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/schema/OnapCommandSchemaHttpLoader.java | 3 |
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); |