Override 403 response and make it 400 instead. Is this possible?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2021
07:57 PM
10-24-2021
07:57 PM
Override 403 response and make it 400 instead. Is this possible?
403:
description: An error occurred.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
default: 400
message:
type: string
default: An error occurred.
So far this lead me to nothing. Help! Thanks!
Labels:
- Labels:
-
Swagger Editor
-
Swagger UI
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021
03:21 AM
10-26-2021
03:21 AM
Is there a reason you can't add the `400` status code directly?
400: # <----- 400 status
description: An error occurred.
content:
application/json:
schema:
type: object
properties:
code:
type: integer
default: 400
message:
type: string
default: An error occurred.
Or perhaps you could expand on what use case you have? For example where do you see the `403` when you want `400`?
