Fix adding null schema to non list properties 19/136319/2
authorMichaelMorris <michael.morris@est.tech>
Wed, 25 Oct 2023 14:49:29 +0000 (15:49 +0100)
committerJEFF VAN DAM <jeff.van.dam@est.tech>
Wed, 25 Oct 2023 16:27:13 +0000 (16:27 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4668
Change-Id: I815ff21b8394b858627f7798d7fdcd5326b6eb6b

catalog-be/src/main/java/org/openecomp/sdc/be/tosca/CommonCsarGenerator.java

index d5c64db..0e3328f 100644 (file)
@@ -748,7 +748,7 @@ public class CommonCsarGenerator {
 
     private Object getValue(final String key, Map<String, Object> value) {
         final String mappedKey = mapKey(key);
-        if (mappedKey.equals("schemaType")) {
+        if (mappedKey.equals("schemaType") && value.get(mappedKey) != null) {
             return Collections.singletonMap("type", value.get(mappedKey));
         }
         return value.get(mappedKey);