refactor(history): consolidate /diff and /version-summary into /history endpoint
requested to merge gunapavan/corpus-server-app:refactor/consolidate-record-history-endpoints into main
Summary
- Removed
GET /history/record/{id}/diff— absorbed into enhanced/history - Removed
GET /history/record/{id}/version-summary— absorbed into enhanced/history - Enhanced
GET /history/record/{id}/historywith 3 new optional query params:-
from_version+to_version— when both provided, includes diff between those versions in response -
include_summary— when true, includes version summary counters in response
-
- Added
RecordHistoryResponseschema withhistory,diff, andsummaryfields for a unified response structure - Service methods and schemas kept unchanged — only the endpoint layer changed
Test plan
-
GET /history/record/{id}/history→{ "history": [...], "diff": null, "summary": null } -
GET /history/record/{id}/history?include_summary=true→summarypopulated with version counters -
GET /history/record/{id}/diff→404 Not Found -
GET /history/record/{id}/version-summary→404 Not Found
Checklist
-
Code follows project API guidelines -
Documentation is updated (OpenAPI docs reflect removed endpoints and new params) -
Code adheres to project coding standards
Closes #122