File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
from __future__ import annotations
11
11
12
+ from datetime import datetime
13
+
12
14
from pydantic import Field
13
15
14
16
from githubkit .compat import GitHubModel , model_rebuild
@@ -24,7 +26,7 @@ class GitUser(GitHubModel):
24
26
25
27
name : Missing [str ] = Field (default = UNSET )
26
28
email : Missing [str ] = Field (default = UNSET )
27
- date : Missing [str ] = Field (default = UNSET )
29
+ date : Missing [datetime ] = Field (default = UNSET )
28
30
29
31
30
32
model_rebuild (GitUser )
Original file line number Diff line number Diff line change 9
9
10
10
from __future__ import annotations
11
11
12
+ from datetime import datetime
12
13
from typing_extensions import NotRequired , TypedDict
13
14
14
15
@@ -20,7 +21,7 @@ class GitUserType(TypedDict):
20
21
21
22
name : NotRequired [str ]
22
23
email : NotRequired [str ]
23
- date : NotRequired [str ]
24
+ date : NotRequired [datetime ]
24
25
25
26
26
27
__all__ = ("GitUserType" ,)
Original file line number Diff line number Diff line change 9
9
10
10
from __future__ import annotations
11
11
12
+ from datetime import datetime
13
+
12
14
from pydantic import Field
13
15
14
16
from githubkit .compat import GitHubModel , model_rebuild
@@ -24,7 +26,7 @@ class GitUser(GitHubModel):
24
26
25
27
name : Missing [str ] = Field (default = UNSET )
26
28
email : Missing [str ] = Field (default = UNSET )
27
- date : Missing [str ] = Field (default = UNSET )
29
+ date : Missing [datetime ] = Field (default = UNSET )
28
30
29
31
30
32
model_rebuild (GitUser )
Original file line number Diff line number Diff line change 9
9
10
10
from __future__ import annotations
11
11
12
+ from datetime import datetime
12
13
from typing_extensions import NotRequired , TypedDict
13
14
14
15
@@ -20,7 +21,7 @@ class GitUserType(TypedDict):
20
21
21
22
name : NotRequired [str ]
22
23
email : NotRequired [str ]
23
- date : NotRequired [str ]
24
+ date : NotRequired [datetime ]
24
25
25
26
26
27
__all__ = ("GitUserType" ,)
Original file line number Diff line number Diff line change @@ -348,6 +348,11 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
348
348
" null" ,
349
349
] }
350
350
351
+ # https://github.com/yanyongyu/githubkit/issues/199
352
+ # https://github.com/github/rest-api-description/issues/4697
353
+ # git user date format should be date-time
354
+ "/components/schemas/git-user/properties/date" = { format = " date-time" }
355
+
351
356
# https://github.com/yanyongyu/githubkit/pull/134
352
357
# blob_url and raw_url may be null when the diff file is submodule's file
353
358
"/components/schemas/diff-entry/properties/blob_url" = { type = [
You can’t perform that action at this time.
0 commit comments