Skip to content

MX-225: Self-Service API Fields Filtering Defect Fix#101

Merged
IOhacker merged 1 commit intoopenMF:developfrom
DeathGun44:MX-225
Apr 7, 2026
Merged

MX-225: Self-Service API Fields Filtering Defect Fix#101
IOhacker merged 1 commit intoopenMF:developfrom
DeathGun44:MX-225

Conversation

@DeathGun44
Copy link
Copy Markdown
Contributor

Overview

Fixes the defect matching MX-225 where Self-Service APIs return stripped, empty JSON objects (returning {}) for nested collections when filtering queries using the ?fields= parameter.

Root Cause

When omitting the list of supported parameters (_DATA_PARAMETERS) during serialization, Gson defaults to an aggressive InclusionStrategy which improperly strips all inner properties of child arrays unless explicitly requested.

Changes Made

  • API Fix: explicitly injected ClientApiConstants.CLIENT_ACCOUNTS_DATA_PARAMETERS into SelfClientsApiResource#retrieveAssociatedAccounts during the serialization step. This securely enforces an ExclusionStrategy preserving internal property states.
  • Unit Testing: Included Mockito assertions verifying correct strategy enforcement.
  • Integration Validation: Added a rigorous Testcontainer-backed E2E test (SelfClientsApiIntegrationTest) orchestrating live Savings Applications to statically guarantee inclusive & exclusive REST JSON filtering outputs precisely match core Fineract behavior.

…fect

Signed-off-by: DeathGun44 <krishnamewara841@gmail.com>
Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Lgtm

@IOhacker IOhacker merged commit 557073e into openMF:develop Apr 7, 2026
3 checks passed
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.

2 participants