You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update TimeDelta field type to float for Marshmallow v4
In Marshmallow v3.17.0, up until v4, the `TimeDelta` field could be serialized into either an integer or a float, depending on user specification of the field. [1] In the case the user set `serialization_type=float`, apispec would generate the wrong JSON type in the API docs. With Marshmallow v4, this was removed and `TimeDelta` fields *always* serialize to floats, in which case apispec always generates the wrong docs. This commit updates the default field mapping anticipating Marshmallow v4's float serialization, with some additional support added for <v4 by looking for the deprecated and removed `serialization_type` attribute on the field object. [1] https://marshmallow.readthedocs.io/en/stable/marshmallow.fields.html#marshmallow.fields.TimeDelta
0 commit comments