Change HTTP response code on Blueprint Model API 47/129747/2
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Thu, 21 Jul 2022 14:23:53 +0000 (14:23 +0000)
committerMichal Jagiello <michal.jagiello@t-mobile.pl>
Tue, 2 Aug 2022 12:01:08 +0000 (12:01 +0000)
Blueprint Model API returns 204 NO CONTENT if blueprint model does not exist

Issue-ID: CCSDK-3729
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: Ie19128d1ece6b229e5c2e5636ab3a7add4e2f3ef
(cherry picked from commit eb7eb24bf107bbd42537a9557e07b5ca82280c60)

ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt

index 66d4b0e..5c8afbd 100644 (file)
@@ -229,7 +229,7 @@ open class BlueprintModelController(private val bluePrintModelHandler: BluePrint
         if (bluePrintModel != null)
             ResponseEntity(bluePrintModel, HttpStatus.OK)
         else
-            ResponseEntity(HttpStatus.NO_CONTENT)
+            ResponseEntity(HttpStatus.NOT_FOUND)
     }
 
     @GetMapping("/download/by-name/{name}/version/{version}", produces = [MediaType.APPLICATION_JSON_VALUE])