-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger fails to load when a schema does not have a default set in one of the fields. #103
Comments
Same Issue here, the problem is not just related on |
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:
The text was updated successfully, but these errors were encountered: