X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Fcontrollers%2FRicRepositoryController.java;h=b7b1c3058c8e6e23488763cfaf5e06e5e25b303a;hb=d3920fdf9938291fcd01388deea763d097b0d6c8;hp=465ee78c775e176a127391aaa2740f116f8c746b;hpb=ae4206bbd7437adda91fc429efef03a13da2b702;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/controllers/RicRepositoryController.java b/policy-agent/src/main/java/org/oransc/policyagent/controllers/RicRepositoryController.java index 465ee78c..b7b1c305 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/controllers/RicRepositoryController.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/controllers/RicRepositoryController.java @@ -63,18 +63,18 @@ public class RicRepositoryController { @ApiOperation(value = "Returns the name of a RIC managing one Mananged Element") @ApiResponses( value = { // - @ApiResponse(code = 200, message = "RIC is fond", response = String.class), // - @ApiResponse(code = 404, message = "RIC is not fond", response = String.class) // + @ApiResponse(code = 200, message = "RIC is found", response = String.class), // + @ApiResponse(code = 404, message = "RIC is not found", response = String.class) // }) public ResponseEntity getRic( - @RequestParam(name = "managedElementId", required = false, defaultValue = "") String managedElementId) { + @RequestParam(name = "managedElementId", required = true) String managedElementId) { Optional ric = this.rics.lookupRicForManagedElement(managedElementId); if (ric.isPresent()) { return new ResponseEntity<>(ric.get().name(), HttpStatus.OK); } else { - return new ResponseEntity<>("", HttpStatus.NOT_FOUND); + return new ResponseEntity<>("No RIC found", HttpStatus.NOT_FOUND); } } @@ -82,7 +82,7 @@ public class RicRepositoryController { * @return a Json array of all RIC data Example: http://localhost:8081/ric */ @GetMapping("/rics") - @ApiOperation(value = "Query NearRT RIC information") + @ApiOperation(value = "Query Near-RT RIC information") @ApiResponses( value = { // @ApiResponse(code = 200, message = "OK", response = RicInfo.class, responseContainer = "List"), //