aboutsummaryrefslogtreecommitdiffstats
path: root/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
diff options
context:
space:
mode:
authorputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-11-24 13:35:10 +0000
committerputhuparambil.aditya <aditya.puthuparambil@bell.ca>2021-12-02 13:48:29 +0000
commit5d8b24107ad579db89bcdad63476143f4a2db755 (patch)
tree9892587684f24f7559c1c93d61c173c875559693 /cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
parenta84a4aa84fd22af9b89424d776a18a98d7515bd2 (diff)
Adding examples in openapi for cps-core
1. Added examples for all parameters, request body and response body 2. Changed the response/request type to Object from String for all json objects 3. Passed json format data in all tests 4. PUT and PATCH operations at present return empty response, hence examples are changed to be in sync Issue-ID: CPS-780 Signed-off-by: puthuparambil.aditya <aditya.puthuparambil@bell.ca> Change-Id: If6dd5bb48df4e1bbf1026eaadf315df8f972e282
Diffstat (limited to 'cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy')
-rw-r--r--cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy2
1 files changed, 1 insertions, 1 deletions
diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
index f5968442d..658dcaa70 100644
--- a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
+++ b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy
@@ -163,7 +163,7 @@ class CpsRestExceptionHandlerSpec extends Specification {
post("$basePath/v1/dataspaces/dataspace-name/anchors/anchor-name/nodes")
.contentType(MediaType.APPLICATION_JSON)
.param('xpath', 'parent node xpath')
- .content('json data')
+ .content(groovy.json.JsonOutput.toJson('{"some-key" : "some-value"}'))
).andReturn().response
then: 'response code indicates bad input parameters'
response.status == BAD_REQUEST.value()