GitHubKit 0.11.12__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 (78) 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_0051.py +5 -1
  5. githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
  6. githubkit/versions/ghec_v2022_11_28/models/group_0098.py +4 -0
  7. githubkit/versions/ghec_v2022_11_28/models/group_1010.py +3 -1
  8. githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
  9. githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
  10. githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
  11. githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
  12. githubkit/versions/ghec_v2022_11_28/rest/checks.py +83 -66
  13. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
  14. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
  15. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
  16. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
  17. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
  18. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
  19. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
  20. githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
  21. githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
  22. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
  23. githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
  24. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
  25. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
  26. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
  27. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
  28. githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
  29. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
  30. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
  31. githubkit/versions/ghec_v2022_11_28/rest/repos.py +1035 -800
  32. githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
  33. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
  34. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
  35. githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
  36. githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
  37. githubkit/versions/ghec_v2022_11_28/types/group_0051.py +2 -1
  38. githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
  39. githubkit/versions/ghec_v2022_11_28/types/group_0098.py +1 -0
  40. githubkit/versions/ghec_v2022_11_28/types/group_1010.py +3 -1
  41. githubkit/versions/v2022_11_28/models/group_0030.py +5 -1
  42. githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
  43. githubkit/versions/v2022_11_28/models/group_0082.py +4 -0
  44. githubkit/versions/v2022_11_28/models/group_0936.py +3 -1
  45. githubkit/versions/v2022_11_28/rest/actions.py +534 -386
  46. githubkit/versions/v2022_11_28/rest/activity.py +60 -44
  47. githubkit/versions/v2022_11_28/rest/apps.py +102 -74
  48. githubkit/versions/v2022_11_28/rest/checks.py +83 -66
  49. githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
  50. githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
  51. githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
  52. githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
  53. githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
  54. githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
  55. githubkit/versions/v2022_11_28/rest/gists.py +56 -40
  56. githubkit/versions/v2022_11_28/rest/git.py +84 -60
  57. githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
  58. githubkit/versions/v2022_11_28/rest/issues.py +250 -198
  59. githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
  60. githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
  61. githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
  62. githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
  63. githubkit/versions/v2022_11_28/rest/projects.py +170 -126
  64. githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
  65. githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
  66. githubkit/versions/v2022_11_28/rest/repos.py +1035 -800
  67. githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
  68. githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
  69. githubkit/versions/v2022_11_28/rest/teams.py +274 -204
  70. githubkit/versions/v2022_11_28/rest/users.py +154 -118
  71. githubkit/versions/v2022_11_28/types/group_0030.py +2 -1
  72. githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
  73. githubkit/versions/v2022_11_28/types/group_0082.py +1 -0
  74. githubkit/versions/v2022_11_28/types/group_0936.py +3 -1
  75. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/METADATA +3 -2
  76. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/RECORD +78 -78
  77. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
  78. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
@@ -373,13 +373,15 @@ class ActivityClient:
373
373
 
374
374
  url = "/notifications"
375
375
 
376
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
377
-
378
- if not kwargs:
379
- kwargs = UNSET
376
+ headers = {
377
+ "Content-Type": "application/json",
378
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
379
+ **(headers or {}),
380
+ }
380
381
 
381
382
  json = kwargs if data is UNSET else data
382
- json = type_validate_python(NotificationsPutBody, json)
383
+ if self._github.config.rest_api_validate_body:
384
+ json = type_validate_python(NotificationsPutBody, json)
383
385
  json = model_dump(json) if isinstance(json, BaseModel) else json
384
386
 
385
387
  return self._github.request(
@@ -429,13 +431,15 @@ class ActivityClient:
429
431
 
430
432
  url = "/notifications"
431
433
 
432
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
433
-
434
- if not kwargs:
435
- kwargs = UNSET
434
+ headers = {
435
+ "Content-Type": "application/json",
436
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
437
+ **(headers or {}),
438
+ }
436
439
 
437
440
  json = kwargs if data is UNSET else data
438
- json = type_validate_python(NotificationsPutBody, json)
441
+ if self._github.config.rest_api_validate_body:
442
+ json = type_validate_python(NotificationsPutBody, json)
439
443
  json = model_dump(json) if isinstance(json, BaseModel) else json
440
444
 
441
445
  return await self._github.arequest(
@@ -669,15 +673,17 @@ class ActivityClient:
669
673
 
670
674
  url = f"/notifications/threads/{thread_id}/subscription"
671
675
 
672
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
673
-
674
- if not kwargs:
675
- kwargs = UNSET
676
+ headers = {
677
+ "Content-Type": "application/json",
678
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
679
+ **(headers or {}),
680
+ }
676
681
 
677
682
  json = kwargs if data is UNSET else data
678
- json = type_validate_python(
679
- NotificationsThreadsThreadIdSubscriptionPutBody, json
680
- )
683
+ if self._github.config.rest_api_validate_body:
684
+ json = type_validate_python(
685
+ NotificationsThreadsThreadIdSubscriptionPutBody, json
686
+ )
681
687
  json = model_dump(json) if isinstance(json, BaseModel) else json
682
688
 
683
689
  return self._github.request(
@@ -729,15 +735,17 @@ class ActivityClient:
729
735
 
730
736
  url = f"/notifications/threads/{thread_id}/subscription"
731
737
 
732
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
733
-
734
- if not kwargs:
735
- kwargs = UNSET
738
+ headers = {
739
+ "Content-Type": "application/json",
740
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
741
+ **(headers or {}),
742
+ }
736
743
 
737
744
  json = kwargs if data is UNSET else data
738
- json = type_validate_python(
739
- NotificationsThreadsThreadIdSubscriptionPutBody, json
740
- )
745
+ if self._github.config.rest_api_validate_body:
746
+ json = type_validate_python(
747
+ NotificationsThreadsThreadIdSubscriptionPutBody, json
748
+ )
741
749
  json = model_dump(json) if isinstance(json, BaseModel) else json
742
750
 
743
751
  return await self._github.arequest(
@@ -1045,13 +1053,15 @@ class ActivityClient:
1045
1053
 
1046
1054
  url = f"/repos/{owner}/{repo}/notifications"
1047
1055
 
1048
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1049
-
1050
- if not kwargs:
1051
- kwargs = UNSET
1056
+ headers = {
1057
+ "Content-Type": "application/json",
1058
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1059
+ **(headers or {}),
1060
+ }
1052
1061
 
1053
1062
  json = kwargs if data is UNSET else data
1054
- json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
1063
+ if self._github.config.rest_api_validate_body:
1064
+ json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
1055
1065
  json = model_dump(json) if isinstance(json, BaseModel) else json
1056
1066
 
1057
1067
  return self._github.request(
@@ -1101,13 +1111,15 @@ class ActivityClient:
1101
1111
 
1102
1112
  url = f"/repos/{owner}/{repo}/notifications"
1103
1113
 
1104
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1105
-
1106
- if not kwargs:
1107
- kwargs = UNSET
1114
+ headers = {
1115
+ "Content-Type": "application/json",
1116
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1117
+ **(headers or {}),
1118
+ }
1108
1119
 
1109
1120
  json = kwargs if data is UNSET else data
1110
- json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
1121
+ if self._github.config.rest_api_validate_body:
1122
+ json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
1111
1123
  json = model_dump(json) if isinstance(json, BaseModel) else json
1112
1124
 
1113
1125
  return await self._github.arequest(
@@ -1339,13 +1351,15 @@ class ActivityClient:
1339
1351
 
1340
1352
  url = f"/repos/{owner}/{repo}/subscription"
1341
1353
 
1342
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1343
-
1344
- if not kwargs:
1345
- kwargs = UNSET
1354
+ headers = {
1355
+ "Content-Type": "application/json",
1356
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1357
+ **(headers or {}),
1358
+ }
1346
1359
 
1347
1360
  json = kwargs if data is UNSET else data
1348
- json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
1361
+ if self._github.config.rest_api_validate_body:
1362
+ json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
1349
1363
  json = model_dump(json) if isinstance(json, BaseModel) else json
1350
1364
 
1351
1365
  return self._github.request(
@@ -1393,13 +1407,15 @@ class ActivityClient:
1393
1407
 
1394
1408
  url = f"/repos/{owner}/{repo}/subscription"
1395
1409
 
1396
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1397
-
1398
- if not kwargs:
1399
- kwargs = UNSET
1410
+ headers = {
1411
+ "Content-Type": "application/json",
1412
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1413
+ **(headers or {}),
1414
+ }
1400
1415
 
1401
1416
  json = kwargs if data is UNSET else data
1402
- json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
1417
+ if self._github.config.rest_api_validate_body:
1418
+ json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
1403
1419
  json = model_dump(json) if isinstance(json, BaseModel) else json
1404
1420
 
1405
1421
  return await self._github.arequest(
@@ -247,13 +247,15 @@ class AppsClient:
247
247
 
248
248
  url = "/app/hook/config"
249
249
 
250
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
251
-
252
- if not kwargs:
253
- kwargs = UNSET
250
+ headers = {
251
+ "Content-Type": "application/json",
252
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
253
+ **(headers or {}),
254
+ }
254
255
 
255
256
  json = kwargs if data is UNSET else data
256
- json = type_validate_python(AppHookConfigPatchBody, json)
257
+ if self._github.config.rest_api_validate_body:
258
+ json = type_validate_python(AppHookConfigPatchBody, json)
257
259
  json = model_dump(json) if isinstance(json, BaseModel) else json
258
260
 
259
261
  return self._github.request(
@@ -297,13 +299,15 @@ class AppsClient:
297
299
 
298
300
  url = "/app/hook/config"
299
301
 
300
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
301
-
302
- if not kwargs:
303
- kwargs = UNSET
302
+ headers = {
303
+ "Content-Type": "application/json",
304
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
305
+ **(headers or {}),
306
+ }
304
307
 
305
308
  json = kwargs if data is UNSET else data
306
- json = type_validate_python(AppHookConfigPatchBody, json)
309
+ if self._github.config.rest_api_validate_body:
310
+ json = type_validate_python(AppHookConfigPatchBody, json)
307
311
  json = model_dump(json) if isinstance(json, BaseModel) else json
308
312
 
309
313
  return await self._github.arequest(
@@ -762,15 +766,17 @@ class AppsClient:
762
766
 
763
767
  url = f"/app/installations/{installation_id}/access_tokens"
764
768
 
765
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
766
-
767
- if not kwargs:
768
- kwargs = UNSET
769
+ headers = {
770
+ "Content-Type": "application/json",
771
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
772
+ **(headers or {}),
773
+ }
769
774
 
770
775
  json = kwargs if data is UNSET else data
771
- json = type_validate_python(
772
- AppInstallationsInstallationIdAccessTokensPostBody, json
773
- )
776
+ if self._github.config.rest_api_validate_body:
777
+ json = type_validate_python(
778
+ AppInstallationsInstallationIdAccessTokensPostBody, json
779
+ )
774
780
  json = model_dump(json) if isinstance(json, BaseModel) else json
775
781
 
776
782
  return self._github.request(
@@ -827,15 +833,17 @@ class AppsClient:
827
833
 
828
834
  url = f"/app/installations/{installation_id}/access_tokens"
829
835
 
830
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
831
-
832
- if not kwargs:
833
- kwargs = UNSET
836
+ headers = {
837
+ "Content-Type": "application/json",
838
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
839
+ **(headers or {}),
840
+ }
834
841
 
835
842
  json = kwargs if data is UNSET else data
836
- json = type_validate_python(
837
- AppInstallationsInstallationIdAccessTokensPostBody, json
838
- )
843
+ if self._github.config.rest_api_validate_body:
844
+ json = type_validate_python(
845
+ AppInstallationsInstallationIdAccessTokensPostBody, json
846
+ )
839
847
  json = model_dump(json) if isinstance(json, BaseModel) else json
840
848
 
841
849
  return await self._github.arequest(
@@ -977,13 +985,15 @@ class AppsClient:
977
985
 
978
986
  url = f"/applications/{client_id}/grant"
979
987
 
980
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
981
-
982
- if not kwargs:
983
- kwargs = UNSET
988
+ headers = {
989
+ "Content-Type": "application/json",
990
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
991
+ **(headers or {}),
992
+ }
984
993
 
985
994
  json = kwargs if data is UNSET else data
986
- json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
995
+ if self._github.config.rest_api_validate_body:
996
+ json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
987
997
  json = model_dump(json) if isinstance(json, BaseModel) else json
988
998
 
989
999
  return self._github.request(
@@ -1029,13 +1039,15 @@ class AppsClient:
1029
1039
 
1030
1040
  url = f"/applications/{client_id}/grant"
1031
1041
 
1032
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1033
-
1034
- if not kwargs:
1035
- kwargs = UNSET
1042
+ headers = {
1043
+ "Content-Type": "application/json",
1044
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1045
+ **(headers or {}),
1046
+ }
1036
1047
 
1037
1048
  json = kwargs if data is UNSET else data
1038
- json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
1049
+ if self._github.config.rest_api_validate_body:
1050
+ json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
1039
1051
  json = model_dump(json) if isinstance(json, BaseModel) else json
1040
1052
 
1041
1053
  return await self._github.arequest(
@@ -1086,13 +1098,15 @@ class AppsClient:
1086
1098
 
1087
1099
  url = f"/applications/{client_id}/token"
1088
1100
 
1089
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1090
-
1091
- if not kwargs:
1092
- kwargs = UNSET
1101
+ headers = {
1102
+ "Content-Type": "application/json",
1103
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1104
+ **(headers or {}),
1105
+ }
1093
1106
 
1094
1107
  json = kwargs if data is UNSET else data
1095
- json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
1108
+ if self._github.config.rest_api_validate_body:
1109
+ json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
1096
1110
  json = model_dump(json) if isinstance(json, BaseModel) else json
1097
1111
 
1098
1112
  return self._github.request(
@@ -1145,13 +1159,15 @@ class AppsClient:
1145
1159
 
1146
1160
  url = f"/applications/{client_id}/token"
1147
1161
 
1148
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1149
-
1150
- if not kwargs:
1151
- kwargs = UNSET
1162
+ headers = {
1163
+ "Content-Type": "application/json",
1164
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1165
+ **(headers or {}),
1166
+ }
1152
1167
 
1153
1168
  json = kwargs if data is UNSET else data
1154
- json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
1169
+ if self._github.config.rest_api_validate_body:
1170
+ json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
1155
1171
  json = model_dump(json) if isinstance(json, BaseModel) else json
1156
1172
 
1157
1173
  return await self._github.arequest(
@@ -1199,13 +1215,15 @@ class AppsClient:
1199
1215
 
1200
1216
  url = f"/applications/{client_id}/token"
1201
1217
 
1202
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1203
-
1204
- if not kwargs:
1205
- kwargs = UNSET
1218
+ headers = {
1219
+ "Content-Type": "application/json",
1220
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1221
+ **(headers or {}),
1222
+ }
1206
1223
 
1207
1224
  json = kwargs if data is UNSET else data
1208
- json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
1225
+ if self._github.config.rest_api_validate_body:
1226
+ json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
1209
1227
  json = model_dump(json) if isinstance(json, BaseModel) else json
1210
1228
 
1211
1229
  return self._github.request(
@@ -1251,13 +1269,15 @@ class AppsClient:
1251
1269
 
1252
1270
  url = f"/applications/{client_id}/token"
1253
1271
 
1254
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1255
-
1256
- if not kwargs:
1257
- kwargs = UNSET
1272
+ headers = {
1273
+ "Content-Type": "application/json",
1274
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1275
+ **(headers or {}),
1276
+ }
1258
1277
 
1259
1278
  json = kwargs if data is UNSET else data
1260
- json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
1279
+ if self._github.config.rest_api_validate_body:
1280
+ json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
1261
1281
  json = model_dump(json) if isinstance(json, BaseModel) else json
1262
1282
 
1263
1283
  return await self._github.arequest(
@@ -1307,13 +1327,15 @@ class AppsClient:
1307
1327
 
1308
1328
  url = f"/applications/{client_id}/token"
1309
1329
 
1310
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1311
-
1312
- if not kwargs:
1313
- kwargs = UNSET
1330
+ headers = {
1331
+ "Content-Type": "application/json",
1332
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1333
+ **(headers or {}),
1334
+ }
1314
1335
 
1315
1336
  json = kwargs if data is UNSET else data
1316
- json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
1337
+ if self._github.config.rest_api_validate_body:
1338
+ json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
1317
1339
  json = model_dump(json) if isinstance(json, BaseModel) else json
1318
1340
 
1319
1341
  return self._github.request(
@@ -1364,13 +1386,15 @@ class AppsClient:
1364
1386
 
1365
1387
  url = f"/applications/{client_id}/token"
1366
1388
 
1367
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1368
-
1369
- if not kwargs:
1370
- kwargs = UNSET
1389
+ headers = {
1390
+ "Content-Type": "application/json",
1391
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1392
+ **(headers or {}),
1393
+ }
1371
1394
 
1372
1395
  json = kwargs if data is UNSET else data
1373
- json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
1396
+ if self._github.config.rest_api_validate_body:
1397
+ json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
1374
1398
  json = model_dump(json) if isinstance(json, BaseModel) else json
1375
1399
 
1376
1400
  return await self._github.arequest(
@@ -1427,13 +1451,15 @@ class AppsClient:
1427
1451
 
1428
1452
  url = f"/applications/{client_id}/token/scoped"
1429
1453
 
1430
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1431
-
1432
- if not kwargs:
1433
- kwargs = UNSET
1454
+ headers = {
1455
+ "Content-Type": "application/json",
1456
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1457
+ **(headers or {}),
1458
+ }
1434
1459
 
1435
1460
  json = kwargs if data is UNSET else data
1436
- json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
1461
+ if self._github.config.rest_api_validate_body:
1462
+ json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
1437
1463
  json = model_dump(json) if isinstance(json, BaseModel) else json
1438
1464
 
1439
1465
  return self._github.request(
@@ -1493,13 +1519,15 @@ class AppsClient:
1493
1519
 
1494
1520
  url = f"/applications/{client_id}/token/scoped"
1495
1521
 
1496
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1497
-
1498
- if not kwargs:
1499
- kwargs = UNSET
1522
+ headers = {
1523
+ "Content-Type": "application/json",
1524
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1525
+ **(headers or {}),
1526
+ }
1500
1527
 
1501
1528
  json = kwargs if data is UNSET else data
1502
- json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
1529
+ if self._github.config.rest_api_validate_body:
1530
+ json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
1503
1531
  json = model_dump(json) if isinstance(json, BaseModel) else json
1504
1532
 
1505
1533
  return await self._github.arequest(
@@ -268,16 +268,18 @@ class BillingClient:
268
268
 
269
269
  url = f"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource"
270
270
 
271
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
272
-
273
- if not kwargs:
274
- kwargs = UNSET
271
+ headers = {
272
+ "Content-Type": "application/json",
273
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
274
+ **(headers or {}),
275
+ }
275
276
 
276
277
  json = kwargs if data is UNSET else data
277
- json = type_validate_python(
278
- EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourcePostBody,
279
- json,
280
- )
278
+ if self._github.config.rest_api_validate_body:
279
+ json = type_validate_python(
280
+ EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourcePostBody,
281
+ json,
282
+ )
281
283
  json = model_dump(json) if isinstance(json, BaseModel) else json
282
284
 
283
285
  return self._github.request(
@@ -344,16 +346,18 @@ class BillingClient:
344
346
 
345
347
  url = f"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource"
346
348
 
347
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
348
-
349
- if not kwargs:
350
- kwargs = UNSET
349
+ headers = {
350
+ "Content-Type": "application/json",
351
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
352
+ **(headers or {}),
353
+ }
351
354
 
352
355
  json = kwargs if data is UNSET else data
353
- json = type_validate_python(
354
- EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourcePostBody,
355
- json,
356
- )
356
+ if self._github.config.rest_api_validate_body:
357
+ json = type_validate_python(
358
+ EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourcePostBody,
359
+ json,
360
+ )
357
361
  json = model_dump(json) if isinstance(json, BaseModel) else json
358
362
 
359
363
  return await self._github.arequest(
@@ -420,16 +424,18 @@ class BillingClient:
420
424
 
421
425
  url = f"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource"
422
426
 
423
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
424
-
425
- if not kwargs:
426
- kwargs = UNSET
427
+ headers = {
428
+ "Content-Type": "application/json",
429
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
430
+ **(headers or {}),
431
+ }
427
432
 
428
433
  json = kwargs if data is UNSET else data
429
- json = type_validate_python(
430
- EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourceDeleteBody,
431
- json,
432
- )
434
+ if self._github.config.rest_api_validate_body:
435
+ json = type_validate_python(
436
+ EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourceDeleteBody,
437
+ json,
438
+ )
433
439
  json = model_dump(json) if isinstance(json, BaseModel) else json
434
440
 
435
441
  return self._github.request(
@@ -495,16 +501,18 @@ class BillingClient:
495
501
 
496
502
  url = f"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource"
497
503
 
498
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
499
-
500
- if not kwargs:
501
- kwargs = UNSET
504
+ headers = {
505
+ "Content-Type": "application/json",
506
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
507
+ **(headers or {}),
508
+ }
502
509
 
503
510
  json = kwargs if data is UNSET else data
504
- json = type_validate_python(
505
- EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourceDeleteBody,
506
- json,
507
- )
511
+ if self._github.config.rest_api_validate_body:
512
+ json = type_validate_python(
513
+ EnterprisesEnterpriseSettingsBillingCostCentersCostCenterIdResourceDeleteBody,
514
+ json,
515
+ )
508
516
  json = model_dump(json) if isinstance(json, BaseModel) else json
509
517
 
510
518
  return await self._github.arequest(