summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/main
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-08 16:57:08 -0500
committerBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>2019-03-11 13:44:18 +0000
commit3385c38348f3423224ecebbc128f9b6dfb9cf334 (patch)
treea39aeb01b837bf526bd60cfe3d6fc50f24a2362f /ms/controllerblueprints/modules/service/src/main
parentd266712c2ef530b66eee6d40d4acaf3e652a8eee (diff)
Add JSON type validation and enrichment
Change-Id: I479b8214c7979dd5bc28acac68f747f06f3f231e Issue-ID: CCSDK-1134 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/main')
-rw-r--r--ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
index 1ae558faa..1675e8cd2 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
@@ -1,5 +1,6 @@
/*
* Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 IBM.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,8 +44,9 @@ open class BluePrintPropertyDefinitionEnhancerImpl(private val bluePrintRepoServ
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val propertyType = propertyDefinition.type
- if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
-
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)
+ || BluePrintTypes.validComplexTypes().contains(propertyType)) {
+ // Do Nothing,
} else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchema = propertyDefinition.entrySchema
?: throw BluePrintException("Entry Schema is missing for collection property($name)")