diff options
author | 2018-01-31 18:02:48 +0530 | |
---|---|---|
committer | 2018-01-31 18:02:48 +0530 | |
commit | b2baffc887a7f0bd22345e334917c8768048fc39 (patch) | |
tree | 0551fb0254099c0204174875ae60323ea44055a4 | |
parent | d701b812258d0e84a5d5cce0296b004e364a1a3b (diff) |
Add validation for attributes missing in result
Issue-ID: CLI-61
Change-Id: I2229a6dde2be0b6fcac38aa7abaf4c518d15e55c
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-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); |