From 5b5257301a2129e1f963db29243208cff503169a Mon Sep 17 00:00:00 2001 From: Chamindu Senanayake Date: Tue, 1 Mar 2022 10:27:59 +0530 Subject: [PATCH] Fix remove certificate API --- .../mgt/cert/jaxrs/api/CertificateManagementAdminService.java | 4 +--- .../jaxrs/api/impl/CertificateManagementAdminServiceImpl.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java index 5204205dc1..80dd79617d 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/CertificateManagementAdminService.java @@ -310,8 +310,6 @@ public interface CertificateManagementAdminService { @HeaderParam("If-Modified-Since") String ifModifiedSince); @DELETE - @Path("/{serialNumber}") - @Consumes(MediaType.WILDCARD) @ApiOperation( consumes = MediaType.WILDCARD, produces = MediaType.APPLICATION_JSON, @@ -348,7 +346,7 @@ public interface CertificateManagementAdminService { "NOTE: Make sure that a certificate with the serial number you provide exists in the server. If not, first add a certificate.", required = true, defaultValue = "12438035315552875930") - @PathParam("serialNumber") String serialNumber); + @QueryParam("serialNumber") String serialNumber); /** * Verify Certificate for the API security filter diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/impl/CertificateManagementAdminServiceImpl.java b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/impl/CertificateManagementAdminServiceImpl.java index d898e632ae..be0539c946 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/impl/CertificateManagementAdminServiceImpl.java +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/impl/CertificateManagementAdminServiceImpl.java @@ -151,9 +151,7 @@ public class CertificateManagementAdminServiceImpl implements CertificateManagem } @DELETE - @Path("/{serialNumber}") - @Consumes(MediaType.WILDCARD) - public Response removeCertificate(@PathParam("serialNumber") String serialNumber) { + public Response removeCertificate(@QueryParam("serialNumber") String serialNumber) { RequestValidationUtil.validateSerialNumber(serialNumber); CertificateManagementService certificateService = CertificateMgtAPIUtils.getCertificateManagementService();