Open zanpeeters opened 3 years ago
Same Issue here, the problem is not just related on @responds
but @accepts
raises the same error.
I described a quick "fix" (not really I guess...) for another issue ( #86 ), which somehow also seems to solve this issue here. I am not sure if this is the correct way to go, any ideas? Please be kind 0.0, it was just a 30 minute hacky thing and I have no idea what else might be related to that.
Bump. also have the same issue here since the last update on marshmallow library.
bump, got the same issue as well
Swagger fails to load when a marshmallow schema loaded with
@responds
contains fields without thedefault=
parameter. If I usefields.String(default=None)
in the example below, Swagger loads normally. This started happening after I upgraded flask-restx to v0.3.0.This problem seems to come from the Models section of the Swagger docs. If I remove
api=api
in@responds
, Swagger loads without error, but the Models section is missing.In
flask_accepts/utils.py
:where
value.default
is amarshmallow.missing
object.json.dumps
does not know how to serialize that object, see traceback output below.Tested with:
Example
(Note: I cloned swagger-ui from their github repo into ~/Swagger)
Error in the browser:
Output from Flask: