Ignore None return from get_operation
This commit is contained in:
+8
-2
@@ -3,6 +3,14 @@ Changelog
|
|||||||
#########
|
#########
|
||||||
|
|
||||||
|
|
||||||
|
*********
|
||||||
|
**1.7.4**
|
||||||
|
*********
|
||||||
|
|
||||||
|
*Release date: May 14, 2018*
|
||||||
|
|
||||||
|
- **FIXED:** ignore ``None`` return from ``get_operation`` to avoid empty ``Path`` objects in output
|
||||||
|
|
||||||
*********
|
*********
|
||||||
**1.7.3**
|
**1.7.3**
|
||||||
*********
|
*********
|
||||||
@@ -11,7 +19,6 @@ Changelog
|
|||||||
|
|
||||||
- **FIXED:** views whose ``__init__`` methods throw exceptions will now be ignored during endpoint enumeration
|
- **FIXED:** views whose ``__init__`` methods throw exceptions will now be ignored during endpoint enumeration
|
||||||
|
|
||||||
|
|
||||||
*********
|
*********
|
||||||
**1.7.2**
|
**1.7.2**
|
||||||
*********
|
*********
|
||||||
@@ -21,7 +28,6 @@ Changelog
|
|||||||
- **FIXED:** fixed generation of default ``SECURITY_REQUIREMENTS`` to match documented behaviour
|
- **FIXED:** fixed generation of default ``SECURITY_REQUIREMENTS`` to match documented behaviour
|
||||||
- **FIXED:** ordering of ``SECURITY_REQUIREMENTS`` and ``SECURITY_DEFINITIONS`` is now stable
|
- **FIXED:** ordering of ``SECURITY_REQUIREMENTS`` and ``SECURITY_DEFINITIONS`` is now stable
|
||||||
|
|
||||||
|
|
||||||
*********
|
*********
|
||||||
**1.7.1**
|
**1.7.1**
|
||||||
*********
|
*********
|
||||||
|
|||||||
@@ -324,7 +324,9 @@ class OpenAPISchemaGenerator(object):
|
|||||||
if not public and not self._gen.has_view_permissions(path, method, view):
|
if not public and not self._gen.has_view_permissions(path, method, view):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
operations[method.lower()] = self.get_operation(view, path, prefix, method, components, request)
|
operation = self.get_operation(view, path, prefix, method, components, request)
|
||||||
|
if operation is not None:
|
||||||
|
operations[method.lower()] = operation
|
||||||
|
|
||||||
if operations:
|
if operations:
|
||||||
# since the common prefix is used as the API basePath, it must be stripped
|
# since the common prefix is used as the API basePath, it must be stripped
|
||||||
|
|||||||
Reference in New Issue
Block a user