Commit c721a5a
docs(openapi): fix POST /v1/customer 201 response-shape drift (#317)
Companion to #312 (which fixed the same drift on the GET endpoint).
The OpenAPI spec declared the POST 201 body as a bare Customer
(`$ref: '#/components/schemas/Customer'`). The controller actually
wraps the row in a `{message, customer}` envelope (no `customers`
plural alias here — that wart is GET-only).
SDK generators reading the spec built clients that expected the
bare row and then failed to find the fields at runtime because
they live one level deeper inside the envelope. Same client-side
breakage; same fix here.
Pin the new shape with a test in `tests/api/openapi.test.js`
mirroring the GET-endpoint assertion.
Co-authored-by: Aaron K. Clark <akclark@thenetwerk.net>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 09e9f5c commit c721a5a
2 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
698 | 712 | | |
699 | 713 | | |
700 | 714 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| |||
0 commit comments