aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-03-07 12:44:23 +0000
committerAndr� Schmid <andre.schmid@est.tech>2022-03-08 10:35:28 +0000
commita8dc9814f491649e59bcfa17039615cd71477db1 (patch)
treec71d43b2f6ec53b7c9b52a116fb0162f89ad8a29 /catalog-model/src
parentb96fc12cbd4d383df128de7504c9e167a122ab1b (diff)
Support property of type List<Map<String,String>>
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3898 Change-Id: Ifc9ea422e0eafcf84b5b7e47a9108f62925e2ea0
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/validators/ListValidator.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/validators/ListValidator.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/validators/ListValidator.java
index a069e25f91..20d927f483 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/validators/ListValidator.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/validators/ListValidator.java
@@ -69,6 +69,9 @@ public class ListValidator implements PropertyTypeValidator {
case JSON:
innerValidator = ToscaPropertyType.JSON.getValidator();
break;
+ case MAP:
+ innerValidator = ToscaPropertyType.MAP.getValidator();
+ break;
default:
log.debug("inner Tosca Type is unknown. {}", innerToscaType);
return false;
@@ -88,7 +91,7 @@ public class ListValidator implements PropertyTypeValidator {
for (int i = 0; i < size; i++) {
JsonElement currentValue = jo.get(i);
String element = JsonUtils.toString(currentValue);
- if (!innerValidator.isValid(element, null, allDataTypes)) {
+ if (!innerValidator.isValid(element, innerToscaType.equals(ToscaPropertyType.MAP)? ToscaPropertyType.STRING.getType(): null, allDataTypes)) {
log.debug("validation of element : {} failed", element);
return false;
}