GitHubKit 0.11.13__py3-none-any.whl → 0.11.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of GitHubKit might be problematic. Click here for more details.

Files changed (66) hide show
  1. githubkit/config.py +3 -0
  2. githubkit/core.py +5 -0
  3. githubkit/github.py +3 -0
  4. githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
  5. githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
  6. githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
  7. githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
  8. githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
  9. githubkit/versions/ghec_v2022_11_28/rest/checks.py +84 -64
  10. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
  11. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
  12. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
  13. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
  14. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
  15. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
  16. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
  17. githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
  18. githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
  19. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
  20. githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
  21. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
  22. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
  23. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
  24. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
  25. githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
  26. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
  27. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
  28. githubkit/versions/ghec_v2022_11_28/rest/repos.py +1020 -766
  29. githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
  30. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
  31. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
  32. githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
  33. githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
  34. githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
  35. githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
  36. githubkit/versions/v2022_11_28/rest/actions.py +534 -386
  37. githubkit/versions/v2022_11_28/rest/activity.py +60 -44
  38. githubkit/versions/v2022_11_28/rest/apps.py +102 -74
  39. githubkit/versions/v2022_11_28/rest/checks.py +84 -64
  40. githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
  41. githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
  42. githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
  43. githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
  44. githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
  45. githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
  46. githubkit/versions/v2022_11_28/rest/gists.py +56 -40
  47. githubkit/versions/v2022_11_28/rest/git.py +84 -60
  48. githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
  49. githubkit/versions/v2022_11_28/rest/issues.py +250 -198
  50. githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
  51. githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
  52. githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
  53. githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
  54. githubkit/versions/v2022_11_28/rest/projects.py +170 -126
  55. githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
  56. githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
  57. githubkit/versions/v2022_11_28/rest/repos.py +1020 -766
  58. githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
  59. githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
  60. githubkit/versions/v2022_11_28/rest/teams.py +274 -204
  61. githubkit/versions/v2022_11_28/rest/users.py +154 -118
  62. githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
  63. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/METADATA +2 -1
  64. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/RECORD +66 -66
  65. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
  66. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
@@ -184,16 +184,18 @@ class ReactionsClient:
184
184
 
185
185
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
186
186
 
187
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
188
-
189
- if not kwargs:
190
- kwargs = UNSET
187
+ headers = {
188
+ "Content-Type": "application/json",
189
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
190
+ **(headers or {}),
191
+ }
191
192
 
192
193
  json = kwargs if data is UNSET else data
193
- json = type_validate_python(
194
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
195
- json,
196
- )
194
+ if self._github.config.rest_api_validate_body:
195
+ json = type_validate_python(
196
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
197
+ json,
198
+ )
197
199
  json = model_dump(json) if isinstance(json, BaseModel) else json
198
200
 
199
201
  return self._github.request(
@@ -253,16 +255,18 @@ class ReactionsClient:
253
255
 
254
256
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
255
257
 
256
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
257
-
258
- if not kwargs:
259
- kwargs = UNSET
258
+ headers = {
259
+ "Content-Type": "application/json",
260
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
261
+ **(headers or {}),
262
+ }
260
263
 
261
264
  json = kwargs if data is UNSET else data
262
- json = type_validate_python(
263
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
264
- json,
265
- )
265
+ if self._github.config.rest_api_validate_body:
266
+ json = type_validate_python(
267
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
268
+ json,
269
+ )
266
270
  json = model_dump(json) if isinstance(json, BaseModel) else json
267
271
 
268
272
  return await self._github.arequest(
@@ -441,15 +445,17 @@ class ReactionsClient:
441
445
 
442
446
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
443
447
 
444
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
445
-
446
- if not kwargs:
447
- kwargs = UNSET
448
+ headers = {
449
+ "Content-Type": "application/json",
450
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
451
+ **(headers or {}),
452
+ }
448
453
 
449
454
  json = kwargs if data is UNSET else data
450
- json = type_validate_python(
451
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberReactionsPostBody, json
452
- )
455
+ if self._github.config.rest_api_validate_body:
456
+ json = type_validate_python(
457
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberReactionsPostBody, json
458
+ )
453
459
  json = model_dump(json) if isinstance(json, BaseModel) else json
454
460
 
455
461
  return self._github.request(
@@ -506,15 +512,17 @@ class ReactionsClient:
506
512
 
507
513
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
508
514
 
509
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
510
-
511
- if not kwargs:
512
- kwargs = UNSET
515
+ headers = {
516
+ "Content-Type": "application/json",
517
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
518
+ **(headers or {}),
519
+ }
513
520
 
514
521
  json = kwargs if data is UNSET else data
515
- json = type_validate_python(
516
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberReactionsPostBody, json
517
- )
522
+ if self._github.config.rest_api_validate_body:
523
+ json = type_validate_python(
524
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberReactionsPostBody, json
525
+ )
518
526
  json = model_dump(json) if isinstance(json, BaseModel) else json
519
527
 
520
528
  return await self._github.arequest(
@@ -696,15 +704,17 @@ class ReactionsClient:
696
704
 
697
705
  url = f"/repos/{owner}/{repo}/comments/{comment_id}/reactions"
698
706
 
699
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
700
-
701
- if not kwargs:
702
- kwargs = UNSET
707
+ headers = {
708
+ "Content-Type": "application/json",
709
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
710
+ **(headers or {}),
711
+ }
703
712
 
704
713
  json = kwargs if data is UNSET else data
705
- json = type_validate_python(
706
- ReposOwnerRepoCommentsCommentIdReactionsPostBody, json
707
- )
714
+ if self._github.config.rest_api_validate_body:
715
+ json = type_validate_python(
716
+ ReposOwnerRepoCommentsCommentIdReactionsPostBody, json
717
+ )
708
718
  json = model_dump(json) if isinstance(json, BaseModel) else json
709
719
 
710
720
  return self._github.request(
@@ -763,15 +773,17 @@ class ReactionsClient:
763
773
 
764
774
  url = f"/repos/{owner}/{repo}/comments/{comment_id}/reactions"
765
775
 
766
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
767
-
768
- if not kwargs:
769
- kwargs = UNSET
776
+ headers = {
777
+ "Content-Type": "application/json",
778
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
779
+ **(headers or {}),
780
+ }
770
781
 
771
782
  json = kwargs if data is UNSET else data
772
- json = type_validate_python(
773
- ReposOwnerRepoCommentsCommentIdReactionsPostBody, json
774
- )
783
+ if self._github.config.rest_api_validate_body:
784
+ json = type_validate_python(
785
+ ReposOwnerRepoCommentsCommentIdReactionsPostBody, json
786
+ )
775
787
  json = model_dump(json) if isinstance(json, BaseModel) else json
776
788
 
777
789
  return await self._github.arequest(
@@ -958,15 +970,17 @@ class ReactionsClient:
958
970
 
959
971
  url = f"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
960
972
 
961
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
962
-
963
- if not kwargs:
964
- kwargs = UNSET
973
+ headers = {
974
+ "Content-Type": "application/json",
975
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
976
+ **(headers or {}),
977
+ }
965
978
 
966
979
  json = kwargs if data is UNSET else data
967
- json = type_validate_python(
968
- ReposOwnerRepoIssuesCommentsCommentIdReactionsPostBody, json
969
- )
980
+ if self._github.config.rest_api_validate_body:
981
+ json = type_validate_python(
982
+ ReposOwnerRepoIssuesCommentsCommentIdReactionsPostBody, json
983
+ )
970
984
  json = model_dump(json) if isinstance(json, BaseModel) else json
971
985
 
972
986
  return self._github.request(
@@ -1027,15 +1041,17 @@ class ReactionsClient:
1027
1041
 
1028
1042
  url = f"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
1029
1043
 
1030
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1031
-
1032
- if not kwargs:
1033
- kwargs = UNSET
1044
+ headers = {
1045
+ "Content-Type": "application/json",
1046
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1047
+ **(headers or {}),
1048
+ }
1034
1049
 
1035
1050
  json = kwargs if data is UNSET else data
1036
- json = type_validate_python(
1037
- ReposOwnerRepoIssuesCommentsCommentIdReactionsPostBody, json
1038
- )
1051
+ if self._github.config.rest_api_validate_body:
1052
+ json = type_validate_python(
1053
+ ReposOwnerRepoIssuesCommentsCommentIdReactionsPostBody, json
1054
+ )
1039
1055
  json = model_dump(json) if isinstance(json, BaseModel) else json
1040
1056
 
1041
1057
  return await self._github.arequest(
@@ -1222,15 +1238,17 @@ class ReactionsClient:
1222
1238
 
1223
1239
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/reactions"
1224
1240
 
1225
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1226
-
1227
- if not kwargs:
1228
- kwargs = UNSET
1241
+ headers = {
1242
+ "Content-Type": "application/json",
1243
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1244
+ **(headers or {}),
1245
+ }
1229
1246
 
1230
1247
  json = kwargs if data is UNSET else data
1231
- json = type_validate_python(
1232
- ReposOwnerRepoIssuesIssueNumberReactionsPostBody, json
1233
- )
1248
+ if self._github.config.rest_api_validate_body:
1249
+ json = type_validate_python(
1250
+ ReposOwnerRepoIssuesIssueNumberReactionsPostBody, json
1251
+ )
1234
1252
  json = model_dump(json) if isinstance(json, BaseModel) else json
1235
1253
 
1236
1254
  return self._github.request(
@@ -1289,15 +1307,17 @@ class ReactionsClient:
1289
1307
 
1290
1308
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/reactions"
1291
1309
 
1292
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1293
-
1294
- if not kwargs:
1295
- kwargs = UNSET
1310
+ headers = {
1311
+ "Content-Type": "application/json",
1312
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1313
+ **(headers or {}),
1314
+ }
1296
1315
 
1297
1316
  json = kwargs if data is UNSET else data
1298
- json = type_validate_python(
1299
- ReposOwnerRepoIssuesIssueNumberReactionsPostBody, json
1300
- )
1317
+ if self._github.config.rest_api_validate_body:
1318
+ json = type_validate_python(
1319
+ ReposOwnerRepoIssuesIssueNumberReactionsPostBody, json
1320
+ )
1301
1321
  json = model_dump(json) if isinstance(json, BaseModel) else json
1302
1322
 
1303
1323
  return await self._github.arequest(
@@ -1484,15 +1504,17 @@ class ReactionsClient:
1484
1504
 
1485
1505
  url = f"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
1486
1506
 
1487
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1488
-
1489
- if not kwargs:
1490
- kwargs = UNSET
1507
+ headers = {
1508
+ "Content-Type": "application/json",
1509
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1510
+ **(headers or {}),
1511
+ }
1491
1512
 
1492
1513
  json = kwargs if data is UNSET else data
1493
- json = type_validate_python(
1494
- ReposOwnerRepoPullsCommentsCommentIdReactionsPostBody, json
1495
- )
1514
+ if self._github.config.rest_api_validate_body:
1515
+ json = type_validate_python(
1516
+ ReposOwnerRepoPullsCommentsCommentIdReactionsPostBody, json
1517
+ )
1496
1518
  json = model_dump(json) if isinstance(json, BaseModel) else json
1497
1519
 
1498
1520
  return self._github.request(
@@ -1553,15 +1575,17 @@ class ReactionsClient:
1553
1575
 
1554
1576
  url = f"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
1555
1577
 
1556
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1557
-
1558
- if not kwargs:
1559
- kwargs = UNSET
1578
+ headers = {
1579
+ "Content-Type": "application/json",
1580
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1581
+ **(headers or {}),
1582
+ }
1560
1583
 
1561
1584
  json = kwargs if data is UNSET else data
1562
- json = type_validate_python(
1563
- ReposOwnerRepoPullsCommentsCommentIdReactionsPostBody, json
1564
- )
1585
+ if self._github.config.rest_api_validate_body:
1586
+ json = type_validate_python(
1587
+ ReposOwnerRepoPullsCommentsCommentIdReactionsPostBody, json
1588
+ )
1565
1589
  json = model_dump(json) if isinstance(json, BaseModel) else json
1566
1590
 
1567
1591
  return await self._github.arequest(
@@ -1744,15 +1768,17 @@ class ReactionsClient:
1744
1768
 
1745
1769
  url = f"/repos/{owner}/{repo}/releases/{release_id}/reactions"
1746
1770
 
1747
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1748
-
1749
- if not kwargs:
1750
- kwargs = UNSET
1771
+ headers = {
1772
+ "Content-Type": "application/json",
1773
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1774
+ **(headers or {}),
1775
+ }
1751
1776
 
1752
1777
  json = kwargs if data is UNSET else data
1753
- json = type_validate_python(
1754
- ReposOwnerRepoReleasesReleaseIdReactionsPostBody, json
1755
- )
1778
+ if self._github.config.rest_api_validate_body:
1779
+ json = type_validate_python(
1780
+ ReposOwnerRepoReleasesReleaseIdReactionsPostBody, json
1781
+ )
1756
1782
  json = model_dump(json) if isinstance(json, BaseModel) else json
1757
1783
 
1758
1784
  return self._github.request(
@@ -1809,15 +1835,17 @@ class ReactionsClient:
1809
1835
 
1810
1836
  url = f"/repos/{owner}/{repo}/releases/{release_id}/reactions"
1811
1837
 
1812
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1813
-
1814
- if not kwargs:
1815
- kwargs = UNSET
1838
+ headers = {
1839
+ "Content-Type": "application/json",
1840
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1841
+ **(headers or {}),
1842
+ }
1816
1843
 
1817
1844
  json = kwargs if data is UNSET else data
1818
- json = type_validate_python(
1819
- ReposOwnerRepoReleasesReleaseIdReactionsPostBody, json
1820
- )
1845
+ if self._github.config.rest_api_validate_body:
1846
+ json = type_validate_python(
1847
+ ReposOwnerRepoReleasesReleaseIdReactionsPostBody, json
1848
+ )
1821
1849
  json = model_dump(json) if isinstance(json, BaseModel) else json
1822
1850
 
1823
1851
  return await self._github.arequest(
@@ -1997,16 +2025,18 @@ class ReactionsClient:
1997
2025
 
1998
2026
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"
1999
2027
 
2000
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2001
-
2002
- if not kwargs:
2003
- kwargs = UNSET
2028
+ headers = {
2029
+ "Content-Type": "application/json",
2030
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2031
+ **(headers or {}),
2032
+ }
2004
2033
 
2005
2034
  json = kwargs if data is UNSET else data
2006
- json = type_validate_python(
2007
- TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
2008
- json,
2009
- )
2035
+ if self._github.config.rest_api_validate_body:
2036
+ json = type_validate_python(
2037
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
2038
+ json,
2039
+ )
2010
2040
  json = model_dump(json) if isinstance(json, BaseModel) else json
2011
2041
 
2012
2042
  return self._github.request(
@@ -2063,16 +2093,18 @@ class ReactionsClient:
2063
2093
 
2064
2094
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"
2065
2095
 
2066
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2067
-
2068
- if not kwargs:
2069
- kwargs = UNSET
2096
+ headers = {
2097
+ "Content-Type": "application/json",
2098
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2099
+ **(headers or {}),
2100
+ }
2070
2101
 
2071
2102
  json = kwargs if data is UNSET else data
2072
- json = type_validate_python(
2073
- TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
2074
- json,
2075
- )
2103
+ if self._github.config.rest_api_validate_body:
2104
+ json = type_validate_python(
2105
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberReactionsPostBody,
2106
+ json,
2107
+ )
2076
2108
  json = model_dump(json) if isinstance(json, BaseModel) else json
2077
2109
 
2078
2110
  return await self._github.arequest(
@@ -2202,15 +2234,17 @@ class ReactionsClient:
2202
2234
 
2203
2235
  url = f"/teams/{team_id}/discussions/{discussion_number}/reactions"
2204
2236
 
2205
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2206
-
2207
- if not kwargs:
2208
- kwargs = UNSET
2237
+ headers = {
2238
+ "Content-Type": "application/json",
2239
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2240
+ **(headers or {}),
2241
+ }
2209
2242
 
2210
2243
  json = kwargs if data is UNSET else data
2211
- json = type_validate_python(
2212
- TeamsTeamIdDiscussionsDiscussionNumberReactionsPostBody, json
2213
- )
2244
+ if self._github.config.rest_api_validate_body:
2245
+ json = type_validate_python(
2246
+ TeamsTeamIdDiscussionsDiscussionNumberReactionsPostBody, json
2247
+ )
2214
2248
  json = model_dump(json) if isinstance(json, BaseModel) else json
2215
2249
 
2216
2250
  return self._github.request(
@@ -2264,15 +2298,17 @@ class ReactionsClient:
2264
2298
 
2265
2299
  url = f"/teams/{team_id}/discussions/{discussion_number}/reactions"
2266
2300
 
2267
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2268
-
2269
- if not kwargs:
2270
- kwargs = UNSET
2301
+ headers = {
2302
+ "Content-Type": "application/json",
2303
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2304
+ **(headers or {}),
2305
+ }
2271
2306
 
2272
2307
  json = kwargs if data is UNSET else data
2273
- json = type_validate_python(
2274
- TeamsTeamIdDiscussionsDiscussionNumberReactionsPostBody, json
2275
- )
2308
+ if self._github.config.rest_api_validate_body:
2309
+ json = type_validate_python(
2310
+ TeamsTeamIdDiscussionsDiscussionNumberReactionsPostBody, json
2311
+ )
2276
2312
  json = model_dump(json) if isinstance(json, BaseModel) else json
2277
2313
 
2278
2314
  return await self._github.arequest(