First draft of auto-Swagger

This commit is contained in:
jtc42 2020-01-02 21:33:50 +00:00
parent 99d0d0055e
commit 6d7921e8b4
8 changed files with 205 additions and 21 deletions

View file

@ -2,7 +2,7 @@
import flask
import marshmallow
_MARSHMALLOW_VERSION_INFO = tuple(
MARSHMALLOW_VERSION_INFO = tuple(
[int(part) for part in marshmallow.__version__.split(".") if part.isdigit()]
)
@ -32,7 +32,7 @@ class Schema(marshmallow.Schema):
"""
if many is sentinel:
many = self.many
if _MARSHMALLOW_VERSION_INFO[0] >= 3:
if MARSHMALLOW_VERSION_INFO[0] >= 3:
data = self.dump(obj, many=many)
else:
data = self.dump(obj, many=many).data