Align frontend with updated OpenAPI schema and PATCH operation #13

Merged
aetos merged 3 commits from fixes-for-pipeline-type-and-bank into main 2026-07-30 18:49:57 +00:00
Owner

Summary

Align frontend with updated OpenAPI schema (rename formatbank, add pipeline) and introduce a dedicated PATCH operation for partial updates in react-openapi.

Changes

react-openapi: new patch operation support

  • Add patch to ResourceConfig.operations type
  • Separate PUT/PATCH detection in resource-config transformer
  • update() now always calls PUT; new patch() method returned conditionally when spec defines PATCH
  • Admin form still uses PUT for full replacements

Fetch Request custom pages: schema alignment

  • Rename formatbank in create form fields and TypeScript models (FileSource, EmailSource)
  • Add pipeline field to create form and FetchRequestCreate model
  • Export PipelineType from barrel index

Fetch Request retry: use PATCH

  • Retry handler now calls patch(id, { status: "pending" }) instead of the generic update()
  • Removes useMutation wrapper; uses simple local retrying state for loading

Fix Account display in detail page

  • Resolve FK displayFormat target in detail field rendering (was always using fetch-request format)
  • Fix page title to use applyDisplayFormat with resolved FK objects instead of non-existent account_name
  • Move useMemo before early returns to fix hooks ordering violation crash

Testing

  • Custom fetch request create form includes bank (select) and pipeline (select) fields
  • Retry sends PATCH instead of PUT — no more 500 errors
  • Detail page shows proper account name instead of
## Summary Align frontend with updated OpenAPI schema (rename `format` → `bank`, add `pipeline`) and introduce a dedicated `PATCH` operation for partial updates in react-openapi. ## Changes ### react-openapi: new `patch` operation support - Add `patch` to `ResourceConfig.operations` type - Separate PUT/PATCH detection in resource-config transformer - `update()` now always calls PUT; new `patch()` method returned conditionally when spec defines PATCH - Admin form still uses PUT for full replacements ### Fetch Request custom pages: schema alignment - Rename `format` → `bank` in create form fields and TypeScript models (`FileSource`, `EmailSource`) - Add `pipeline` field to create form and `FetchRequestCreate` model - Export `PipelineType` from barrel index ### Fetch Request retry: use PATCH - Retry handler now calls `patch(id, { status: "pending" })` instead of the generic `update()` - Removes `useMutation` wrapper; uses simple local `retrying` state for loading ### Fix Account display in detail page - Resolve FK displayFormat target in detail field rendering (was always using fetch-request format) - Fix page title to use `applyDisplayFormat` with resolved FK objects instead of non-existent `account_name` - Move `useMemo` before early returns to fix hooks ordering violation crash ## Testing - Custom fetch request create form includes `bank` (select) and `pipeline` (select) fields - Retry sends `PATCH` instead of `PUT` — no more 500 errors - Detail page shows proper account name instead of `—`
aetos added 3 commits 2026-07-30 18:49:49 +00:00
- Add patch to ResourceConfig.operations type
- Separate PUT and PATCH detection in resource-config transformer
- update() now always calls PUT; new patch() method available conditionally when spec defines PATCH
- Rename format→bank in CREATE_FIELDS and TypeScript models
- Add pipeline field to create form and FetchRequestCreate model
- Export PipelineType from index barrel
- Use new patch() method for retry instead of generic update()
- Import useAppContext and applyDisplayFormat for target resource resolution
- Fix detail field rendering to use FK target resource displayFormat
- Fix title to resolve FK objects via displayFormat instead of non-existent account_name
- Move displayTitle useMemo before early returns to avoid hook ordering violation
aetos merged commit 885ccdcfa7 into main 2026-07-30 18:49:57 +00:00
aetos deleted branch fixes-for-pipeline-type-and-bank 2026-07-30 18:49:57 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: apps/khata-ui#13
No description provided.