Fastapi: [QUESTION] Custom Error Handling Broke Automatic Documentation.

Created on 6 Apr 2020  路  2Comments  路  Source: tiangolo/fastapi

Custom Error Handling Broke Automatic Documentation.

For our requirements I made the following changes

  • [ ] I updated the input validation exception code from 422 to 400.
  • [ ] I also modified the default Json error output.

My issue

My FastAPI generated automatic documentation is sill showing default error code and error message format.

My Question

Is it possible to update the API documentation to reflect my change like the correct error code and the right error output format?

question

All 2 comments

The current way to do it is modifying the generated OpenAPI https://fastapi.tiangolo.com/advanced/extending-openapi/

Yeah! It worked for me. Thanks!

Was this page helpful?
0 / 5 - 0 ratings