From 665a8ebbd523ba99688c38db312eeddafac63e5d Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh" Date: Fri, 8 Mar 2019 16:57:08 -0500 Subject: Add JSON type validation and enrichment Change-Id: I479b8214c7979dd5bc28acac68f747f06f3f231e Issue-ID: CCSDK-1134 Signed-off-by: Muthuramalingam, Brinda Santh --- .../service/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ms/controllerblueprints/modules/service/src') 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 1ae558fa..1675e8cd 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)") -- cgit 1.2.3-korg