Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-38883 corrected swagger documentation #1086

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading