marshmallow-code / apispec

A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
https://apispec.readthedocs.io/
MIT License
1.18k stars 177 forks source link

Date and DateTime with format argument not rendered correctly #938

Open expobrain opened 2 months ago

expobrain commented 2 months ago

When a Marshmallow Date or DateTime has a non-default format argument the output APISpec for the field has a format: null instead of format: date and format: date-time respectively.

The expected behaviour should be the latter as it was happening for versions of apispec before 6.4.

Created a draft PR https://github.com/marshmallow-code/apispec/pull/937 to showcase the fix.