Fix property validation for data type in model
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / operations / impl / PropertyOperation.java
index bf8d6ae..931d599 100644 (file)
@@ -835,6 +835,13 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
         }
         return true;
     }
+    
+    public boolean isPropertyTypeValid(final IComplexDefaultValue property, final Map<String, DataTypeDefinition> dataTypes) {
+        if (property == null) {
+            return false;
+        }
+        return ToscaPropertyType.isValidType(property.getType()) != null || dataTypes.containsKey(property.getType());
+    }
 
     @Override
     public ImmutablePair<String, Boolean> isPropertyInnerTypeValid(IComplexDefaultValue property, Map<String, DataTypeDefinition> dataTypes) {