Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace error response schemas #86

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

bglamadrid
Copy link
Collaborator

This PR should solve issue #67

- add new object schema `AppError`
- add new response schema `Error`, referencing `AppError` as response body
- replace response schemas with `Error`
  - `GET /access 403`
  - `GET /access/{resource} 403`
  - `GET /data/people 403`
  - `PUT /data/products 400,403,404`
  - `POST /data/products 400,403`
  - `PATCH /data/products 400,403,404`
  - `DELETE /data/products 403,404`
  - `GET /data/orders 403`
  - `PUT /data/orders 400,403,404`
  - `PUT /data/orders 400,403,404`
  - `POST /data/orders 400,403`
  - `PATCH /data/orders 400,403,404`
  - `DELETE /data/orders 403,404`
  - `POST /data/orders/confirmation 403`
  - `POST /data/orders/rejection 403`
  - `POST /data/orders/completion 403`
  - `GET /data/users 403`
  - `PUT /data/users 400,403,404`
  - `POST /data/users 400,403`
  - `PATCH /data/users 400,403,404`
  - `DELETE /data/users 403,404`
  - `GET /data/images 403`
  - `PUT /data/images 400,403,404`
  - `POST /data/images 400,403`
  - `PATCH /data/images 400,403,404`
  - `DELETE /data/images 403,404`
  - `GET /data/user_roles 403`
  - `POST /public/checkout 400,403`
  - `POST /public/checkout/validate 400,404`
  - `POST /public/receipt/{code} 404`
  - `GET /data/product_categories 403`
  - `PUT /data/product_categories 400,403,404`
  - `POST /data/product_categories 400,403`
  - `PATCH /data/product_categories 400,403,404`
  - `DELETE /data/product_categories 403,404`
  - `GET /account/profile 403`
  - `PUT /account/resource 400,403`
  - `POST /public/register 400`
  - `PUT /data/shippers 400,403,404`
  - `POST /data/shippers 400,403`
  - `PATCH /data/shippers 400,403,404`
  - `DELETE /data/shippers 403,404`
  - `PUT /data/product_lists 400,403,404`
  - `POST /data/product_lists 400,403`
  - `PATCH /data/product_lists 400,403,404`
  - `DELETE /data/product_lists 403,404`
  - `PUT /data/product_list_contents 400,403,404`
  - `POST /data/product_list_contents 400,403`
  - `DELETE /data/product_list_contents 403,404`
- remove now-unused response schemas
  - `Forbidden`
  - `NotFound`
  - `BadRequestBody`
- increment patch version
  this is yet another breaking change, but no new release is out yet
@bglamadrid bglamadrid linked an issue Jul 25, 2024 that may be closed by this pull request
3 tasks
@bglamadrid bglamadrid changed the title chore!: replace error response schemas Replace error response schemas Jul 25, 2024
@bglamadrid bglamadrid merged commit ee2eaf0 into main Jul 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce generic error response schema
1 participant