From f8c6ff6a142756d423f431188ee9883a7de9eb0b Mon Sep 17 00:00:00 2001 From: Mayura Deshmukh <52281514+mayuradesh@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:35:25 +0530 Subject: [PATCH] MOSIP-38883 corrected swagger documentation (#1085) Signed-off-by: Mayura Deshmukh --- .../controller/DeviceDetailController.java | 47 +++++----- .../controller/FTPChipDetailController.java | 29 +++--- .../SecureBiometricInterfaceController.java | 65 +++++++------ .../ClientManagementController.java | 10 +- .../controller/PartnerServiceController.java | 94 +++++++++---------- .../PartnerManagementController.java | 54 +++++------ .../PolicyManagementController.java | 12 ++- 7 files changed, 159 insertions(+), 152 deletions(-) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/DeviceDetailController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/DeviceDetailController.java index d679e25fa3..649a3d239d 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/DeviceDetailController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/DeviceDetailController.java @@ -80,16 +80,16 @@ public class DeviceDetailController { RequestValidator requestValidator; /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new POST /securebiometricinterface/{sbiId}/devices 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.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetail())") @ResponseFilter @PostMapping - @Operation(summary = "Service to save DeviceDetail - deprecated since release-1.3.0.", description = "This API has been deprecated since the 1.3.0 release and replaced by the POST /securebiometricinterface/{sbiId}/devices endpoint.") + @Operation(summary = "Service to save DeviceDetail - deprecated since release-1.3.x.", description = "This endpoint has been deprecated since the release-1.3.x and replaced by the POST /securebiometricinterface/{sbiId}/devices endpoint.") @ApiResponses({ @ApiResponse(code = 201, message = "When DeviceDetail successfully created"), @ApiResponse(code = 400, message = "When Request body passed is null or invalid"), @ApiResponse(code = 500, message = "While creating DeviceDetail any error occured") }) @@ -113,13 +113,13 @@ public ResponseWrapper createDeviceDetail( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x */ - @Deprecated(since = "release-1.3.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getPutdevicedetail())") @ResponseFilter @PutMapping - @Operation(summary = "Service to update DeviceDetails - deprecated since release-1.3.0.", description = "This API has been deprecated since release-1.3.0.") + @Operation(summary = "Service to update DeviceDetails - deprecated since release-1.3.x.", description = "This endpoint has been deprecated since release-1.3.x.") @ApiResponses({ @ApiResponse(code = 201, message = "When DeviceDetail successfully updated"), @ApiResponse(code = 400, message = "When Request body passed is null or invalid"), @ApiResponse(code = 500, message = "While updating DeviceDetail any error occured") }) @@ -142,17 +142,17 @@ public ResponseWrapper updateDeviceDetail( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new PATCH devicedetail/{id}/approval 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.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdevicedetail())") @ResponseFilter @PatchMapping - @Operation(summary = "Service to approve/reject DeviceDetail - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the PATCH devicedetail/{id}/approval endpoint.") + @Operation(summary = "Service to approve/reject DeviceDetail - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the PATCH /devicedetail/{id}/approval endpoint.") @ApiResponses({ @ApiResponse(code = 201, message = "When DeviceDetail successfully approved/rejected"), @ApiResponse(code = 400, message = "When Request body passed is null or invalid"), @ApiResponse(code = 500, message = "While approving/rejecting DeviceDetail any error occured") }) @@ -176,17 +176,17 @@ public ResponseWrapper approveDeviceDetails( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /devicedetail/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetailsearch())") - @Operation(summary = "Service to search DeviceDetails - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /devicedetail/search/v2 endpoint.") + @Operation(summary = "Service to search DeviceDetails - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /devicedetail/search/v2 endpoint.") public ResponseWrapper> searchDeviceDetails( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -206,17 +206,17 @@ public ResponseWrapper> searchDeviceType } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /devicedetail/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/filtervalues") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetailfiltervalues())") - @Operation(summary = "Service to filter DeviceDetails - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /devicedetail/search/v2 endpoint.") + @Operation(summary = "Service to filter DeviceDetails - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /devicedetail/search/v2 endpoint.") public ResponseWrapper filterValues( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -249,8 +249,8 @@ public ResponseWrapper filterDeviceSubType( @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdeactivatedevice())") @PatchMapping(value = "/{deviceId}") - @Operation(summary = "Added in release-1.3.0, This endpoint deactivates a device based on the provided Device ID and status", - description = "This endpoint deactivates a device based on the provided Device ID and status, ensuring the device belongs to the logged-in user. It only allows deactivation for devices with status \"approved\" and is_active as true; other statuses result in an error. Upon deactivation, the device's is_active is set to false while retaining the \"approved\" status. It is accessible to users with the DEVICE_PROVIDER or PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint deactivates a Device based on the Device Id.", + description = "Avaiable since release-1.3.x. This endpoint is configured for the roles DEVICE_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -267,8 +267,8 @@ public ResponseWrapperV2 deactivateDevice(@PathVariable @PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicewithsbimapping())") @PostMapping(value = "/{id}/approval") - @Operation(summary = "Added in release-1.3.0, available for Partner Admin, allows user to approve or reject devices and activate the mapping between a device and an SBI", - description = "This endpoint allows Partner Admin users to approve or reject devices and activate the mapping between a device and an SBI. It is exclusively accessible to users with the PARTNER_ADMIN role.") + @Operation(summary = "This endpoint is for the Partner Admin user to approve or reject a Device and activate the mapping between the Device and the SBI.", + description = "Avaiable since release-1.3.x. It is configured for the role PARTNER_ADMIN") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -284,7 +284,8 @@ public ResponseWrapperV2 approveOrRejectMappingDeviceToSbi(@PathVariabl @PreAuthorize("hasAnyRole(@authorizedRoles.getGetalldevicedetails())") @GetMapping(value = "/search/v2") - @Operation(summary = "Added in release-1.3.0, available only for Partner Admin, retrieves a list of all devices created by all partners", description = "This endpoint fetches the list of all devices created by all partners. It enhances the earlier /partners/devicedetail/search endpoint by improving performance, handling deactivated statuses, and adding SBI ID and version details. The API supports pagination, sorting and filtering and is designed exclusively for Partner Admin users.") + @Operation(summary = "This endpoint retrieves a list of all the Devices.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/FTPChipDetailController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/FTPChipDetailController.java index 019644567a..cc7c75cd51 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/FTPChipDetailController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/FTPChipDetailController.java @@ -111,13 +111,13 @@ public ResponseWrapper createDeviceDetail( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x */ - @Deprecated(since = "release-1.3.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getPutftpchipdetail())") @ResponseFilter @PutMapping - @Operation(summary = "Service to update ftp chip detail - deprecated since 1.3.0 release.", description = "This API has been deprecated since 1.3.0 release.") + @Operation(summary = "Service to update ftp chip detail - deprecated since release-1.3.x.", description = "This endpoint has been deprecated since release-1.3.x.") @ApiResponses({ @ApiResponse(code = 201, message = "When ftp chip detail successfully updated"), @ApiResponse(code = 400, message = "When Request body passed is null or invalid"), @ApiResponse(code = 500, message = "While updating ftp chip detail any error occured") }) @@ -236,17 +236,17 @@ public ResponseWrapper getPartnerCertificate( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /ftpchipdetail/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostftpchipdetailsearch())") - @Operation(summary = "Service to search ftp chip details - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /ftpchipdetail/search/v2 endpoint.") + @Operation(summary = "Service to search ftp chip details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /ftpchipdetail/search/v2 endpoint.") public ResponseWrapper> searchFtpChipDetails( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -256,7 +256,8 @@ public ResponseWrapper> searchFtpChipDetai @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdeactivateftm())") @PatchMapping(value = "/{ftmId}") - @Operation(summary = "Added in release-1.3.0, This endpoint deactivates FTM chip details based on the FTM chip details ID", description = "This endpoint deactivates FTM chip details based on the FTM chip details ID and the status provided in the request body. It checks if the FTM chip details belong to the logged-in user and ensures the status is \"approved\" with \"is_active\" set to true. If the conditions are not met, an error is thrown. This endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") + @Operation(summary = "This endpoint deactivates the FTM chip details based on the FTM chip details Id.", + description = "Avaiable since release-1.3.x. This endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -273,8 +274,8 @@ public ResponseWrapperV2 deactivateFtm(@PathVariable("ftmI @PreAuthorize("hasAnyRole(@authorizedRoles.getGetoriginalftmcertificate())") @RequestMapping(value = "/{ftmId}/certificate-data", method = RequestMethod.GET) - @Operation(summary = "Added in release-1.3.0, This endpoint fetches both the CA signed certificate uploaded by the FTM Chip Provider and the MOSIP signed certificate generated by PMS", - description = "This endpoint fetches both the CA signed certificate uploaded by the FTM Chip Provider and the MOSIP signed certificate generated by PMS. It uses the Kernel Key Manager service endpoint getPartnerSignedCertificate/{$partnerCertId} to retrieve the certificates. The endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") + @Operation(summary = "This endpoint fetches both the CA signed certificate uploaded by the FTM Chip Provider and the MOSIP signed certificate generated by PMS", + description = "Avaiable since release-1.3.x. The endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = {@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -285,8 +286,8 @@ public ResponseWrapperV2 getFtmCertificateDat @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersftmchipdetails())") @GetMapping(value = "/search/v2") - @Operation(summary = "Added in release-1.3.0, available only for Partner Admin users, retrieves a list of all FTM chip details created by all partners", - description = "This endpoint, available for Partner Admin users only, retrieves the list of all FTM chip details created by all partners. It upgrades the earlier GET endpoint /ftpchipdetail/search by adding performance improvements and support for deactivated status. Additionally, it supports pagination, sorting, and filtering. This endpoint is configured for the role: PARTNER_ADMIN") + @Operation(summary = "This endpoint retrieves a list of all FTM Chip details created by all the FTM Providers.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role FTM_PROVIDER.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -334,8 +335,8 @@ ResponseWrapperV2> getPartnersFtmChipDeta @PreAuthorize("hasAnyRole(@authorizedRoles.getGetftmchipdetails())") @GetMapping - @Operation(summary = "Added in release-1.3.0, This endpoint fetches the list of all FTM Chip details associated with the partner IDs of the logged-in user", - description = "This endpoint fetches the list of all FTM Chip details associated with the partner IDs of the logged-in user. If no FTM Chip details are found, it returns an empty array with optional attributes like id, version, response time, and metadata. This endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") + @Operation(summary = "This endpoint retrieves a list of all FTM Chip details created by all the FTM Providers associated with the logged in user." + , description = "Available since release-1.3.x. This endpoint is configured for the roles FTM_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = {@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/SecureBiometricInterfaceController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/SecureBiometricInterfaceController.java index c07a1b7d58..75c6371393 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/SecureBiometricInterfaceController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/device/controller/SecureBiometricInterfaceController.java @@ -111,14 +111,14 @@ public ResponseWrapper SecureBiometricInterface( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x */ - @Deprecated(since = "release-1.3.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterface())") @ResponseFilter @PutMapping - @Operation(summary = "Service to update SecureBiometricInterface - deprecated since release-1.3.0.", - description = "This API has been deprecated since release-1.3.0.") + @Operation(summary = "Service to update SecureBiometricInterface - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since release-1.3.x.") @ApiResponses({ @ApiResponse(code = 201, message = "When SecureBiometricInterface successfully updated"), @ApiResponse(code = 400, message = "When Request body passed is null or invalid"), @ApiResponse(code = 500, message = "While updating SecureBiometricInterface any error occured") }) @@ -168,17 +168,17 @@ public ResponseWrapper approveSecureBiometricInterface( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /securebiometricinterface/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacesearch())") - @Operation(summary = "Service to search SecureBiometricInterface details - deprecated since release-1.3.0.", - description = "This API has been deprecated since the release-1.3.0 and replaced by the GET /securebiometricinterface/search/v2 endpoint.") + @Operation(summary = "Service to search SecureBiometricInterface details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /securebiometricinterface/search/v2 endpoint.") public ResponseWrapper> searchSecureBiometric( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -188,17 +188,17 @@ public ResponseWrapper> searchSecureBiomet } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new POST /securebiometricinterface/{sbiId}/devices 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PutMapping("/devicedetails/map") @PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterfacedevicedetailsmap())") - @Operation(summary = "Service to map device details with sbi - deprecated since release-1.3.0.", - description = "This API has been deprecated since the release-1.3.0 and replaced by the POST /securebiometricinterface/{sbiId}/devices endpoint.") + @Operation(summary = "Service to map device details with sbi - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the POST /securebiometricinterface/{sbiId}/devices endpoint.") public ResponseWrapper mapDeviceDetails( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -207,14 +207,14 @@ public ResponseWrapper mapDeviceDetails( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x */ - @Deprecated(since = "release-1.3.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PutMapping("/devicedetails/map/remove") @PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterfacedevicedetailsmapremove())") - @Operation(summary = "Service to remove mapped device details with sbi - deprecated since release-1.3.0.", - description = "This API has been deprecated since release-1.3.0.") + @Operation(summary = "Service to remove mapped device details with sbi - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since release-1.3.x.") public ResponseWrapper removeMappedDeviceDetails( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -223,17 +223,17 @@ public ResponseWrapper removeMappedDeviceDetails( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /securebiometricinterface/{sbiId}/devices 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/devicedetails/map/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacedevicedetailsmapsearch())") - @Operation(summary = "Service to search mapped device details and SecureBiometricInterface details - deprecated since release-1.3.0.", - description = "This API has been deprecated since the release-1.3.0 and replaced by the GET /securebiometricinterface/{sbiId}/devices endpoint.") + @Operation(summary = "Service to search mapped device details and SecureBiometricInterface details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /securebiometricinterface/{sbiId}/devices endpoint.") public ResponseWrapper> searchMappedDeviceDetails( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -243,17 +243,17 @@ public ResponseWrapper> searchMapped } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /securebiometricinterface/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/filtervalues") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacefiltervalues())") - @Operation(summary = "Service to filter SBI's - deprecated since release-1.3.0.", - description = "This API has been deprecated since the release-1.3.0 and replaced by the GET /securebiometricinterface/search/v2 endpoint.") + @Operation(summary = "Service to filter SBI's - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /securebiometricinterface/search/v2 endpoint.") public ResponseWrapper filterValues( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -263,7 +263,8 @@ public ResponseWrapper filterValues( @PreAuthorize("hasAnyRole(@authorizedRoles.getPostadddevicetosbi())") @PostMapping(value = "/{sbiId}/devices") - @Operation(summary = "Added in release-1.3.0, This endpoint adds a new device and creates an inactive mapping between the device and an approved SBI.", description = "This endpoint adds a new device and creates an inactive mapping between the device and an approved SBI, with device status as \"pending_approval.\" If the mapping fails, the device is deleted to prevent orphaned records. This ensures every device is associated with an SBI as per the new UI design. It is accessible to users with the DEVICE_PROVIDER or PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint adds a new Device and creates an inactive mapping between the device and the given SBI.", + description = "Avaiable since release-1.3.x. This endpoint is configured for the roles DEVICE_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -279,7 +280,8 @@ public ResponseWrapperV2 addDeviceToSbi(@PathVariable("sbiId") @NotBlank @PreAuthorize("hasAnyRole(@authorizedRoles.getGetsbidetails())") @GetMapping(value = "/{sbiId}/devices") - @Operation(summary = "Added in release-1.3.0, This endpoint fetches the list of devices associated with a given SBI ID", description = "This endpoint fetches the list of devices associated with a given SBI ID and validates whether the SBI ID belongs to the logged-in user. If no devices are found, it returns an empty array along with metadata attributes. It is accessible to users with the DEVICE_PROVIDER or PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint fetches the list of Devices associated with a given SBI Id", + description = "Avaiable since release-1.3.x. This endpoint is configured for the roles DEVICE_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -291,8 +293,8 @@ public ResponseWrapperV2> getAllDevicesForSbi(@PathVariable Stri @PreAuthorize("hasAnyRole(@authorizedRoles.getGetsbidetails())") @GetMapping - @Operation(summary = "Added in release-1.3.0, This endpoint fetches the list of SBI details associated with all partner IDs linked to the user.", - description = "This endpoint fetches the list of SBI details associated with all partner IDs linked to the logged-in user. If no SBI details are found, it returns an empty array along with metadata attributes. It is accessible for users with the DEVICE_PROVIDER or PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint retrieves a list of all SBIs created by all the Device Providers associated with the logged in user." + , description = "Available since release-1.3.x. This endpoint is configured for the roles DEVICE_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = {@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -302,8 +304,8 @@ public ResponseWrapperV2> getSbiDetails() { @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdeactivatesbi())") @PatchMapping(value = "/{sbiId}") - @Operation(summary = "Added in release-1.3.0, This endpoint deactivates an SBI along with associated devices", - description = "This endpoint deactivates an SBI based on the provided SBI ID and request body status, ensuring the SBI belongs to the logged-in user. It only allows deactivation for SBIs with status \"approved\" and is_active as true. On deactivation, the SBI's is_active is set to false, and associated devices are updated: approved devices become inactive, and pending devices are marked as rejected. It is accessible to users with the DEVICE_PROVIDER or PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint deactivates an SBI along with associated Devices.", + description = "Avaiable since release-1.3.x. This endpoint is configured for the roles DEVICE_PROVIDER or PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -320,7 +322,8 @@ public ResponseWrapperV2 deactivateSbi(@PathVariable("sbi @PreAuthorize("hasAnyRole(@authorizedRoles.getGetallsbidetails())") @GetMapping(value = "/search/v2") - @Operation(summary = "Added in release-1.3.0, available only for Partner Admin users, retrieves a list of all SBIs created by all partners", description = "This endpoint is for Partner Admin users and fetches a list of all SBIs created by all partners. It enhances the earlier /partners/securebiometricinterface/search endpoint by improving performance, handling deactivated statuses, and including associated device details (counts for associated, approved, and pending devices). The API supports pagination, sorting and filtering and is accessible to users with the PARTNER_ADMIN role") + @Operation(summary = "This endpoint retrieves a list of all SBIs created by all the Device Providers.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @io.swagger.v3.oas.annotations.responses.ApiResponses(value = { @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "OK"), @io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/oauth/client/controller/ClientManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/oauth/client/controller/ClientManagementController.java index f97293606e..72fbbd430a 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/oauth/client/controller/ClientManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/oauth/client/controller/ClientManagementController.java @@ -98,8 +98,8 @@ public ResponseWrapper getOIDCClient(@PathVariable("client_id") St @PreAuthorize("hasAnyRole(@authorizedRoles.getGetoauthclients())") @GetMapping(value = "/oauth/clients") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves a list of all OAuth clients created for approved policies by Auth Partners associated with the user." - , description = "This endpoint retrieves a list of all OAuth clients created for approved policies by Auth Partners associated with the logged-in user. If no OIDC clients are found, it returns an empty array with optional metadata attributes. This endpoint is configured for the roles AUTH_PARTNER and PARTNER_ADMIN.") + @Operation(summary = "This endpoint retrieves a list of all OAuth clients created by all the Auth Partners associated with the logged in user." + , description = "Available since release-1.3.x. This endpoint is configured for the roles AUTH_PARTNER or PARTNER_ADMIN.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -109,8 +109,8 @@ public ResponseWrapperV2> getClients() { @PreAuthorize("hasAnyRole(@authorizedRoles.getGetoauthpartnersclients())") @GetMapping(value = "/oauth/partners/clients") - @Operation(summary = "Added in release-1.3.0, This endpoint, available only for Partner Admin users, retrieves a list of all OAuth clients created by all Partners. ", - description = "This endpoint, available only for Partner Admin users, retrieves a list of all OAuth clients created by all Partners. It supports pagination, sorting, and filtering.") + @Operation(summary = "This endpoint retrieves a list of all OAuth clients created by all the Auth Partners.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -125,7 +125,7 @@ public ResponseWrapperV2> getPartnersClients @RequestParam(value = "policyName", required = false) String policyName, @RequestParam(value = "clientName", required = false) String clientName, @Parameter( - description = "Status of oidc client", + description = "Status of OAuth client", in = ParameterIn.QUERY, schema = @Schema(allowableValues = {"ACTIVE", "INACTIVE"}) ) diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/controller/PartnerServiceController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/controller/PartnerServiceController.java index 949a36c349..cebcd3ba1b 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/controller/PartnerServiceController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/controller/PartnerServiceController.java @@ -85,7 +85,7 @@ public class PartnerServiceController { public static final String VERSION = "1.0"; /** - * This API would be used for self registration by partner to create Auth/E-KYC + * This endpoint would be used for self registration by partner to create Auth/E-KYC * Partners. Partner Management module would be integrating with Kernel IAM * module for generation of user id and password for partners. * @@ -196,7 +196,7 @@ public ResponseEntity> getCreden */ @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnerscontactadd())") @RequestMapping(value = "{partnerId}/contact/add", method = RequestMethod.POST) - @Operation(summary = "Service to add additional contact deatils of partner", description = "Service to add additional contact deatils of partner") + @Operation(summary = "Service to add additional contact details of partner", description = "Service to add additional contact details of partner") public ResponseEntity> addContact(@PathVariable String partnerId,@RequestBody @Valid RequestWrapperrequest){ ResponseWrapper response = new ResponseWrapper<>(); auditUtil.setAuditRequestDto(PartnerServiceAuditEnum.ADD_CONTACTS, partnerId, "partnerId"); @@ -206,7 +206,7 @@ public ResponseEntity> addContact(@PathVariable String p return new ResponseEntity<>(response, HttpStatus.OK); } /** - * This API would be used to update Auth/E-KYC Partner's details. + * This endpoint would be used to update Auth/E-KYC Partner's details. * * @param request * this class contains partner updated details @@ -216,7 +216,7 @@ public ResponseEntity> addContact(@PathVariable String p */ @PreAuthorize("hasAnyRole(@authorizedRoles.getPutpartners())") @RequestMapping(value = "/{partnerId}", method = RequestMethod.PUT) - @Operation(summary = "Service to update deatils of partner", description = "Service to update deatils of partner") + @Operation(summary = "Service to update details of partner", description = "Service to update details of partner") public ResponseEntity> updatePartnerDetails( @RequestBody @Valid RequestWrapper request, @PathVariable String partnerId) { ResponseWrapper response = new ResponseWrapper<>(); @@ -232,7 +232,7 @@ public ResponseEntity> updatePartnerDetails( @PreAuthorize("hasAnyRole(@authorizedRoles.getPutpartnersnew())") @RequestMapping(value = "/v2/{partnerId}", method = RequestMethod.PUT) - @Operation(summary = "Service to update deatils of partner", description = "Service to update deatils of partner") + @Operation(summary = "Service to update details of partner", description = "Service to update details of partner") public ResponseEntity> updatePartnerInfo( @RequestBody @Valid RequestWrapper request, @PathVariable String partnerId) { ResponseWrapper response = new ResponseWrapper<>(); @@ -246,7 +246,7 @@ public ResponseEntity> updatePartnerInfo( } /** - * This API would be used to retrieve Auth/E-KYC Partner details + * This endpoint would be used to retrieve Auth/E-KYC Partner details * * @param partnerId * this is unique id created after self registered by partner @@ -254,7 +254,7 @@ public ResponseEntity> updatePartnerInfo( */ @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnerspartnerid())") @RequestMapping(value = "/{partnerId}", method = RequestMethod.GET) - @Operation(summary = "Service to get deatils of partner", description = "Service to get deatils of partner") + @Operation(summary = "Service to get details of partner", description = "Service to get details of partner") public ResponseEntity> retrievePartnerDetails( @PathVariable String partnerId) { ResponseWrapper response = new ResponseWrapper<>(); @@ -267,16 +267,16 @@ public ResponseEntity> retrieveP } /* - * This API has been deprecated since the release-1.3.0 + * 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.0") + @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 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/policy-requests endpoint.") + @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.") public ResponseEntity>> getAPIKeyRequestsOfPartner( @PathVariable String partnerId) { ResponseWrapper> response = new ResponseWrapper<>(); @@ -332,16 +332,16 @@ public ResponseWrapper uploadPartnerCertificate( } /* - * This API has been deprecated since the release-1.3.0 + * 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.0") + @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 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/{partnerId}/certificate-data endpoint.") + @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.") public ResponseWrapper getPartnerCertificate( @ApiParam("To download resigned partner certificate.") @PathVariable("partnerId") @NotNull String partnerId) throws JsonParseException, JsonMappingException, JsonProcessingException, IOException { ResponseWrapper response = new ResponseWrapper<>(); @@ -353,8 +353,8 @@ public ResponseWrapper getPartnerCertificate( @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnerscertificate())") @GetMapping(value = "/{partnerId}/certificate-data") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves both the CA-signed certificate uploaded by the partner and the MOSIP-signed certificate generated by PMS.", - description = "This endpoint retrieves both the CA-signed certificate uploaded by the partner and the MOSIP-signed certificate generated by PMS. It uses the Kernel Key Manager service endpoint getPartnerSignedCertificate/{partnerCertId} to fetch the certificates. It is accessible to all partner types or users with the PARTNER_ADMIN role.") + @Operation(summary = "This endpoint retrieves both the CA signed certificate uploaded by the partner and the MOSIP-signed certificate generated by PMS.", + description = "Avaiable since release-1.3.x. It is configured for role any of the partner type or PARTNER_ADMIN.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -367,8 +367,8 @@ public ResponseWrapperV2 getPartnerCertificateD @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpolicyrequests())") @GetMapping(value = "/policy-requests") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves a list of all policy requests created by the partner IDs associated with the user", - description = "This endpoint retrieves a list of all policy requests created by the partner IDs associated with the logged-in user. If no policy requests are found, it returns an empty array with metadata attributes. It is accessible to users with roles including AUTH_PARTNER, ABIS_PARTNER, SDK_PARTNER, CREDENTIAL_PARTNER, PARTNER_ADMIN, and ONLINE_VERIFICATION_PARTNER.") + @Operation(summary = "This endpoint retrieves a list of all policy requests created by the Partner Ids associated with the logged in user", + description = "Avaiable since release-1.3.x. It is configured for users with any of the roles: AUTH_PARTNER, ABIS_PARTNER, SDK_PARTNER, CREDENTIAL_PARTNER, PARTNER_ADMIN, ONLINE_VERIFICATION_PARTNER.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -378,9 +378,9 @@ public ResponseWrapperV2> getPolicyRequests() { @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnercertificates())") @GetMapping(value = "/partner-certificates-details") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves a list of all partner certificates uploaded by the partner IDs associated with the user", - description = "This endpoint retrieves a list of all partner certificates uploaded by the partner IDs associated with the logged-in user. If no certificates are found, it returns an array with partner IDs and empty certificate attributes. It is accessible to all partner types or users with the PARTNER_ADMIN role.") - @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), + @Operation(summary = "This endpoint retrieves a list of all Partner Certicates uploaded by the logged in user", + description = "Avaiable since release-1.3.x. It is configured for role any of the partner type or PARTNER_ADMIN.") + @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) public ResponseWrapperV2> getPartnerCertificatesDetails() { @@ -389,8 +389,8 @@ public ResponseWrapperV2> getPartnerCertificatesDetails() { @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersv4())") @GetMapping(value = "/v4") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves a list of partners based on query parameters", - description = "This endpoint retrieves a list of partners based on query parameters: status (mandatory), policyGroupAvailable (optional), and partnerType (optional). It supports the \"Multi Partner Type Support for a User\" feature, allowing a single PMS user account to manage multiple partner types. The endpoint returns partner IDs that match the status and, optionally, the policy group or partner type, for the logged-in user. If no matches are found, it returns an empty array. It is accessible to various partner roles, including AUTH_PARTNER, ABIS_PARTNER, DEVICE_PROVIDER, and PARTNER_ADMIN.") + @Operation(summary = "This endpoint retrieves a list of Partners associated with the logged in user, based on the query parameters", + description = "Avaiable since release-1.3.x. It is configured for role any of the partner type or PARTNER_ADMIN.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -404,8 +404,8 @@ public ResponseWrapperV2> getPartnersV4( @PreAuthorize("hasAnyRole(@authorizedRoles.getGetapikeysforauthpartners())") @GetMapping(value = "/auth-partner-api-keys") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves a list of all API key details created by the Auth Partner IDs associated with the user", - description = "This endpoint retrieves a list of all API key details created by the Auth Partner IDs associated with the logged-in user. If no API key details are found, it returns an empty array with metadata attributes. It is accessible to users with the AUTH_PARTNER or PARTNER_ADMIN") + @Operation(summary = "This endpoint retrieves a list of all API keys created by the Auth Partners associated with the logged in user.", + description = "Avaiable since release-1.3.x. It is configured for the role AUTH_PARTNER or PARTNER_ADMIN") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -414,17 +414,17 @@ public ResponseWrapperV2> getAuthPartnerApiKeys() { } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/v3 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnerssearch())") - @Operation(summary = "Service to search partner details - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/v3 endpoint") + @Operation(summary = "Service to search partner details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/v3 endpoint") public ResponseWrapper> searchPartner( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -446,17 +446,17 @@ public ResponseWrapper> searchPartnerType( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/v3 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/filtervalues") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnersfiltervalues())") - @Operation(summary = "Service to filter partner details - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/v3 endpoint") + @Operation(summary = "Service to filter partner details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/v3 endpoint") public ResponseWrapper filterValues( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -466,17 +466,17 @@ public ResponseWrapper filterValues( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/apikey/request/filtervalues") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnersapikeyrequestfiltervalues())") - @Operation(summary = "Service to filter api key requests - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/partner-policy-requests endpoint") + @Operation(summary = "Service to filter 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 ResponseWrapper apikeyRequetsFilterValues( @RequestBody @Valid RequestWrapper request) { ResponseWrapper responseWrapper = new ResponseWrapper<>(); @@ -486,17 +486,17 @@ public ResponseWrapper apikeyRequetsFilterValues( } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/apikey/request/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnersapikeyrequestsearch())") - @Operation(summary = "Service to search api key requests - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/partner-policy-requests endpoint.") + @Operation(summary = "Service to search 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 ResponseWrapper> searchApikeyRequest( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -506,17 +506,17 @@ public ResponseWrapper> searchAp } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/apikey/search/v2 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.0") + @Deprecated(since = "release-1.3.x") @ResponseFilter @PostMapping("/apikey/search") @PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnersapikeysearch())") - @Operation(summary = "Service to search api key - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/apikey/search/v2 endpoint.") + @Operation(summary = "Service to search API key - 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.") public ResponseWrapper> searchApikey( @RequestBody @Valid RequestWrapper request) { ResponseWrapper> responseWrapper = new ResponseWrapper<>(); @@ -561,7 +561,7 @@ public ResponseEntity> mapPolic } @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchpartnersgenerateapikey())") - @Operation(summary = "To generate apiKeys for approved policies", description = "To generate apiKeys for approved policies") + @Operation(summary = "To generate API Key for approved policies", description = "To generate API Key for approved policies") @RequestMapping(value = "/{partnerId}/generate/apikey",method = RequestMethod.PATCH) public ResponseEntity> generateAPIKey( @ApiParam("partner id") @PathVariable("partnerId") @NotNull String partnerId, diff --git a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/controller/PartnerManagementController.java b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/controller/PartnerManagementController.java index 561b13a820..7c20248605 100644 --- a/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/controller/PartnerManagementController.java +++ b/partner/partner-management-service/src/main/java/io/mosip/pms/partner/manager/controller/PartnerManagementController.java @@ -75,7 +75,7 @@ public class PartnerManagementController { /** - * This API 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 @@ -102,7 +102,7 @@ public ResponseEntity> partnerApi } /** - * This API would be used to activate/deactivate Auth/E-KYC Partners + * This endpoint would be used to activate/deactivate Auth/E-KYC Partners * @param partnerId this is unique id created after self registered by partner * @param request this class contains the status of activate/deactivate Auth/E-KYC Partners * @return respons this class contains massage about Partner status updated successfully @@ -127,16 +127,16 @@ public ResponseEntity> activateDe } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/v3 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.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartners())") @RequestMapping(method = RequestMethod.GET) - @Operation(summary = "Service to get partner details - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/v3 endpoint") + @Operation(summary = "Service to get partner details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/v3 endpoint") public ResponseEntity> getPartners( @RequestParam("partnerType") Optional partnerType){ ResponseWrapper response=new ResponseWrapper<>(); @@ -149,16 +149,16 @@ public ResponseEntity> getPartne } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/v3 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.0") + @Deprecated(since = "release-1.3.x") @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersnew())") @RequestMapping(value = "/v2", method = RequestMethod.GET) - @Operation(summary = "Service to get partner details - deprecated since 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release and replaced by the GET /partners/v3 endpoint") + @Operation(summary = "Service to get partner details - deprecated since release-1.3.x.", + description = "This endpoint has been deprecated since the release-1.3.x and replaced by the GET /partners/v3 endpoint") public ResponseEntity> getPartnersDeatils( @RequestParam("partnerType") Optional partnerType){ ResponseWrapper response=new ResponseWrapper<>(); @@ -198,16 +198,16 @@ public ResponseEntity> ge } /* - * This API has been deprecated since the release-1.3.0 + * This endpoint has been deprecated since the release-1.3.x * It has been replaced by the new GET /partners/apikey/search/v2 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.0") + @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 1.3.0 release.", - description = "This API has been deprecated since the 1.3.0 release 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/apikey/search/v2 endpoint") public ResponseEntity> getAPIKeyRequests(){ List apikeyRequests = null; ResponseWrapper response = new ResponseWrapper<>(); @@ -221,7 +221,7 @@ public ResponseEntity> getAPIKeyR } /** - * This API would be used to retrieve the request for Partner API key to Policy Mappings for given request id. + * This endpoint would be used to retrieve the request for Partner API key to Policy Mappings for given request id. * @param apiKeyReqId this is unique id created after partner request for Partner API Key * @return response this class contains details related to Partner API key to Policy Mappings */ @@ -269,8 +269,8 @@ public ResponseEntity> activateDeactivatePartnerAPIKey(@ @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnerdetails())") @GetMapping(value = "/{partnerId}/v2") - @Operation(summary = "Added in release-1.3.0, This endpoint, available for Partner Admin users, retrieves all details of a partner", - description = "This endpoint, available for Partner Admin users, retrieves all details of a partner. It enhances the earlier /partners/{partnerId} endpoint by adding policy group and certificate details in the response. It is configured for the PARTNER_ADMIN role") + @Operation(summary = "This endpoint retrieves all the details of the Partner based on Partner Id.", + description = "Avaiable since release-1.3.x. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -282,8 +282,8 @@ public ResponseWrapperV2 getPartnerDetails(@PathVariable St @PreAuthorize("hasAnyRole(@authorizedRoles.getGetallpartners())") @GetMapping(value = "/v3") - @Operation(summary = "Added in release-1.3.0, This endpoint, available for Partner Admin users, retrieves a list of all partners in the PMS", - description = "This endpoint, available for Partner Admin users, retrieves a list of all partners in the PMS system. It enhances the previous /partners and /partners/v2 endpoints by adding features like pagination, sorting, filtering, and including policy group details and certificate upload status in the response. It is configured for the PARTNER_ADMIN role.") + @Operation(summary = "This endpoint retrieves a list of all Partners.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -335,8 +335,8 @@ public ResponseWrapperV2> getAllPartners( @PreAuthorize("hasAnyRole(@authorizedRoles.getGetallpartnerpolicymappingrequests())") @GetMapping(value = "/partner-policy-requests") - @Operation(summary = "Added in release-1.3.0, available for Partner Admin users, retrieves all details of policy requests by partners", - description = "This endpoint, available for Partner Admin users, retrieves all details of policy requests by partners. It upgrades the earlier /partners/apikey/request/search endpoint with additional fields like partnerType, policyGroupName, and updatedDateTime, along with performance improvements. The endpoint supports pagination,sorting and filtering, and is configured for the PARTNER_ADMIN role") + @Operation(summary = "This endpoint retrieves a list of all the Policy Requests made by all the Partners.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -392,8 +392,8 @@ public ResponseWrapperV2> getA @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpartnersapikeyrequests())") @GetMapping(value = "/apikey/search/v2") - @Operation(summary = "Added in release-1.3.0, available for Partner Admin users, retrieves the list of all API keys created by partners", - description = "This endpoint, available for Partner Admin users, retrieves the list of all API keys created by partners. It upgrades the earlier /partners/apikey/search endpoint with performance improvements and additional fields like policyGroupName, policyDescription, and policyGroupDescription. The endpoint supports pagination,sorting and filtering and is configured for the PARTNER_ADMIN role.") + @Operation(summary = "This endpoint retrieves a list of all the API keys created by all the Auth Partners.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -441,8 +441,8 @@ public ResponseWrapperV2> getAllApiKe @PreAuthorize("hasAnyRole(@authorizedRoles.getGetallcacertificates())") @GetMapping(value = "/root-certificates") - @Operation(summary = "Added in release-1.3.0, This endpoint, available only for Partner Admin, retrieves a list of all Root Trust certificates (CA and Intermediate CA)", - description = "This endpoint, available only for Partner Admin, retrieves a list of all Root Trust certificates (CA and Intermediate CA) in the system. It fetches details from the key manager endpoint /v1/keymanager/getCaCertificates. The endpoint supports server-side pagination, sorting, and filtering.") + @Operation(summary = "This endpoint retrieves a list of all the Root Trust Certificates uploaded by the Partner Admin.", + description = "Avaiable since release-1.3.x. This endpoint supports pagination, sorting, and filtering. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -491,8 +491,8 @@ public ResponseWrapperV2> getCaCertif @PreAuthorize("hasAnyRole(@authorizedRoles.getGetdownloadrootcertificate())") @GetMapping(value = "/download-root-certificate/{certificateId}") - @Operation(summary = "Added in release-1.3.0, This endpoint will download p7b file for a CA / Intermediate CA certificate along with the trust chain.", - description = "This endpoint, available only for Partner Admin, allows downloading the p7b file for a CA or Intermediate CA certificate. The p7b file contains the full trust chain for the specified certificate.") + @Operation(summary = "This endpoint will download p7b file for a CA / Intermediate CA certificate along with the trust chain based on Certificate Id.", + description = "Avaiable since release-1.3.x. It is configured for the role PARTNER_ADMIN.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), diff --git a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/controller/PolicyManagementController.java b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/controller/PolicyManagementController.java index 5fd8c8cad5..5a80e9cfab 100644 --- a/partner/policy-management-service/src/main/java/io/mosip/pms/policy/controller/PolicyManagementController.java +++ b/partner/policy-management-service/src/main/java/io/mosip/pms/policy/controller/PolicyManagementController.java @@ -302,7 +302,8 @@ public ResponseWrapper> getPoliciesByGroupName(@PathVaria @PreAuthorize("hasAnyRole(@authorizedRoles.getGetpolicygroups())") @GetMapping(value = "/policy-groups") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves details about all active Policy Groups in PMS", description = "This endpoint retrieves details about all active Policy Groups in PMS, which are created and can be deactivated by the Partner Admin. It is configured for all partner type roles and PARTNER_ADMIN.") + @Operation(summary = "This endpoint retrieves details about all active Policy Groups", + description = "Available since release-1.3.x.") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))}) @@ -312,7 +313,8 @@ public ResponseWrapperV2> getPolicyGroups() throws JsonPars @PreAuthorize("hasAnyRole(@authorizedRoles.getGetallpolicies())") @GetMapping(value = "/search/v2") - @Operation(summary = "Added in release-1.3.0, This endpoint retrieves the list of all policies created in the PMS system", description = "This endpoint, available for Partner Admin (Policy Manager) users, retrieves the list of all policies created in the PMS system. It enhances the earlier POST endpoint /policies/search by adding performance improvements and support for sorting by policyGroupName. The endpoint also supports pagination, sorting, and filtering, and is configured for both the POLICYMANAGER and PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint retrieves the list of all Policies", + description = "Available since release-1.3.x. It is configured for both the POLICYMANAGER and PARTNER_ADMIN roles.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -360,7 +362,7 @@ public ResponseWrapperV2> getAllPolicies( @PreAuthorize("hasRole(@authorizedRoles.getPartneradmin()) and hasRole(@authorizedRoles.getPolicymanager())") @PatchMapping(value = "/{policyId}") - @Operation(summary = "Added in release-1.3.0, This endpoint deactivates a policy based on the Policy Id", description = "This endpoint deactivates a policy based on the Policy Id, accessible only by Partner Admin. It checks if any policy requests are associated with the policy: it can be deactivated if there are no requests or if there are rejected requests. It cannot be deactivated if there are approved or pending requests, returning error codes PMS_POL_063 or PMS_POL_064, respectively. This endpoint is configured for both POLICYMANAGER and PARTNER_ADMIN roles.") + @Operation(summary = "Available since release-1.3.x. This endpoint deactivates a policy based on the Policy Id", description = "This endpoint deactivates a policy based on the Policy Id, accessible only by Partner Admin. It checks if any policy requests are associated with the policy: it can be deactivated if there are no requests or if there are rejected requests. It cannot be deactivated if there are approved or pending requests, returning error codes PMS_POL_063 or PMS_POL_064, respectively. This endpoint is configured for both POLICYMANAGER and PARTNER_ADMIN roles.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))), @@ -372,8 +374,8 @@ public ResponseWrapperV2 deactivatePolicy(@PathVari @PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdeactivatepolicygroup())") @PatchMapping(value = "/group/{policyGroupId}") - @Operation(summary = "Added in release-1.3.0, This endpoint allows Partner Admin users to deactivate a Policy Group based on the Policy Group Id.", - description = "This endpoint allows Partner Admin users to deactivate a Policy Group based on the Policy Group Id. The deactivation is allowed only if there are no active or draft policies associated with the group. If there are activated or draft policies, specific error codes (PMS_POL_056 and PMS_POL_069) will be returned. It should be configured for the POLICYMANAGER and PARTNER_ADMIN roles.") + @Operation(summary = "This endpoint allows Partner Admin users to deactivate a Policy Group based on the Policy Group Id.", + description = "Available since release-1.3.x. It is configured for the POLICYMANAGER and PARTNER_ADMIN roles.") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))),