django-rest-framework/rest_framework/schemas
Sigve Sebastian Farstad bf0fbd5df1 Catch APIException in doc generation (#5443)
The documentation generator calls view.get_serializer() in order to
inspect it for documentation generation. However, if get_serializer()
throws an APIException (e.g. PermissionDenied), it doesn't get caught at
the call site, but instead propagates up and aborts the entire view.
With the try/except in this commit, the documentation generator instead
gratiously ignores that particular view and moves on to the next one
instead. Practical concequences of this commit is that the docs no
longer break if any view's get_serializer(..) throws an APIException.
2017-09-25 18:28:36 +02:00
..
__init__.py allow custom authentication and permission classes for docs view 2017-09-25 16:17:25 +02:00
generators.py Allow schema = None. Deprecate exclude_from_schema (#5422) 2017-09-20 11:29:47 +02:00
inspectors.py Catch APIException in doc generation (#5443) 2017-09-25 18:28:36 +02:00
utils.py Refactor schema generation to allow per-view customisation (#5354) 2017-09-14 09:46:34 +01:00
views.py Allow schema = None. Deprecate exclude_from_schema (#5422) 2017-09-20 11:29:47 +02:00