Add EXCLUDED_MEDIA_TYPES setting

Closes #158.
This commit is contained in:
Cristi Vîjdea
2018-08-08 00:56:18 +03:00
parent 5cd642c9a0
commit a5eb3dfa91
4 changed files with 14 additions and 1 deletions
+1
View File
@@ -16,6 +16,7 @@ Changelog
*NOTE:* in order for this to work, you will have to add the new ``drf_yasg.inspectors.SerializerMethodFieldInspector``
to your ``DEFAULT_FIELD_INSPECTORS`` array if you changed it from the default value
- **ADDED:** added ``EXCLUDED_MEDIA_TYPES`` setting for controlling ``produces`` MIME type filtering (:issue:`158`)
- **IMPROVED:** updated ``swagger-ui`` to version 3.18.0
- **IMPROVED:** added ``operation_summary`` and ``deprecated`` arguments to ``swagger_auto_schema``
(:issue:`149`, :issue:`173`)
+8
View File
@@ -105,6 +105,14 @@ Paginator inspectors given to :func:`@swagger_auto_schema <.swagger_auto_schema>
Swagger document attributes
===========================
EXCLUDED_MEDIA_TYPES
--------------------
A list of keywords for excluding MIME types from ``Operation.produces``. Any MIME type string which includes one of
the substrings in this list will be prevented from appearing in a ``produces`` array in the Swagger document.
**Default**: :python:`['html']`
.. _default-swagger-settings:
DEFAULT_INFO