diff options
Diffstat (limited to 'ms/controllerblueprints/modules/blueprint-core/src')
2 files changed, 45 insertions, 3 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt index d45571cdf..72c2c1df3 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt +++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt @@ -97,6 +97,10 @@ fun <T : Any> Map<String, *>.castValue(key: String, valueType: KClass<T>): T { } } +fun ArrayNode.asListOfString(): List<String> { + return JacksonUtils.getListFromJsonNode(this, String::class.java) +} + /** * Convert Json to map of json node, the root fields will be map keys */ diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json index cac8770af..0e1f84278 100644 --- a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json +++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/dictionary/dictionary_schema.json @@ -51,8 +51,46 @@ "default": { "type": "any" }, - "aai": { - "type": "any" + "primary-aai-data": { + "type": "object", + "properties": { + "verb": { + "type": "string", + "required": true + }, + "path": { + "type": "string", + "required": true + }, + "url-path": { + "type": "string", + "required": true + }, + "payload": { + "type": "string", + "required": false + }, + "input-key-mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "type": "string", + "required": true + }, + "output-key-mapping": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "base": { + "type": "string", + "required": true + } + } }, "primary-config-data": { "type": "object", @@ -177,7 +215,7 @@ } } }, - "aai": { + "primary-aai-data": { "type": "object", "properties": { "names": { |