From 108011551bb81e3465d1bd6087a81110967df9e0 Mon Sep 17 00:00:00 2001 From: Piotr Stanior Date: Wed, 9 Dec 2020 09:36:03 +0100 Subject: CDS add Swagger annotations for Resource, Template, Dictionary and Config API Issue-ID: CCSDK-3014 Change-Id: I380c38cde52a748a9b797c573b7651a766e8b496 Signed-off-by: Piotr Stanior --- .../cds/controllerblueprints/resource/dict/ResourceDefinition.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ms/blueprintsprocessor/modules/blueprints') diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt index 556f4a3da..2e7e18258 100644 --- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt +++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinition.kt @@ -20,29 +20,37 @@ package org.onap.ccsdk.cds.controllerblueprints.resource.dict import com.fasterxml.jackson.annotation.JsonFormat import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.databind.JsonNode +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition import java.io.Serializable import java.util.Date +@ApiModel open class ResourceDefinition { @JsonProperty(value = "name", required = true) + @ApiModelProperty(value = "Name", required = true, example = "\"default-source\"") lateinit var name: String @JsonProperty(value = "property", required = true) + @ApiModelProperty(value = "Property", required = true) lateinit var property: PropertyDefinition var tags: String? = null /** The default group for Resource Definition is "default" */ @JsonProperty(value = "group", required = true) + @ApiModelProperty(value = "Group", required = true, example = "\"default\"") var group: String = "default" @JsonProperty(value = "updated-by") + @ApiModelProperty(value = "Updated by", required = true, example = "\"example@onap.com\"") lateinit var updatedBy: String @JsonProperty(value = "sources", required = true) + @ApiModelProperty(value = "Sources", required = true, example = "\"sources\"") lateinit var sources: MutableMap } -- cgit 1.2.3-korg