]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commit
:sparkles: Allow using custom 422 validation error and use media type from response...
authorZoltan Papp <divums@users.noreply.github.com>
Fri, 30 Aug 2019 21:46:05 +0000 (00:46 +0300)
committerSebastián Ramírez <tiangolo@gmail.com>
Fri, 30 Aug 2019 21:46:05 +0000 (16:46 -0500)
commit19c53b21c19fc193b070281baa9e585d26cec91c
tree42c23f88730768c13f88c7e72ddbd5ddd72edd6b
parent44d63cd5559dabfd320e12e62608a6e9dd378dac
:sparkles: Allow using custom 422 validation error and use media type from response class in schema (#437)

* media_type of additional responses from the response_class

* Use HTTPValidationError only if a custom one is not defined (Fixes: #429)
fastapi/openapi/utils.py
tests/test_additional_responses_custom_validationerror.py [new file with mode: 0644]
tests/test_additional_responses_default_validationerror.py [new file with mode: 0644]
tests/test_additional_responses_response_class.py [new file with mode: 0644]