@@ -16,7 +16,7 @@ def _get_kwargs(
16
16
* ,
17
17
client : Client ,
18
18
an_enum_value : List [AnEnum ],
19
- some_date : datetime .date ,
19
+ some_date : Union [ datetime .date , datetime . datetime ] ,
20
20
) -> Dict [str , Any ]:
21
21
url = "{}/tests/" .format (client .base_url )
22
22
@@ -28,7 +28,11 @@ def _get_kwargs(
28
28
29
29
json_an_enum_value .append (an_enum_value_item )
30
30
31
- json_some_date = some_date .isoformat ()
31
+ if isinstance (some_date , datetime .date ):
32
+ json_some_date = some_date .isoformat ()
33
+
34
+ else :
35
+ json_some_date = some_date .isoformat ()
32
36
33
37
params : Dict [str , Any ] = {
34
38
"an_enum_value" : json_an_enum_value ,
@@ -65,7 +69,7 @@ def sync_detailed(
65
69
* ,
66
70
client : Client ,
67
71
an_enum_value : List [AnEnum ],
68
- some_date : datetime .date ,
72
+ some_date : Union [ datetime .date , datetime . datetime ] ,
69
73
) -> Response [Union [List [AModel ], HTTPValidationError ]]:
70
74
kwargs = _get_kwargs (
71
75
client = client ,
@@ -84,7 +88,7 @@ def sync(
84
88
* ,
85
89
client : Client ,
86
90
an_enum_value : List [AnEnum ],
87
- some_date : datetime .date ,
91
+ some_date : Union [ datetime .date , datetime . datetime ] ,
88
92
) -> Optional [Union [List [AModel ], HTTPValidationError ]]:
89
93
""" Get a list of things """
90
94
@@ -99,7 +103,7 @@ async def asyncio_detailed(
99
103
* ,
100
104
client : Client ,
101
105
an_enum_value : List [AnEnum ],
102
- some_date : datetime .date ,
106
+ some_date : Union [ datetime .date , datetime . datetime ] ,
103
107
) -> Response [Union [List [AModel ], HTTPValidationError ]]:
104
108
kwargs = _get_kwargs (
105
109
client = client ,
@@ -117,7 +121,7 @@ async def asyncio(
117
121
* ,
118
122
client : Client ,
119
123
an_enum_value : List [AnEnum ],
120
- some_date : datetime .date ,
124
+ some_date : Union [ datetime .date , datetime . datetime ] ,
121
125
) -> Optional [Union [List [AModel ], HTTPValidationError ]]:
122
126
""" Get a list of things """
123
127
0 commit comments