Skip to content

Conversation

@longvo-cv
Copy link

CIRC-2292: Implement Request Anonymization API
Summary
Adds a POST endpoint to anonymize closed circulation requests in bulk, removing personally identifiable information from request records.
Changes

New Endpoint: POST /circulation/requests/anonymize
Validation: Verifies requests have closed status before anonymization
Delegate to Storage: Calls mod-circulation-storage for actual anonymization
Tests: Unit and integration tests for the new functionality
Schema: Added request/response JSON schemas and RAML definitions

@CLAassistant
Copy link

CLAassistant commented Nov 6, 2025

CLA assistant check
All committers have signed the CLA.

@longvo-cv longvo-cv requested review from roman-barannyk and yuntianhu and removed request for roman-barannyk November 6, 2025 18:30
@yuntianhu
Copy link
Contributor

could you make correct those errors, please.

ERROR: api-schema-lint: ramls/schema/anonymization-result.json: Missing top-level "description".
ERROR: api-schema-lint: ramls/schema/anonymize-circulation-request.json: Missing top-level "description".
ERROR: api-schema-lint: ramls/schema/anonymize-circulation-request.json: Missing "description" for: includeCirculationLogs, requestIds
ERROR: api-schema-lint: There were processing errors. See list above.

@yuntianhu
Copy link
Contributor

please make sure the test coverage for your new code is greater than 80%

@yuntianhu yuntianhu marked this pull request as draft November 10, 2025 14:03
Copy link
Contributor

@yuntianhu yuntianhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you mirror loan anon. raml file, please.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add top level description, please. thank you

import org.folio.circulation.domain.RequestStatus;
import org.folio.circulation.support.logging.Logging;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space, please


// Get includeCirculationLogs parameter (default to true)
boolean includeCirculationLogs = body.getBoolean("includeCirculationLogs", true);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space here, please

Copy link
Contributor

@yuntianhu yuntianhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the end point should be /request-anonymization/ instead of circulation/request-anonymization/

Copy link
Contributor

@yuntianhu yuntianhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
52.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@yuntianhu yuntianhu closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants