Fix parsing error for RestResourceSource 26/105726/1
authorJozsef Csongvai <jozsef.csongvai@bell.ca>
Wed, 8 Apr 2020 18:45:22 +0000 (14:45 -0400)
committerJozsef Csongvai <jozsef.csongvai@bell.ca>
Thu, 9 Apr 2020 19:46:25 +0000 (15:46 -0400)
Issue-ID: CCSDK-2310
Change-Id: I3587187b115797ce00ffd8c9125d9ee5035e25be
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceProperties.kt
ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt

index 636e81d..7a7edc9 100644 (file)
@@ -51,6 +51,8 @@ open class RestResourceSource : ResourceSourceProperties() {
     lateinit var verb: String
     @get:JsonProperty("payload")
     var payload: String? = null
+    @get:JsonProperty("resolved-payload")
+    var resolvedPayload: String? = null
     lateinit var type: String
     @get:JsonProperty("endpoint-selector")
     var endpointSelector: String? = null
index 8f933c1..7596d7d 100644 (file)
@@ -78,8 +78,7 @@ open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyS
                     checkNotNull(sourceProperties.inputKeyMapping) { "failed to get input-key-mappings for $dName under $dSource properties" }
                 val resolvedInputKeyMapping = resolveInputKeyMappingVariables(inputKeyMapping).toMutableMap()
 
-                sourceProperties.inputKeyMapping
-                        ?.mapValues { raRuntimeService.getDictionaryStore(it.value) }
+                inputKeyMapping?.mapValues { raRuntimeService.getDictionaryStore(it.value) }
                         ?.map { KeyIdentifier(it.key, it.value) }
                         ?.let { resourceAssignment.keyIdentifiers.addAll(it) }