diff options
Diffstat (limited to 'a1-policy-management/src/main/java')
2 files changed, 7 insertions, 7 deletions
diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java index 256b4782..8dd2df61 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyController.java @@ -97,13 +97,13 @@ public class PolicyController { private static Gson gson = new GsonBuilder() // .create(); // - @GetMapping(path = Consts.V2_API_ROOT + "/policy-types/{policyTypeId}", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(path = "/v2/policy-types/{policytype_id:.+}", produces = MediaType.APPLICATION_JSON_VALUE) @ApiOperation(value = "Returns a policy type definition") @ApiResponses(value = { // @ApiResponse(code = 200, message = "Policy type", response = PolicyTypeInfo.class), // - @ApiResponse(code = 404, message = "Near-RT RIC is not found", response = ErrorResponse.ErrorInfo.class)}) + @ApiResponse(code = 404, message = "Policy type is not found", response = ErrorResponse.ErrorInfo.class)}) public ResponseEntity<Object> getPolicyType( // - @PathVariable("policyTypeId") String policyTypeId) { + @PathVariable("policytype_id") String policyTypeId) { try { PolicyType type = policyTypes.getType(policyTypeId); PolicyTypeInfo info = new PolicyTypeInfo(type.schema()); @@ -134,7 +134,7 @@ public class PolicyController { } } - @GetMapping(path = Consts.V2_API_ROOT + "/policies/{policy_id}", produces = MediaType.APPLICATION_JSON_VALUE) + @GetMapping(path = Consts.V2_API_ROOT + "/policies/{policy_id:.+}", produces = MediaType.APPLICATION_JSON_VALUE) @ApiOperation(value = "Returns a policy") // @ApiResponses(value = { // @ApiResponse(code = 200, message = "Policy found", response = PolicyInfo.class), // @@ -150,7 +150,7 @@ public class PolicyController { } } - @DeleteMapping(Consts.V2_API_ROOT + "/policies/{policy_id}") + @DeleteMapping(Consts.V2_API_ROOT + "/policies/{policy_id:.+}") @ApiOperation(value = "Delete a policy") @ApiResponses(value = { // @ApiResponse(code = 200, message = "Not used", response = VoidResponse.class), diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java index b2fa029a..a8fc7e6d 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java @@ -143,9 +143,9 @@ public class ServiceController { @ApiResponse(code = 204, message = "Service unregistered"), @ApiResponse(code = 200, message = "Not used", response = VoidResponse.class), @ApiResponse(code = 404, message = "Service not found", response = ErrorResponse.ErrorInfo.class)}) - @DeleteMapping(Consts.V2_API_ROOT + "/services/{serviceId}") + @DeleteMapping(Consts.V2_API_ROOT + "/services/{service_id:.+}") public ResponseEntity<Object> deleteService(// - @PathVariable("serviceId") String serviceId) { + @PathVariable("service_id") String serviceId) { try { Service service = removeService(serviceId); // Remove the policies from the repo and let the consistency monitoring |