Clean up and release 1.1.3

This commit is contained in:
Cristi Vîjdea
2018-01-02 22:07:33 +01:00
parent f81795d745
commit 68b0dda0b9
6 changed files with 99 additions and 59 deletions
+8
View File
@@ -3,6 +3,14 @@ Changelog
#########
*********
**1.1.3**
*********
- **FIXED:** schema view cache will now always ``Vary`` on the ``Cookie`` and ``Authentication`` (the
``Vary`` header was previously only added if ``public`` was set to ``True``) - this fixes issues related to Django
authentication in ``swagger-ui`` and ``CurrentUserDefault`` values in the schema
*********
**1.1.2**
*********
+27
View File
@@ -58,3 +58,30 @@ See the command help for more advanced options:
usage: manage.py generate_swagger [-h] [--version] [-v {0,1,2,3}]
... more options ...
.. Note::
The :ref:`DEFAULT_INFO <default-swagger-settings>` setting must be defined when using the ``generate_swagger``
command. For example, the :ref:`README quickstart <readme-quickstart>` code could be modified as such:
In ``settings.py``:
.. code:: python
SWAGGER_SETTINGS = {
'DEFAULT_INFO': 'import.path.to.urls.api_info',
}
In ``urls.py``:
.. code:: python
api_info = openapi.Info(
title="Snippets API",
... other arguments ...
)
schema_view = get_schema_view(
# the info argument is no longer needed here as it will be picked up from DEFAULT_INFO
... other arguments ...
)
+2
View File
@@ -94,6 +94,8 @@ Paginator inspectors given to :func:`@swagger_auto_schema <.swagger_auto_schema>
Swagger document attributes
===========================
.. _default-swagger-settings:
DEFAULT_INFO
------------