Skip to content

Commit

Permalink
MOSIP-38883 corrected swagger documentation (#1086)
Browse files Browse the repository at this point in the history
* MOSIP-38883 corrected swagger documentation

Signed-off-by: Mayura Deshmukh <[email protected]>

* MOSIP-38883 corrected swagger documentation

Signed-off-by: Mayura Deshmukh <[email protected]>

---------

Signed-off-by: Mayura Deshmukh <[email protected]>
Signed-off-by: Mayura Deshmukh <[email protected]>
  • Loading branch information
mayuradesh authored Jan 10, 2025
1 parent f8c6ff6 commit 42e311b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,9 @@ public ResponseEntity<ResponseWrapper<RetrievePartnerDetailsResponse>> retrieveP
return new ResponseEntity<>(response, HttpStatus.OK);
}

/*
* This endpoint has been deprecated since the release-1.3.x
* It has been replaced by the new GET /partners/policy-requests endpoint.
* The functionality provided by this API is now available in the new endpoint.
* Please use the new endpoint for all future requests.
*/
@Deprecated(since = "release-1.3.x")
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersapikeyrequest())")
@RequestMapping(value = "/{partnerId}/apikey/request", method = RequestMethod.GET)
@Operation(summary = "Service to get API key requests of partner - deprecated since release-1.3.x.",
description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/policy-requests endpoint.")
@Operation(summary = "Service to get API key requests of partner")
public ResponseEntity<ResponseWrapper<List<APIkeyRequests>>> getAPIKeyRequestsOfPartner(
@PathVariable String partnerId) {
ResponseWrapper<List<APIkeyRequests>> response = new ResponseWrapper<>();
Expand Down Expand Up @@ -331,17 +323,9 @@ public ResponseWrapper<PartnerCertificateResponseDto> uploadPartnerCertificate(
return response;
}

/*
* This endpoint has been deprecated since the release-1.3.x
* It has been replaced by the new GET /partners/{partnerId}/certificate-data endpoint.
* The functionality provided by this API is now available in the new endpoint.
* Please use the new endpoint for all future requests.
*/
@Deprecated(since = "release-1.3.x")
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnerscertificate())")
@RequestMapping(value = "/{partnerId}/certificate", method = RequestMethod.GET)
@Operation(summary = "Service to get partner certificate - deprecated since release-1.3.x.",
description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/{partnerId}/certificate-data endpoint.")
@Operation(summary = "Service to get partner certificate")
public ResponseWrapper<PartnerCertDownloadResponeDto> getPartnerCertificate(
@ApiParam("To download resigned partner certificate.") @PathVariable("partnerId") @NotNull String partnerId) throws JsonParseException, JsonMappingException, JsonProcessingException, IOException {
ResponseWrapper<PartnerCertDownloadResponeDto> response = new ResponseWrapper<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ public class PartnerManagementController {


/**
* This endpoint would be used by partner Manager, to update Partner api key to Policy Mappings.
* This endpoint would be used by partner Manager, to update Partner API key to Policy Mappings.
* @param request this class contain oldPolicyID and newPolicyID
* @param partnerId this is unique id created after self registered by partner
* @param partnerApiKey this is unique id created by partner manager at the time of approving partner request
* @return response this class contains massage about API key created successfully
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPutpartnersapikeypolicies())")
@RequestMapping(value = "/{partnerId}/apikey/{apikey}/policies", method = RequestMethod.PUT)
@Operation(summary = "Service to update policies against to api key", description = "Service to update policies against to api key")
@Operation(summary = "Service to update policies against to API key", description = "Service to update policies against to API key")
public ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>> partnerApiKeyToPolicyMappings(
@RequestBody @Valid RequestWrapper<PartnersPolicyMappingRequest> request,
@PathVariable String partnerId,
Expand Down Expand Up @@ -183,7 +183,7 @@ public ResponseEntity<ResponseWrapper<PartnerDetailsResponse>> getPartnersDeatil
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersapikey())")
@RequestMapping(value = "/{partnerId}/apikey/{apikey}" , method = RequestMethod.GET)
@Operation(summary = "Service to get policy for given api key", description = "Service to get policy for given api key")
@Operation(summary = "Service to get policy for given API key", description = "Service to get policy for given API key")
public ResponseEntity<ResponseWrapper<PartnerAPIKeyToPolicyMappingsResponse>> getPolicyMappedToAPIKey(
@PathVariable String partnerId,
@PathVariable String apikey){
Expand All @@ -199,15 +199,15 @@ public ResponseEntity<ResponseWrapper<PartnerAPIKeyToPolicyMappingsResponse>> ge

/*
* This endpoint has been deprecated since the release-1.3.x
* It has been replaced by the new GET /partners/apikey/search/v2 endpoint.
* It has been replaced by the new GET /partners/partner-policy-requests endpoint.
* The functionality provided by this API is now available in the new endpoint.
* Please use the new endpoint for all future requests.
*/
@Deprecated(since = "release-1.3.x")
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersapikey())")
@RequestMapping(value = "/apikey" , method = RequestMethod.GET)
@Operation(summary = "Service to get api key requests - deprecated since release-1.3.x.",
description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/apikey/search/v2 endpoint")
@Operation(summary = "Service to get API key requests - deprecated since release-1.3.x.",
description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/partner-policy-requests endpoint")
public ResponseEntity<ResponseWrapper<PartnerAPIKeyRequestsResponse>> getAPIKeyRequests(){
List<ApikeyRequests> apikeyRequests = null;
ResponseWrapper<PartnerAPIKeyRequestsResponse> response = new ResponseWrapper<>();
Expand All @@ -227,7 +227,7 @@ public ResponseEntity<ResponseWrapper<PartnerAPIKeyRequestsResponse>> getAPIKeyR
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersapikey())")
@RequestMapping(value = "/apikey/{apikey}" , method = RequestMethod.GET)
@Operation(summary = "Service to get api key request", description = "Service to get api key request")
@Operation(summary = "Service to get API key request", description = "Service to get API key request")
public ResponseEntity<ResponseWrapper<ApikeyRequests>> getAPIKeyRequest(
@PathVariable String apikey) {
ResponseWrapper<ApikeyRequests> response = new ResponseWrapper<>();
Expand Down Expand Up @@ -255,7 +255,7 @@ public ResponseEntity<ResponseWrapper<String>> approveRejectPolicyMappings(

@PreAuthorize("hasAnyRole(@authorizedRoles.getPatchpartnerspolicyapikeystatus())")
@RequestMapping(value = "/{partnerId}/policy/{policyId}/apiKey/status", method = RequestMethod.PATCH)
@Operation(summary = "Service to activate/de-activate partner api key", description = "Service to activate/de-activate partner api key")
@Operation(summary = "Service to activate/de-activate partner API key", description = "Service to activate/de-activate partner API key")
public ResponseEntity<ResponseWrapper<String>> activateDeactivatePartnerAPIKey(@PathVariable String partnerId,
@PathVariable String policyId, @RequestBody @Valid RequestWrapper<APIkeyStatusUpdateRequestDto> request) {
ResponseWrapper<String> response = new ResponseWrapper<>();
Expand Down

0 comments on commit 42e311b

Please sign in to comment.