pluggable typemapper
Description:
Added pluggable type mapper, that allows to provide configs in JSON files.
Example:
{
"instrumentations": [
{
"entityType": "org.opengroup.osdu.core.common.model.legal.LegalTag",
"fieldNameCustomMapping": {
"countryOfOrigin": "COO",
"createdDate": "created"
},
"fieldTypeCustomMapping": {
"created": "shaded.osm.com.google.cloud.Timestamp",
"expirationDate": "shaded.osm.com.google.cloud.Timestamp",
"isValid": "java.lang.Boolean"
},
"identityTranslator": {
"getIdMethod": "getId",
"setIdMethod": "setId",
"keyClass": "java.lang.Long"
},
"keyFields": ["id"]
}
]
}
How to test:
Unit tests, and Legal service was tested with it https://community.opengroup.org/osdu/platform/security-and-compliance/legal/-/pipelines/275905
Changes include:
-
Refactor (a non-breaking change that improves code maintainability). -
Bugfix (a non-breaking change that solves an issue). -
New feature (a non-breaking change that adds functionality). -
Breaking change (a change that is not backward-compatible and/or changes current functionality).
Changes in:
-
CI
Dev Checklist:
-
Added Unit Tests, wherever applicable. -
Updated the Readme, if applicable. -
Existing Tests pass -
Verified functionality locally -
Self Reviewed my code for formatting and complex business logic.
Other comments:
Any comments to approvers here
Edited by Rustam Lotsmanenko (EPAM)