SamaSVM commented on PR #6383:
URL: https://github.com/apache/fineract/pull/6383#issuecomment-6364570802

   I dug deeper and found the actual cause — the red api-compatibility-check is 
real, not stale/unrelated.
   
   Charge is a JPA entity, but it leaks into the generated OpenAPI spec through 
LoanProductData.allowAttributeOverrides → 
LoanProductConfigurableAttributes.loanProduct → LoanProduct.charges → Charge. 
swagger-core builds schema properties from any public bean getter, so 
isAllowedClientChargeTime() became the allowedClientChargeTime property on the 
Charge schema, which is reachable from 8 endpoints (/v1/provisioningcriteria*, 
/v1/loanproducts/{id}/productmix, /v1/search/*, 
/v1/entityDatatableChecks/template). Removing the getter dropped that property, 
and swagger-brake flagged it as R014 (response attribute removed) on all 8.
   
   At runtime this is genuinely dead code: Fineract serializes responses with 
Gson by field, not by getter, so this boolean never actually appeared in any 
JSON response. But the spec is part of the documented contract, and 
fineract-client is generated from it — allowedClientChargeTime exists there as 
a real public field on the Charge model.
   
   Restoring Charge.isAllowedClientChargeTime() and 
ChargeTimeType.isAllowedClientChargeTime() (its only caller) to avoid breaking 
the documented contract. Keeping the removal of 
ShareAccountChargeWithoutMandatoryFieldException — confirmed it was never 
instantiated and doesn't affect the spec.


-- 
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]

Reply via email to