Skip to content

FINERACT-2675: Fix template endpoint#6092

Open
AnvayKharb wants to merge 1 commit into
apache:developfrom
AnvayKharb:fix/templates-api-response-shape
Open

FINERACT-2675: Fix template endpoint#6092
AnvayKharb wants to merge 1 commit into
apache:developfrom
AnvayKharb:fix/templates-api-response-shape

Conversation

@AnvayKharb

@AnvayKharb AnvayKharb commented Jul 5, 2026

Copy link
Copy Markdown

Description

This PR fixes FINERACT-2675 by restoring the template endpoint responses expected by the Mifos Web App.

Problem

After recent backend changes, the Templates API response contract changed:

  • GET /templates returned only template IDs, causing the Name, Entity, and Type columns to appear blank.
  • GET /templates/{id}/template returned a raw template object instead of the wrapper containing template, entities, and types, causing the Edit Template page to fail.

Changes

  • Restore full template data for GET /templates.
  • Restore the response wrapper for GET /templates/{id}/template containing:
    • template
    • entities
    • types
  • Preserve the existing behavior of GET /templates/{id}.
  • Return template entity and type values in the format expected by the Web App.
  • Add regression tests covering:
    • Template list response
    • Template edit response
    • Template retrieval
    • Entity/type mapping
    • Query filtering

Testing

Verified by:

  • Running the relevant unit tests.
  • Running Spotless checks.
  • Confirming the restored API response matches the expected Web App contract.

Fixes FINERACT-2675.

@AnvayKharb AnvayKharb changed the title Restore Templates API response shapes for Web App compatibility FINERACT-2675: Restore template endpoint response compatibility Jul 5, 2026
@AnvayKharb AnvayKharb force-pushed the fix/templates-api-response-shape branch 2 times, most recently from 0ff546b to 36681a5 Compare July 5, 2026 18:08
@AnvayKharb AnvayKharb changed the title FINERACT-2675: Restore template endpoint response compatibility FINERACT-2675: Fix template endpoint Jul 5, 2026
@AnvayKharb AnvayKharb force-pushed the fix/templates-api-response-shape branch from 36681a5 to 6e2c6bc Compare July 5, 2026 18:54
@AnvayKharb AnvayKharb force-pushed the fix/templates-api-response-shape branch from 6e2c6bc to a23df1f Compare July 5, 2026 19:20
@adamsaghy adamsaghy requested a review from vidakovic July 6, 2026 09:23
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.

1 participant