DhroovSankla opened a new pull request, #6090:
URL: https://github.com/apache/fineract/pull/6090

   **Description**
   This PR addresses technical debt within the fineract-mix module by replacing 
manual XML string concatenation and heavyweight DOM manipulation with a native, 
type-safe JAX-RS and JAXB serialization workflow.
   
   Previously, the module manually assembled XBRL reports into raw string text 
blocks, placing a heavy maintenance and memory overhead on the streaming 
pipeline. This refactoring introduces a structured domain DTO graph that allows 
the underlying JAX-RS framework to handle content negotiation, marshalling, and 
streaming natively.
   
   _Note_: During the review of the initial type-safety changes, a discussion 
was raised regarding the historical relevance and potential deprecation of the 
MIX XBRL standards. As noted by the maintainers, module removal is a 
project-wide decision requiring a Fineract DEV mailing list proposal. Because 
deprecation and code debt mitigation are independent concerns, this PR proceeds 
with cleaning up the existing codebase architecture as an immediate 
optimization.
   
   **Changes Left for Review**
   `fineract-mix/build.gradle`: Added `jakarta.xml.bind:jakarta.xml.bind-api` 
dependency to expose native JAXB annotation support to the sub-module.
   
   `MixReportXBRLDocument.java`: Created a brand-new, structured JAXB schema 
object model graph utilizing framework decorators (`@XmlRootElement`, 
`@XmlElement`, nested context/unit DTO definitions) to serve as a clean 
blueprint for report serialization.
   
   `MixReportXBRLBuilder.java`: Implemented `buildDocumentGraph()`, migrating 
the transformation logic from legacy string operations to clean, 
object-oriented graph hydration. Included standard W3C elements processing for 
dynamic context mappings.
   
   `MixReportApiResource.java`: Modernized the `retrieveXBRLReport` endpoint 
signature to return the type-safe `MixReportXBRLDocument` DTO instead of a raw 
string, delegating streaming and content serialization directly to the 
framework.
   
   **Context & Lifecycle Management**
   
   - **Jira Ticke**t: https://issues.apache.org/jira/browse/FINERACT-2670
   
   - **Code Style**: Validated and formatted locally using ./gradlew 
:fineract-mix:spotlessApply.
   
   - **Compilation Check:** Verified clean build execution via ./gradlew 
:fineract-mix:compileJava.
   
   **Checklist**
   
   -  My code follows the code style of this project (Spotless verification 
passed successfully).
   
   -  All new and existing tests pass locally.
   
   -  I have performed a self-review of my own code.


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