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
@@ -195,13 +195,15 @@ class CodespacesClient:
195
195
 
196
196
  url = f"/orgs/{org}/codespaces/access"
197
197
 
198
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
199
-
200
- if not kwargs:
201
- kwargs = UNSET
198
+ headers = {
199
+ "Content-Type": "application/json",
200
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
201
+ **(headers or {}),
202
+ }
202
203
 
203
204
  json = kwargs if data is UNSET else data
204
- json = type_validate_python(OrgsOrgCodespacesAccessPutBody, json)
205
+ if self._github.config.rest_api_validate_body:
206
+ json = type_validate_python(OrgsOrgCodespacesAccessPutBody, json)
205
207
  json = model_dump(json) if isinstance(json, BaseModel) else json
206
208
 
207
209
  return self._github.request(
@@ -255,13 +257,15 @@ class CodespacesClient:
255
257
 
256
258
  url = f"/orgs/{org}/codespaces/access"
257
259
 
258
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
259
-
260
- if not kwargs:
261
- kwargs = UNSET
260
+ headers = {
261
+ "Content-Type": "application/json",
262
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
263
+ **(headers or {}),
264
+ }
262
265
 
263
266
  json = kwargs if data is UNSET else data
264
- json = type_validate_python(OrgsOrgCodespacesAccessPutBody, json)
267
+ if self._github.config.rest_api_validate_body:
268
+ json = type_validate_python(OrgsOrgCodespacesAccessPutBody, json)
265
269
  json = model_dump(json) if isinstance(json, BaseModel) else json
266
270
 
267
271
  return await self._github.arequest(
@@ -313,13 +317,17 @@ class CodespacesClient:
313
317
 
314
318
  url = f"/orgs/{org}/codespaces/access/selected_users"
315
319
 
316
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
317
-
318
- if not kwargs:
319
- kwargs = UNSET
320
+ headers = {
321
+ "Content-Type": "application/json",
322
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
323
+ **(headers or {}),
324
+ }
320
325
 
321
326
  json = kwargs if data is UNSET else data
322
- json = type_validate_python(OrgsOrgCodespacesAccessSelectedUsersPostBody, json)
327
+ if self._github.config.rest_api_validate_body:
328
+ json = type_validate_python(
329
+ OrgsOrgCodespacesAccessSelectedUsersPostBody, json
330
+ )
323
331
  json = model_dump(json) if isinstance(json, BaseModel) else json
324
332
 
325
333
  return self._github.request(
@@ -371,13 +379,17 @@ class CodespacesClient:
371
379
 
372
380
  url = f"/orgs/{org}/codespaces/access/selected_users"
373
381
 
374
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
375
-
376
- if not kwargs:
377
- kwargs = UNSET
382
+ headers = {
383
+ "Content-Type": "application/json",
384
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
385
+ **(headers or {}),
386
+ }
378
387
 
379
388
  json = kwargs if data is UNSET else data
380
- json = type_validate_python(OrgsOrgCodespacesAccessSelectedUsersPostBody, json)
389
+ if self._github.config.rest_api_validate_body:
390
+ json = type_validate_python(
391
+ OrgsOrgCodespacesAccessSelectedUsersPostBody, json
392
+ )
381
393
  json = model_dump(json) if isinstance(json, BaseModel) else json
382
394
 
383
395
  return await self._github.arequest(
@@ -429,15 +441,17 @@ class CodespacesClient:
429
441
 
430
442
  url = f"/orgs/{org}/codespaces/access/selected_users"
431
443
 
432
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
433
-
434
- if not kwargs:
435
- kwargs = UNSET
444
+ headers = {
445
+ "Content-Type": "application/json",
446
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
447
+ **(headers or {}),
448
+ }
436
449
 
437
450
  json = kwargs if data is UNSET else data
438
- json = type_validate_python(
439
- OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json
440
- )
451
+ if self._github.config.rest_api_validate_body:
452
+ json = type_validate_python(
453
+ OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json
454
+ )
441
455
  json = model_dump(json) if isinstance(json, BaseModel) else json
442
456
 
443
457
  return self._github.request(
@@ -489,15 +503,17 @@ class CodespacesClient:
489
503
 
490
504
  url = f"/orgs/{org}/codespaces/access/selected_users"
491
505
 
492
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
493
-
494
- if not kwargs:
495
- kwargs = UNSET
506
+ headers = {
507
+ "Content-Type": "application/json",
508
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
509
+ **(headers or {}),
510
+ }
496
511
 
497
512
  json = kwargs if data is UNSET else data
498
- json = type_validate_python(
499
- OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json
500
- )
513
+ if self._github.config.rest_api_validate_body:
514
+ json = type_validate_python(
515
+ OrgsOrgCodespacesAccessSelectedUsersDeleteBody, json
516
+ )
501
517
  json = model_dump(json) if isinstance(json, BaseModel) else json
502
518
 
503
519
  return await self._github.arequest(
@@ -700,13 +716,15 @@ class CodespacesClient:
700
716
 
701
717
  url = f"/orgs/{org}/codespaces/secrets/{secret_name}"
702
718
 
703
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
704
-
705
- if not kwargs:
706
- kwargs = UNSET
719
+ headers = {
720
+ "Content-Type": "application/json",
721
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
722
+ **(headers or {}),
723
+ }
707
724
 
708
725
  json = kwargs if data is UNSET else data
709
- json = type_validate_python(OrgsOrgCodespacesSecretsSecretNamePutBody, json)
726
+ if self._github.config.rest_api_validate_body:
727
+ json = type_validate_python(OrgsOrgCodespacesSecretsSecretNamePutBody, json)
710
728
  json = model_dump(json) if isinstance(json, BaseModel) else json
711
729
 
712
730
  return self._github.request(
@@ -765,13 +783,15 @@ class CodespacesClient:
765
783
 
766
784
  url = f"/orgs/{org}/codespaces/secrets/{secret_name}"
767
785
 
768
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
769
-
770
- if not kwargs:
771
- kwargs = UNSET
786
+ headers = {
787
+ "Content-Type": "application/json",
788
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
789
+ **(headers or {}),
790
+ }
772
791
 
773
792
  json = kwargs if data is UNSET else data
774
- json = type_validate_python(OrgsOrgCodespacesSecretsSecretNamePutBody, json)
793
+ if self._github.config.rest_api_validate_body:
794
+ json = type_validate_python(OrgsOrgCodespacesSecretsSecretNamePutBody, json)
775
795
  json = model_dump(json) if isinstance(json, BaseModel) else json
776
796
 
777
797
  return await self._github.arequest(
@@ -947,15 +967,17 @@ class CodespacesClient:
947
967
 
948
968
  url = f"/orgs/{org}/codespaces/secrets/{secret_name}/repositories"
949
969
 
950
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
951
-
952
- if not kwargs:
953
- kwargs = UNSET
970
+ headers = {
971
+ "Content-Type": "application/json",
972
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
973
+ **(headers or {}),
974
+ }
954
975
 
955
976
  json = kwargs if data is UNSET else data
956
- json = type_validate_python(
957
- OrgsOrgCodespacesSecretsSecretNameRepositoriesPutBody, json
958
- )
977
+ if self._github.config.rest_api_validate_body:
978
+ json = type_validate_python(
979
+ OrgsOrgCodespacesSecretsSecretNameRepositoriesPutBody, json
980
+ )
959
981
  json = model_dump(json) if isinstance(json, BaseModel) else json
960
982
 
961
983
  return self._github.request(
@@ -1009,15 +1031,17 @@ class CodespacesClient:
1009
1031
 
1010
1032
  url = f"/orgs/{org}/codespaces/secrets/{secret_name}/repositories"
1011
1033
 
1012
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1013
-
1014
- if not kwargs:
1015
- kwargs = UNSET
1034
+ headers = {
1035
+ "Content-Type": "application/json",
1036
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1037
+ **(headers or {}),
1038
+ }
1016
1039
 
1017
1040
  json = kwargs if data is UNSET else data
1018
- json = type_validate_python(
1019
- OrgsOrgCodespacesSecretsSecretNameRepositoriesPutBody, json
1020
- )
1041
+ if self._github.config.rest_api_validate_body:
1042
+ json = type_validate_python(
1043
+ OrgsOrgCodespacesSecretsSecretNameRepositoriesPutBody, json
1044
+ )
1021
1045
  json = model_dump(json) if isinstance(json, BaseModel) else json
1022
1046
 
1023
1047
  return await self._github.arequest(
@@ -1463,13 +1487,17 @@ class CodespacesClient:
1463
1487
 
1464
1488
  url = f"/repos/{owner}/{repo}/codespaces"
1465
1489
 
1466
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1467
-
1468
- if not kwargs:
1469
- kwargs = UNSET
1490
+ headers = {
1491
+ "Content-Type": "application/json",
1492
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1493
+ **(headers or {}),
1494
+ }
1470
1495
 
1471
1496
  json = kwargs if data is UNSET else data
1472
- json = type_validate_python(Union[ReposOwnerRepoCodespacesPostBody, None], json)
1497
+ if self._github.config.rest_api_validate_body:
1498
+ json = type_validate_python(
1499
+ Union[ReposOwnerRepoCodespacesPostBody, None], json
1500
+ )
1473
1501
  json = model_dump(json) if isinstance(json, BaseModel) else json
1474
1502
 
1475
1503
  return self._github.request(
@@ -1542,13 +1570,17 @@ class CodespacesClient:
1542
1570
 
1543
1571
  url = f"/repos/{owner}/{repo}/codespaces"
1544
1572
 
1545
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1546
-
1547
- if not kwargs:
1548
- kwargs = UNSET
1573
+ headers = {
1574
+ "Content-Type": "application/json",
1575
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1576
+ **(headers or {}),
1577
+ }
1549
1578
 
1550
1579
  json = kwargs if data is UNSET else data
1551
- json = type_validate_python(Union[ReposOwnerRepoCodespacesPostBody, None], json)
1580
+ if self._github.config.rest_api_validate_body:
1581
+ json = type_validate_python(
1582
+ Union[ReposOwnerRepoCodespacesPostBody, None], json
1583
+ )
1552
1584
  json = model_dump(json) if isinstance(json, BaseModel) else json
1553
1585
 
1554
1586
  return await self._github.arequest(
@@ -2069,15 +2101,17 @@ class CodespacesClient:
2069
2101
 
2070
2102
  url = f"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
2071
2103
 
2072
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2073
-
2074
- if not kwargs:
2075
- kwargs = UNSET
2104
+ headers = {
2105
+ "Content-Type": "application/json",
2106
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2107
+ **(headers or {}),
2108
+ }
2076
2109
 
2077
2110
  json = kwargs if data is UNSET else data
2078
- json = type_validate_python(
2079
- ReposOwnerRepoCodespacesSecretsSecretNamePutBody, json
2080
- )
2111
+ if self._github.config.rest_api_validate_body:
2112
+ json = type_validate_python(
2113
+ ReposOwnerRepoCodespacesSecretsSecretNamePutBody, json
2114
+ )
2081
2115
  json = model_dump(json) if isinstance(json, BaseModel) else json
2082
2116
 
2083
2117
  return self._github.request(
@@ -2131,15 +2165,17 @@ class CodespacesClient:
2131
2165
 
2132
2166
  url = f"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
2133
2167
 
2134
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2135
-
2136
- if not kwargs:
2137
- kwargs = UNSET
2168
+ headers = {
2169
+ "Content-Type": "application/json",
2170
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2171
+ **(headers or {}),
2172
+ }
2138
2173
 
2139
2174
  json = kwargs if data is UNSET else data
2140
- json = type_validate_python(
2141
- ReposOwnerRepoCodespacesSecretsSecretNamePutBody, json
2142
- )
2175
+ if self._github.config.rest_api_validate_body:
2176
+ json = type_validate_python(
2177
+ ReposOwnerRepoCodespacesSecretsSecretNamePutBody, json
2178
+ )
2143
2179
  json = model_dump(json) if isinstance(json, BaseModel) else json
2144
2180
 
2145
2181
  return await self._github.arequest(
@@ -2249,15 +2285,17 @@ class CodespacesClient:
2249
2285
 
2250
2286
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces"
2251
2287
 
2252
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2253
-
2254
- if not kwargs:
2255
- kwargs = UNSET
2288
+ headers = {
2289
+ "Content-Type": "application/json",
2290
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2291
+ **(headers or {}),
2292
+ }
2256
2293
 
2257
2294
  json = kwargs if data is UNSET else data
2258
- json = type_validate_python(
2259
- Union[ReposOwnerRepoPullsPullNumberCodespacesPostBody, None], json
2260
- )
2295
+ if self._github.config.rest_api_validate_body:
2296
+ json = type_validate_python(
2297
+ Union[ReposOwnerRepoPullsPullNumberCodespacesPostBody, None], json
2298
+ )
2261
2299
  json = model_dump(json) if isinstance(json, BaseModel) else json
2262
2300
 
2263
2301
  return self._github.request(
@@ -2333,15 +2371,17 @@ class CodespacesClient:
2333
2371
 
2334
2372
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces"
2335
2373
 
2336
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2337
-
2338
- if not kwargs:
2339
- kwargs = UNSET
2374
+ headers = {
2375
+ "Content-Type": "application/json",
2376
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2377
+ **(headers or {}),
2378
+ }
2340
2379
 
2341
2380
  json = kwargs if data is UNSET else data
2342
- json = type_validate_python(
2343
- Union[ReposOwnerRepoPullsPullNumberCodespacesPostBody, None], json
2344
- )
2381
+ if self._github.config.rest_api_validate_body:
2382
+ json = type_validate_python(
2383
+ Union[ReposOwnerRepoPullsPullNumberCodespacesPostBody, None], json
2384
+ )
2345
2385
  json = model_dump(json) if isinstance(json, BaseModel) else json
2346
2386
 
2347
2387
  return await self._github.arequest(
@@ -2500,15 +2540,17 @@ class CodespacesClient:
2500
2540
 
2501
2541
  url = "/user/codespaces"
2502
2542
 
2503
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2504
-
2505
- if not kwargs:
2506
- kwargs = UNSET
2543
+ headers = {
2544
+ "Content-Type": "application/json",
2545
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2546
+ **(headers or {}),
2547
+ }
2507
2548
 
2508
2549
  json = kwargs if data is UNSET else data
2509
- json = type_validate_python(
2510
- Union[UserCodespacesPostBodyOneof0, UserCodespacesPostBodyOneof1], json
2511
- )
2550
+ if self._github.config.rest_api_validate_body:
2551
+ json = type_validate_python(
2552
+ Union[UserCodespacesPostBodyOneof0, UserCodespacesPostBodyOneof1], json
2553
+ )
2512
2554
  json = model_dump(json) if isinstance(json, BaseModel) else json
2513
2555
 
2514
2556
  return self._github.request(
@@ -2595,15 +2637,17 @@ class CodespacesClient:
2595
2637
 
2596
2638
  url = "/user/codespaces"
2597
2639
 
2598
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2599
-
2600
- if not kwargs:
2601
- kwargs = UNSET
2640
+ headers = {
2641
+ "Content-Type": "application/json",
2642
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2643
+ **(headers or {}),
2644
+ }
2602
2645
 
2603
2646
  json = kwargs if data is UNSET else data
2604
- json = type_validate_python(
2605
- Union[UserCodespacesPostBodyOneof0, UserCodespacesPostBodyOneof1], json
2606
- )
2647
+ if self._github.config.rest_api_validate_body:
2648
+ json = type_validate_python(
2649
+ Union[UserCodespacesPostBodyOneof0, UserCodespacesPostBodyOneof1], json
2650
+ )
2607
2651
  json = model_dump(json) if isinstance(json, BaseModel) else json
2608
2652
 
2609
2653
  return await self._github.arequest(
@@ -2798,13 +2842,15 @@ class CodespacesClient:
2798
2842
 
2799
2843
  url = f"/user/codespaces/secrets/{secret_name}"
2800
2844
 
2801
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2802
-
2803
- if not kwargs:
2804
- kwargs = UNSET
2845
+ headers = {
2846
+ "Content-Type": "application/json",
2847
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2848
+ **(headers or {}),
2849
+ }
2805
2850
 
2806
2851
  json = kwargs if data is UNSET else data
2807
- json = type_validate_python(UserCodespacesSecretsSecretNamePutBody, json)
2852
+ if self._github.config.rest_api_validate_body:
2853
+ json = type_validate_python(UserCodespacesSecretsSecretNamePutBody, json)
2808
2854
  json = model_dump(json) if isinstance(json, BaseModel) else json
2809
2855
 
2810
2856
  return self._github.request(
@@ -2859,13 +2905,15 @@ class CodespacesClient:
2859
2905
 
2860
2906
  url = f"/user/codespaces/secrets/{secret_name}"
2861
2907
 
2862
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2863
-
2864
- if not kwargs:
2865
- kwargs = UNSET
2908
+ headers = {
2909
+ "Content-Type": "application/json",
2910
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2911
+ **(headers or {}),
2912
+ }
2866
2913
 
2867
2914
  json = kwargs if data is UNSET else data
2868
- json = type_validate_python(UserCodespacesSecretsSecretNamePutBody, json)
2915
+ if self._github.config.rest_api_validate_body:
2916
+ json = type_validate_python(UserCodespacesSecretsSecretNamePutBody, json)
2869
2917
  json = model_dump(json) if isinstance(json, BaseModel) else json
2870
2918
 
2871
2919
  return await self._github.arequest(
@@ -3012,15 +3060,17 @@ class CodespacesClient:
3012
3060
 
3013
3061
  url = f"/user/codespaces/secrets/{secret_name}/repositories"
3014
3062
 
3015
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3016
-
3017
- if not kwargs:
3018
- kwargs = UNSET
3063
+ headers = {
3064
+ "Content-Type": "application/json",
3065
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3066
+ **(headers or {}),
3067
+ }
3019
3068
 
3020
3069
  json = kwargs if data is UNSET else data
3021
- json = type_validate_python(
3022
- UserCodespacesSecretsSecretNameRepositoriesPutBody, json
3023
- )
3070
+ if self._github.config.rest_api_validate_body:
3071
+ json = type_validate_python(
3072
+ UserCodespacesSecretsSecretNameRepositoriesPutBody, json
3073
+ )
3024
3074
  json = model_dump(json) if isinstance(json, BaseModel) else json
3025
3075
 
3026
3076
  return self._github.request(
@@ -3072,15 +3122,17 @@ class CodespacesClient:
3072
3122
 
3073
3123
  url = f"/user/codespaces/secrets/{secret_name}/repositories"
3074
3124
 
3075
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3076
-
3077
- if not kwargs:
3078
- kwargs = UNSET
3125
+ headers = {
3126
+ "Content-Type": "application/json",
3127
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3128
+ **(headers or {}),
3129
+ }
3079
3130
 
3080
3131
  json = kwargs if data is UNSET else data
3081
- json = type_validate_python(
3082
- UserCodespacesSecretsSecretNameRepositoriesPutBody, json
3083
- )
3132
+ if self._github.config.rest_api_validate_body:
3133
+ json = type_validate_python(
3134
+ UserCodespacesSecretsSecretNameRepositoriesPutBody, json
3135
+ )
3084
3136
  json = model_dump(json) if isinstance(json, BaseModel) else json
3085
3137
 
3086
3138
  return await self._github.arequest(
@@ -3353,13 +3405,15 @@ class CodespacesClient:
3353
3405
 
3354
3406
  url = f"/user/codespaces/{codespace_name}"
3355
3407
 
3356
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3357
-
3358
- if not kwargs:
3359
- kwargs = UNSET
3408
+ headers = {
3409
+ "Content-Type": "application/json",
3410
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3411
+ **(headers or {}),
3412
+ }
3360
3413
 
3361
3414
  json = kwargs if data is UNSET else data
3362
- json = type_validate_python(UserCodespacesCodespaceNamePatchBody, json)
3415
+ if self._github.config.rest_api_validate_body:
3416
+ json = type_validate_python(UserCodespacesCodespaceNamePatchBody, json)
3363
3417
  json = model_dump(json) if isinstance(json, BaseModel) else json
3364
3418
 
3365
3419
  return self._github.request(
@@ -3410,13 +3464,15 @@ class CodespacesClient:
3410
3464
 
3411
3465
  url = f"/user/codespaces/{codespace_name}"
3412
3466
 
3413
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3414
-
3415
- if not kwargs:
3416
- kwargs = UNSET
3467
+ headers = {
3468
+ "Content-Type": "application/json",
3469
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3470
+ **(headers or {}),
3471
+ }
3417
3472
 
3418
3473
  json = kwargs if data is UNSET else data
3419
- json = type_validate_python(UserCodespacesCodespaceNamePatchBody, json)
3474
+ if self._github.config.rest_api_validate_body:
3475
+ json = type_validate_python(UserCodespacesCodespaceNamePatchBody, json)
3420
3476
  json = model_dump(json) if isinstance(json, BaseModel) else json
3421
3477
 
3422
3478
  return await self._github.arequest(
@@ -3637,13 +3693,17 @@ class CodespacesClient:
3637
3693
 
3638
3694
  url = f"/user/codespaces/{codespace_name}/publish"
3639
3695
 
3640
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3641
-
3642
- if not kwargs:
3643
- kwargs = UNSET
3696
+ headers = {
3697
+ "Content-Type": "application/json",
3698
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3699
+ **(headers or {}),
3700
+ }
3644
3701
 
3645
3702
  json = kwargs if data is UNSET else data
3646
- json = type_validate_python(UserCodespacesCodespaceNamePublishPostBody, json)
3703
+ if self._github.config.rest_api_validate_body:
3704
+ json = type_validate_python(
3705
+ UserCodespacesCodespaceNamePublishPostBody, json
3706
+ )
3647
3707
  json = model_dump(json) if isinstance(json, BaseModel) else json
3648
3708
 
3649
3709
  return self._github.request(
@@ -3699,13 +3759,17 @@ class CodespacesClient:
3699
3759
 
3700
3760
  url = f"/user/codespaces/{codespace_name}/publish"
3701
3761
 
3702
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3703
-
3704
- if not kwargs:
3705
- kwargs = UNSET
3762
+ headers = {
3763
+ "Content-Type": "application/json",
3764
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3765
+ **(headers or {}),
3766
+ }
3706
3767
 
3707
3768
  json = kwargs if data is UNSET else data
3708
- json = type_validate_python(UserCodespacesCodespaceNamePublishPostBody, json)
3769
+ if self._github.config.rest_api_validate_body:
3770
+ json = type_validate_python(
3771
+ UserCodespacesCodespaceNamePublishPostBody, json
3772
+ )
3709
3773
  json = model_dump(json) if isinstance(json, BaseModel) else json
3710
3774
 
3711
3775
  return await self._github.arequest(