drf-standardized-errors icon indicating copy to clipboard operation
drf-standardized-errors copied to clipboard

ExceptionFormatter does not show in the drf-spectucalar

Open stanhjr opened this issue 1 year ago • 2 comments

https://drf-standardized-errors.readthedocs.io/en/latest/customization.html#change-the-format-of-the-error-response

I defined my formatter and it actually responds when I make a request, but the schema in the swagger is displayed as the default one, and not my custom formatter

how do I fix this?

stanhjr avatar Jan 15 '24 20:01 stanhjr

you'll need to follow the corresponding example for ensuring the new error response format is reflected in your API schema. https://drf-standardized-errors.readthedocs.io/en/latest/openapi.html#custom-error-format

ghazi-git avatar Jan 15 '24 21:01 ghazi-git

thanks

stanhjr avatar Jan 15 '24 21:01 stanhjr