MOSIP-41353: Remove unused config files and properties in MASTERDATA module.#1348
MOSIP-41353: Remove unused config files and properties in MASTERDATA module.#1348SradhaMohanty5899 wants to merge 2 commits intomosip:developfrom
Conversation
Signed-off-by: Sradha Mohanty <mohantysradha10@gmail.com>
WalkthroughRemoved unused imports from multiple masterdata test classes and a utility; deleted or stripped several resource/config files (properties and JSON) under api-test/resources, including a large adminQueries.properties file. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
api-test/src/main/resources/config/application.properties (1)
1-21:⚠️ Potential issue | 🟠 MajorRemove unused endpoint properties and correct AI summary discrepancy.
The endpoint path properties defined in lines 2-21 (
encryptionPath,internalEncryptionPath,encodePath,decodePath,decryptPath,encodeFilePath,decodeFilePath,validateSignaturePath,splitEncryptedData,masterSchemaURL,fetchLocationData,fetchTitle,fetchZoneCode,fetchZone,fetchLocationHierarchyLevels,fetchLocationHierarchy,leafZoneUrl, andzoneCode_to_beMapped) are not referenced anywhere in the codebase and should be removed as part of this cleanup. Additionally, the AI summary stating the file "now retains only demoAppVersion" is inaccurate—these properties remain in the file. Align the final state with the PR objective to remove unused MASTERDATA module properties.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/config/application.properties` around lines 1 - 21, Delete the unused MASTERDATA-related properties listed (encryptionPath, internalEncryptionPath, encodePath, decodePath, decryptPath, encodeFilePath, decodeFilePath, validateSignaturePath, splitEncryptedData, masterSchemaURL, fetchLocationData, fetchTitle, fetchZoneCode, fetchZone, fetchLocationHierarchyLevels, fetchLocationHierarchy, leafZoneUrl, and zoneCode_to_beMapped) from application.properties, and update the file header/comment to accurately state that these MASTERDATA endpoint properties have been removed (fixing the incorrect AI summary about retaining demoAppVersion). Ensure no other config keys are unintentionally removed and commit the cleaned file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api-test/src/main/resources/config/application.properties`:
- Line 22: Remove the unused property demoAppVersion from the
application.properties file: delete the line "demoAppVersion=1.2.1-SNAPSHOT" and
then verify there are no references to demoAppVersion anywhere in the codebase
(search for "demoAppVersion") before committing; if any code or build scripts
reference it, either remove those references or migrate them to an existing
version property.
---
Outside diff comments:
In `@api-test/src/main/resources/config/application.properties`:
- Around line 1-21: Delete the unused MASTERDATA-related properties listed
(encryptionPath, internalEncryptionPath, encodePath, decodePath, decryptPath,
encodeFilePath, decodeFilePath, validateSignaturePath, splitEncryptedData,
masterSchemaURL, fetchLocationData, fetchTitle, fetchZoneCode, fetchZone,
fetchLocationHierarchyLevels, fetchLocationHierarchy, leafZoneUrl, and
zoneCode_to_beMapped) from application.properties, and update the file
header/comment to accurately state that these MASTERDATA endpoint properties
have been removed (fixing the incorrect AI summary about retaining
demoAppVersion). Ensure no other config keys are unintentionally removed and
commit the cleaned file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 46873673-879c-4fe8-b1ea-631f23c4e6de
📒 Files selected for processing (21)
api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/DeleteWithParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithQueryParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithPathParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithQueryParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithFormDataAndFile.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithPathParamsAndBody.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParam.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimpleDelete.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePost.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePostForAutoGenId.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePut.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.javaapi-test/src/main/java/io/mosip/testrig/apirig/masterdata/utils/MasterDataUtil.javaapi-test/src/main/resources/config/UmcValidationApis.propertiesapi-test/src/main/resources/config/adminQueries.propertiesapi-test/src/main/resources/config/application.propertiesapi-test/src/main/resources/config/bioValueEncryptionTemplate.jsonapi-test/src/main/resources/config/bulkUpload.jsonapi-test/src/main/resources/config/mispPolicy.json
💤 Files with no reviewable changes (20)
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithPathParamsAndBody.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePut.java
- api-test/src/main/resources/config/adminQueries.properties
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePostForAutoGenId.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithFormDataAndFile.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/DeleteWithParam.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithParam.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParam.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithQueryParam.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimpleDelete.java
- api-test/src/main/resources/config/UmcValidationApis.properties
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePost.java
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/utils/MasterDataUtil.java
- api-test/src/main/resources/config/bulkUpload.json
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithQueryParam.java
- api-test/src/main/resources/config/bioValueEncryptionTemplate.json
- api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithPathParam.java
- api-test/src/main/resources/config/mispPolicy.json
Signed-off-by: Sradha Mohanty <mohantysradha10@gmail.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
api-test/src/main/resources/config/application.properties (1)
20-21:⚠️ Potential issue | 🟠 MajorRestore the required
demoAppVersionproperty.This cleanup appears to have removed
demoAppVersionfromapplication.properties, but that property is required in this module and should not be deleted as part of unused-config cleanup. Please add it back before merging.Based on learnings,
demoAppVersioninapi-test/src/main/resources/config/application.propertiesis required and intentionally kept.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@api-test/src/main/resources/config/application.properties` around lines 20 - 21, Restore the missing demoAppVersion property in application.properties by re-adding the demoAppVersion key with its expected value (e.g., the module's default like 1.0.0 or the value used elsewhere), ensuring the application reads demoAppVersion again; update the file where the cleanup removed it and verify any code referencing demoAppVersion (search for "demoAppVersion") still resolves correctly so the property isn't removed by future cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@api-test/src/main/resources/config/application.properties`:
- Around line 20-21: Restore the missing demoAppVersion property in
application.properties by re-adding the demoAppVersion key with its expected
value (e.g., the module's default like 1.0.0 or the value used elsewhere),
ensuring the application reads demoAppVersion again; update the file where the
cleanup removed it and verify any code referencing demoAppVersion (search for
"demoAppVersion") still resolves correctly so the property isn't removed by
future cleanup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d201713e-79a1-4d60-bbea-c11e62823241
📒 Files selected for processing (1)
api-test/src/main/resources/config/application.properties
Performed cleanup of unused configuration files and properties in the MASTERDATA API Test Rig module.
Summary by CodeRabbit