[REQ][python-nextgen] datetime serialization format override
Created by: tnielens
Is your feature request related to a problem? Please describe.
The backend I'm requesting only supports a subset of the iso datetime format for query parameters.
2023-01-01T00:00:00.000Z
is parsed correctly, but alternatives like 2023-01-01 00:00:00.000+00:00
or 2023-01-01T00:00:00+00:00
fail.
With the former python generators, api functions support both datetime
and str
arguments for datetime parameters. The default datetime serialization format of the generated api code it overridable by passing the str in the correct format. The python-nextgen generator annotates api call methods with @validate_arguments
. This turns str
inputs into datetime
s which results in the default serialization format of the generated api to be used.
Describe the solution you'd like
Support datetime and date format overrides at different levels: api_client/specific api/api call.
Describe alternatives you've considered
Removing the @validate_arguments
and passing str
s arguments works. But I'd prefer not modify the generated code.
Additional context
I'd like to move from the python-prior
codegen to the new python-nextgen
.