summaryrefslogtreecommitdiffstats
path: root/catalog-model
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model')
-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;
}