rymghosn opened a new pull request, #6141:
URL: https://github.com/apache/fineract/pull/6141
Groups and Centers created without an explicit `externalId` were left with a
blank/null value instead of one being generated, unlike Client
creation which already auto-generates one. Separately, the `externalId`
field was missing from the `CenterData` domain model's accessors and
from the Swagger schemas for the Centers/Groups APIs, so it wasn't
reliably surfaced in responses or generated API docs/clients.
This PR (https://issues.apache.org/jira/browse/FINERACT-2692):
- Adds the missing `getExternalId()` accessor to `CenterData`.
- Documents `externalId` in the `CentersApiResourceSwagger` and
`GroupsApiResourceSwagger` response schemas.
- Generates a random `externalId` in
`GroupingTypesWritePlatformServiceJpaRepositoryImpl#createGroupingType` when
none is supplied on
Group/Center creation, consistent with Client behavior.
- Makes the read paths in `AllGroupTypesDataMapper` and
`CenterReadPlatformServiceImpl` fall back to a non-null placeholder when
reading a
blank `externalId` from existing data.
## Test plan
Added integration test coverage:
-
`CenterIntegrationTest#testCenterCreationWithoutExternalIdGeneratesOne`
- `GroupTest#testGroupCreationWithoutExternalIdGeneratesOne`
- `GroupTest#testGroupCreationWithExternalIdIsPersisted`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]