Skip to content

OpenAPI: POST /v1/customer 201 response shape drift (bare Customer vs {message, customer} envelope) #316

@CryptoJones

Description

@CryptoJones

Companion to #312. The OpenAPI spec for POST /v1/customer declares the 201 body as $ref: '#/components/schemas/Customer' — a bare row. The controller actually returns:

```json
{ "message": "Customer created.", "customer": { ... } }
```

(No customers plural alias on POST — that wart is GET-only.)

SDK code-gen reading the spec built a client expecting the bare row, same client-side breakage that #312 fixed for the GET endpoint.

Fix: update the 201 schema to describe the envelope; pin with a test.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions