-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
If the swagger_info attribute contains a datetime object in an example definition, the default JSON serializer will fail for datetime types.
ex)
TypeError: datetime.datetime(2021, 11, 14, 1, 34, 26, tzinfo=datetime.timezone(datetime.timedelta(0, 720))) is not JSON serializable
https://swagger.io/docs/specification/data-models/data-types/#string
| swagger_info = json.dumps(swagger_info) |
Proposing a PR to either:
- allow the caller to pass in a string, a pre-serialized spec;
- allow the caller to specify a user-defined serializer function; or
- something else.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels