From 887b53300a0c9f32613aa569d83d6089dc9d9513 Mon Sep 17 00:00:00 2001 From: Cristi Vijdea Date: Mon, 1 Apr 2019 03:26:05 +0300 Subject: [PATCH] Add 1.15.0 changelog --- docs/changelog.rst | 14 ++++++-------- src/drf_yasg/inspectors/base.py | 1 - src/drf_yasg/utils.py | 3 +-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5aea1a32..c975fd8b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,15 +7,13 @@ Changelog **1.15.0** ********** -*Release date: Mar 04, 2019* +*Release date: Apr 01, 2019* -- **IMPROVED:** updated ``swagger-ui`` to version 3.21.0 -- **FIXED:** implicit ``ref_name`` collisions will now throw an exception -- **FIXED:** ``RecursiveField`` will now also work as a child of ``ListSerializer`` (:pr:`321`) -- **FIXED:** fixed ``minLength`` and ``maxLength`` for ``ListSerializer`` and ``ListField`` -- **FIXED:** the ``items`` property of ``Schema``, ``Parameter`` and ``Items`` objects was renamed to ``items_``; this - is a *mildly breaking change* and was needed to fix the collision with the ``items`` method of ``dict`` (:pr:`308`) -- **REMOVED:** the ``get_summary`` and ``get_description`` methods have been removed (previously deprecated in 1.12.0) +- **ADDED:** added ``is_list_view`` and ``has_list_response`` extension points to ``SwaggerAutoSchema`` (:issue:`331`) +- **IMPROVED:** updated ``swagger-ui`` to version 3.22.0 +- **IMPROVED:** updated ``ReDoc`` to version 2.0.0-rc.4 +- **FIXED:** ``ListModelMixin`` will now always be treated as a list view (:issue:`306`) +- **FIXED:** non-primtive values in field ``choices`` will now be handled properly (:issue:`340`) ********** **1.14.0** diff --git a/src/drf_yasg/inspectors/base.py b/src/drf_yasg/inspectors/base.py index c5b7e416..c307a66d 100644 --- a/src/drf_yasg/inspectors/base.py +++ b/src/drf_yasg/inspectors/base.py @@ -378,7 +378,6 @@ def get_operation(self, operation_keys): """ raise NotImplementedError("ViewInspector must implement get_operation()!") - # methods below provided as default implementations for probing inspectors def is_list_view(self): """Determine whether this view is a list or a detail view. The difference between the two is that detail views depend on a pk/id path parameter. Note that a non-detail view does not necessarily imply a list diff --git a/src/drf_yasg/utils.py b/src/drf_yasg/utils.py index 099bbb7c..075ba609 100644 --- a/src/drf_yasg/utils.py +++ b/src/drf_yasg/utils.py @@ -227,7 +227,6 @@ def is_list_view(path, method, view): # a detail action is surely not a list route return False - # for GenericAPIView, if it's a list view then it should be a list view if isinstance(view, ListModelMixin): return True @@ -446,7 +445,7 @@ def field_value_to_representation(field, value): """Convert a python value related to a field (default, choices, etc.) into its OpenAPI-compatible representation. :param serializers.Field field: field associated with the value - :param obj value: value + :param object value: value :return: the converted value """ value = field.to_representation(value)