Commit dde72cc
fix: separating create customer from customer response schemas (#142)
### TL;DR
Refactored customer schema definitions to use a consistent approach for
both creation and update operations.
### What changed?
- Created new schema definitions for customer creation requests:
- `CustomerCreateRequest` as a base schema
- `IndividualCustomerCreateRequest` and `BusinessCustomerCreateRequest`
extending the base schema
- `CustomerCreateRequestOneOf` to handle the oneOf relationship between
customer types
- Replaced the separate update schemas (`IndividualCustomerUpdate` and
`BusinessCustomerUpdate`) with the same creation request schemas
- Updated API endpoints to reference the new schema definitions:
- Changed POST `/customers` to use `CustomerCreateRequestOneOf`
- Changed PATCH `/customers/{customerId}` to use
`CustomerCreateRequestOneOf`
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>1 parent 1df8211 commit dde72cc
19 files changed
Lines changed: 430 additions & 349 deletions
File tree
- mintlify
- openapi
- components/schemas/customers
- paths/customers
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments