feat(py): M5.3 — Python /api/* shadow endpoints #18
Reference in New Issue
Block a user
Delete Branch "feat/go-m5-3-python-api-shadow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
app.py:/api/version,/api/adults,/api/juniors,/api/payments_unwrap_view_model_for_api()helper expands pre-serialised JSON string fields and renamesmonth_labels_json→month_labels,raw_payments_json→raw_paymentsto match the Go wire contract (builders and templates untouched)test_app.pyasserting top-level key sets match the Go API schemas and that unwrapped fields are objects, not stringsTest plan
make test— 31 tests pass (19 pre-existing + 4 new API tests + 8 others)make web-py→curl -s localhost:5001/api/adults | jq 'keys'— 14 keys, no_jsonsuffixcurl -s localhost:5001/api/adults | jq '.member_data | type, .month_labels | type, .raw_payments | type'→ all"object"/adults,/juniors,/paymentsHTML pages still render normallyNotes
Raw transaction row shapes in
raw_payments/unmatchedwill diverge from Go'sRawTransactionstruct (column-header keys vs snake_case). This is the expected M5.4 finding — do not fix here.🤖 Generated with Claude Code