diff options
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/configs-api')
-rw-r--r-- | ms/blueprintsprocessor/modules/inbounds/configs-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotController.kt | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotController.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotController.kt index d285fe52d..584df27ed 100644 --- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotController.kt @@ -48,7 +48,7 @@ import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/api/v1/configs") @Api( - value = "/api/v1/configs", + value = "Resource configuration", description = "Interaction with stored configurations." ) open class ResourceConfigSnapshotController(private val resourceConfigSnapshotService: ResourceConfigSnapshotService) { @@ -67,7 +67,6 @@ open class ResourceConfigSnapshotController(private val resourceConfigSnapshotSe } @RequestMapping( - path = [""], method = [RequestMethod.GET], produces = [MediaType.TEXT_PLAIN_VALUE, MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE] ) @@ -79,10 +78,10 @@ open class ResourceConfigSnapshotController(private val resourceConfigSnapshotSe @ResponseBody @PreAuthorize("hasRole('USER')") fun get( - @ApiParam(value = "Resource Type associated of the resource configuration snapshot.", required = false) + @ApiParam(value = "Resource Type associated of the resource configuration snapshot.", required = false, example = "\"PNF\"") @RequestParam(value = "resourceType", required = true) resourceType: String, - @ApiParam(value = "Resource Id associated of the resource configuration snapshot.", required = false) + @ApiParam(value = "Resource Id associated of the resource configuration snapshot.", required = false, example = "\"1\"") @RequestParam(value = "resourceId", required = true) resourceId: String, @ApiParam(value = "Status of the snapshot being retrieved.", defaultValue = "RUNNING", required = false) @@ -142,18 +141,18 @@ open class ResourceConfigSnapshotController(private val resourceConfigSnapshotSe value = "Store a resource configuration snapshot identified by resourceId, resourceType, status.", notes = "Store a resource configuration snapshot, identified by its resourceId and resourceType, " + "and optionally its status, either RUNNING or CANDIDATE.", - response = ResourceConfigSnapshot::class, produces = MediaType.APPLICATION_JSON_VALUE + response = ResourceConfigSnapshot::class ) @ResponseBody @PreAuthorize("hasRole('USER')") fun postWithResourceIdAndResourceType( - @ApiParam(value = "Resource Type associated with the resolution.", required = false) + @ApiParam(value = "Resource Type associated with the resolution.", required = false, example = "\"PNF\"") @PathVariable(value = "resourceType", required = true) resourceType: String, - @ApiParam(value = "Resource Id associated with the resolution.", required = false) + @ApiParam(value = "Resource Id associated with the resolution.", required = false, example = "\"1\"") @PathVariable(value = "resourceId", required = true) resourceId: String, @ApiParam(value = "Status of the snapshot being retrieved.", defaultValue = "RUNNING", required = true) @PathVariable(value = "status", required = true) status: String, - @ApiParam(value = "Config snapshot to store.", required = true) + @ApiParam(value = "Config snapshot to store.", required = true, example = "\"config_snapshot\"") @RequestBody snapshot: String ): ResponseEntity<ResourceConfigSnapshot> = runBlocking { @@ -178,7 +177,7 @@ open class ResourceConfigSnapshotController(private val resourceConfigSnapshotSe @ResponseBody @PreAuthorize("hasRole('USER')") fun getAllByID( - @ApiParam(value = "Resource Id associated of the resource configuration snapshots.", required = false) + @ApiParam(value = "Resource Id associated of the resource configuration snapshots.", required = false, example = "\"1\"") @RequestParam(value = "resourceId", required = true) resourceId: String, @ApiParam(value = "Status of the snapshot being retrieved.", defaultValue = "ANY", required = false) @RequestParam(value = "status", required = false, defaultValue = "ANY") status: String @@ -223,7 +222,7 @@ open class ResourceConfigSnapshotController(private val resourceConfigSnapshotSe @ResponseBody @PreAuthorize("hasRole('USER')") fun getAllByType( - @ApiParam(value = "Resource Type associated of the resource configuration snapshot.", required = false) + @ApiParam(value = "Resource Type associated of the resource configuration snapshot.", required = false, example = "\"PNF\"") @RequestParam(value = "resourceType", required = true) resourceType: String, @ApiParam(value = "Status of the snapshot being retrieved.", defaultValue = "ANY", required = false) @RequestParam(value = "status", required = false, defaultValue = "ANY") status: String |