Fix invalid property values provided for tosca functions 94/132994/5
authorJvD_Ericsson <jeff.van.dam@est.tech>
Mon, 23 Jan 2023 16:45:27 +0000 (16:45 +0000)
committerMichael Morris <michael.morris@est.tech>
Fri, 27 Jan 2023 00:02:53 +0000 (00:02 +0000)
Issue-ID: SDC-4343
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: If4f192adcac87a461bc47c2accff53d8ce9a9f36

catalog-be/src/main/java/org/openecomp/sdc/be/datamodel/utils/PropertyValueConstraintValidationUtil.java

index 19fe69e..903c0dd 100644 (file)
@@ -145,8 +145,8 @@ public class PropertyValueConstraintValidationUtil {
                     errorMessages.add(ie.getMessage());
                 }
             }
-        } else if (isPropertyNotMappedAsInput(propertyDefinition) && ToscaType.isPrimitiveType(propertyDefinition.getType()) && !toscaType
-            .isValidValue(propertyDefinition.getValue())) {
+        } else if (isPropertyNotMappedAsInput(propertyDefinition) && ToscaType.isPrimitiveType(propertyDefinition.getType())
+                && !propertyDefinition.isToscaFunction() && !toscaType.isValidValue(propertyDefinition.getValue())) {
             errorMessages.add(String.format("Unsupported value provided for %s property supported value type is %s.",
                 getCompletePropertyName(propertyDefinition), toscaType.getType()));
         }