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/blueprintsprocessor/resource/api/ResourceController.kt | 8 +++----- .../cds/blueprintsprocessor/resource/api/TemplateController.kt | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'ms/blueprintsprocessor/modules/inbounds/resource-api') diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt index e7c11e306..3c18ba4f9 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt @@ -38,7 +38,7 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/api/v1/resources") @Api( - value = "/api/v1/resources", + value = "Resources", description = "Interaction with resolved resources." ) open class ResourceController(private var resourceResolutionDBService: ResourceResolutionDBService) { @@ -116,8 +116,7 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR ) @ApiOperation( value = "Delete resources using resolution key", - notes = "Delete all the resources associated to a resolution-key using blueprint metadata, artifact name and the resolution-key.", - produces = MediaType.APPLICATION_JSON_VALUE + notes = "Delete all the resources associated to a resolution-key using blueprint metadata, artifact name and the resolution-key." ) @PreAuthorize("hasRole('USER')") fun deleteByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKey( @@ -148,8 +147,7 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR ) @ApiOperation( value = "Fetch a resource value using resolution key.", - notes = "Retrieve a stored resource value using the blueprint metadata, artifact name, resolution-key along with the name of the resource value to retrieve.", - produces = MediaType.APPLICATION_JSON_VALUE + notes = "Retrieve a stored resource value using the blueprint metadata, artifact name, resolution-key along with the name of the resource value to retrieve." ) @ResponseBody @PreAuthorize("hasRole('USER')") diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt index b56a63b17..b80e81ca0 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt @@ -47,7 +47,7 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/api/v1/template") @Api( - value = "/api/v1/template", + value = "Resource template", description = "Interaction with resolved template." ) open class TemplateController(private val templateResolutionService: TemplateResolutionService) { @@ -146,8 +146,7 @@ open class TemplateController(private val templateResolutionService: TemplateRes value = "Store a resolved template w/ resolution-key", notes = "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, " + "artifact name and resolution key.", - response = TemplateResolution::class, - produces = MediaType.APPLICATION_JSON_VALUE + response = TemplateResolution::class ) @ResponseBody @PreAuthorize("hasRole('USER')") @@ -178,8 +177,7 @@ open class TemplateController(private val templateResolutionService: TemplateRes value = "Store a resolved template w/ resourceId and resourceType", notes = "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, " + "artifact name, resourceId and resourceType.", - response = TemplateResolution::class, - produces = MediaType.APPLICATION_JSON_VALUE + response = TemplateResolution::class ) @ResponseBody @PreAuthorize("hasRole('USER')") -- cgit 1.2.3-korg