summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/resource-api/src
diff options
context:
space:
mode:
authorPiotr Stanior <piotr.stanior@t-mobile.pl>2020-12-15 10:13:34 +0100
committerKAPIL SINGAL <ks220y@att.com>2020-12-15 20:13:07 +0000
commitf38e495d47e69b5203940e1f3eb76145c2a30e83 (patch)
tree030da0e7ffebadc524bd2a7c18fde4af794176bf /ms/blueprintsprocessor/modules/inbounds/resource-api/src
parenta0c98da2730a1e7883ff29f461db27506189a843 (diff)
CDS add Postman collection for Resource, Template, Dictionary and Config API
Issue-ID: CCSDK-3014 Change-Id: Ic9892c035067064fd612f2781507a36072e4e712 Signed-off-by: Piotr Stanior <piotr.stanior@t-mobile.pl>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/resource-api/src')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceController.kt38
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateController.kt42
2 files changed, 39 insertions, 41 deletions
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 3c18ba4f9..15c27a43b 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
@@ -39,7 +39,7 @@ import org.springframework.web.bind.annotation.RestController
@RequestMapping("/api/v1/resources")
@Api(
value = "Resources",
- description = "Interaction with resolved resources."
+ description = "Interaction with resolved resources"
)
open class ResourceController(private var resourceResolutionDBService: ResourceResolutionDBService) {
@@ -55,11 +55,10 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR
}
@RequestMapping(
- path = [""],
method = [RequestMethod.GET], produces = [MediaType.APPLICATION_JSON_VALUE]
)
@ApiOperation(
- value = "Get all resolved resources using the resolution key. ",
+ value = "Get all resolved resources using the resolution key",
notes = "Retrieve all stored resolved resources using the blueprint name, blueprint version, " +
"artifact name and the resolution-key.",
response = ResourceResolution::class,
@@ -69,17 +68,17 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR
@ResponseBody
@PreAuthorize("hasRole('USER')")
fun getAllFromResolutionKeyOrFromResourceTypeAndId(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@RequestParam(value = "bpName", required = true) bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@RequestParam(value = "bpVersion", required = true) bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@RequestParam(value = "artifactName", required = false, defaultValue = "") artifactName: String,
- @ApiParam(value = "Resolution Key associated with the resolution.", required = false)
+ @ApiParam(value = "Resolution Key associated with the resolution", required = false)
@RequestParam(value = "resolutionKey", required = false, defaultValue = "") resolutionKey: String,
- @ApiParam(value = "Resource Type associated with the resolution.", required = false)
+ @ApiParam(value = "Resource Type associated with the resolution", required = false)
@RequestParam(value = "resourceType", required = false, defaultValue = "") resourceType: String,
- @ApiParam(value = "Resource Id associated with the resolution.", required = false)
+ @ApiParam(value = "Resource Id associated with the resolution", required = false)
@RequestParam(value = "resourceId", required = false, defaultValue = "") resourceId: String
):
ResponseEntity<List<ResourceResolution>> = runBlocking {
@@ -111,7 +110,6 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR
}
@RequestMapping(
- path = [""],
method = [RequestMethod.DELETE], produces = [MediaType.APPLICATION_JSON_VALUE]
)
@ApiOperation(
@@ -120,13 +118,13 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR
)
@PreAuthorize("hasRole('USER')")
fun deleteByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKey(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@RequestParam(value = "bpName", required = true) bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@RequestParam(value = "bpVersion", required = true) bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@RequestParam(value = "artifactName", required = false, defaultValue = "") artifactName: String,
- @ApiParam(value = "Resolution Key associated with the resolution.", required = true)
+ @ApiParam(value = "Resolution Key associated with the resolution", required = true)
@RequestParam(value = "resolutionKey", required = true) resolutionKey: String
) = runBlocking {
ResponseEntity.ok()
@@ -146,21 +144,21 @@ open class ResourceController(private var resourceResolutionDBService: ResourceR
produces = [MediaType.APPLICATION_JSON_VALUE]
)
@ApiOperation(
- value = "Fetch a resource value using resolution key.",
+ 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."
)
@ResponseBody
@PreAuthorize("hasRole('USER')")
fun getOneFromResolutionKey(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@RequestParam(value = "bpName", required = true) bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@RequestParam(value = "bpVersion", required = true) bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@RequestParam(value = "artifactName", required = true) artifactName: String,
- @ApiParam(value = "Resolution Key associated with the resolution.", required = true)
+ @ApiParam(value = "Resolution Key associated with the resolution", required = true)
@RequestParam(value = "resolutionKey", required = true) resolutionKey: String,
- @ApiParam(value = "Name of the resource to retrieve.", required = true)
+ @ApiParam(value = "Name of the resource to retrieve", required = true)
@RequestParam(value = "name", required = true) name: String
):
ResponseEntity<ResourceResolution> = runBlocking {
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 b80e81ca0..2d32d0e1d 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
@@ -48,7 +48,7 @@ import org.springframework.web.bind.annotation.RestController
@RequestMapping("/api/v1/template")
@Api(
value = "Resource template",
- description = "Interaction with resolved template."
+ description = "Interaction with resolved templates"
)
open class TemplateController(private val templateResolutionService: TemplateResolutionService) {
@@ -69,7 +69,7 @@ open class TemplateController(private val templateResolutionService: TemplateRes
produces = [MediaType.TEXT_PLAIN_VALUE, MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE]
)
@ApiOperation(
- value = "Retrieve a resolved template.",
+ value = "Retrieve a resolved template",
notes = "Retrieve a config template for a given CBA's action, identified by its blueprint name, blueprint version, " +
"artifact name and resolution key. An extra 'format' parameter can be passed to tell what content-type" +
" to expect in return"
@@ -77,25 +77,25 @@ open class TemplateController(private val templateResolutionService: TemplateRes
@ResponseBody
@PreAuthorize("hasRole('USER')")
fun get(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@RequestParam(value = "bpName") bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@RequestParam(value = "bpVersion") bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@RequestParam(value = "artifactName") artifactName: String,
- @ApiParam(value = "Resolution Key associated with the resolution.", required = false)
+ @ApiParam(value = "Resolution Key associated with the resolution", required = false)
@RequestParam(value = "resolutionKey") resolutionKey: String,
- @ApiParam(value = "Resource Type associated with the resolution.", required = false)
+ @ApiParam(value = "Resource Type associated with the resolution", required = false)
@RequestParam(value = "resourceType", required = false, defaultValue = "") resourceType: String,
- @ApiParam(value = "Resource Id associated with the resolution.", required = false)
+ @ApiParam(value = "Resource Id associated with the resolution", required = false)
@RequestParam(value = "resourceId", required = false, defaultValue = "") resourceId: String,
@ApiParam(
- value = "Expected format of the template being retrieved.",
+ value = "Expected format of the template being retrieved",
defaultValue = MediaType.TEXT_PLAIN_VALUE,
required = true
)
@RequestParam(value = "format", required = false, defaultValue = MediaType.TEXT_PLAIN_VALUE) format: String,
- @ApiParam(value = "Occurrence of the template resolution (1-n).", required = false)
+ @ApiParam(value = "Occurrence of the template resolution (1-n)", required = false)
@RequestParam(value = "occurrence", required = false, defaultValue = "1") occurrence: Int = 1
):
ResponseEntity<String> = runBlocking {
@@ -151,15 +151,15 @@ open class TemplateController(private val templateResolutionService: TemplateRes
@ResponseBody
@PreAuthorize("hasRole('USER')")
fun postWithResolutionKey(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@PathVariable(value = "bpName") bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@PathVariable(value = "bpVersion") bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@PathVariable(value = "artifactName") artifactName: String,
- @ApiParam(value = "Resolution Key associated with the resolution.", required = true)
+ @ApiParam(value = "Resolution Key associated with the resolution", required = true)
@PathVariable(value = "resolutionKey") resolutionKey: String,
- @ApiParam(value = "Template to store.", required = true)
+ @ApiParam(value = "Template to store", required = true)
@RequestBody result: String
): ResponseEntity<TemplateResolution> = runBlocking {
@@ -182,17 +182,17 @@ open class TemplateController(private val templateResolutionService: TemplateRes
@ResponseBody
@PreAuthorize("hasRole('USER')")
fun postWithResourceIdAndResourceType(
- @ApiParam(value = "Name of the CBA.", required = true)
+ @ApiParam(value = "Name of the CBA", required = true)
@PathVariable(value = "bpName") bpName: String,
- @ApiParam(value = "Version of the CBA.", required = true)
+ @ApiParam(value = "Version of the CBA", required = true)
@PathVariable(value = "bpVersion") bpVersion: String,
- @ApiParam(value = "Artifact name for which to retrieve a resolved resource.", required = true)
+ @ApiParam(value = "Artifact name for which to retrieve a resolved resource", required = true)
@PathVariable(value = "artifactName") artifactName: String,
- @ApiParam(value = "Resource Type associated with the resolution.", required = false)
+ @ApiParam(value = "Resource Type associated with the resolution", required = false)
@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)
@PathVariable(value = "resourceId", required = true) resourceId: String,
- @ApiParam(value = "Template to store.", required = true)
+ @ApiParam(value = "Template to store", required = true)
@RequestBody result: String
): ResponseEntity<TemplateResolution> = runBlocking {