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
@@ -387,13 +387,15 @@ class OrgsClient:
387
387
 
388
388
  url = f"/orgs/{org}"
389
389
 
390
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
391
-
392
- if not kwargs:
393
- kwargs = UNSET
390
+ headers = {
391
+ "Content-Type": "application/json",
392
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
393
+ **(headers or {}),
394
+ }
394
395
 
395
396
  json = kwargs if data is UNSET else data
396
- json = type_validate_python(OrgsOrgPatchBody, json)
397
+ if self._github.config.rest_api_validate_body:
398
+ json = type_validate_python(OrgsOrgPatchBody, json)
397
399
  json = model_dump(json) if isinstance(json, BaseModel) else json
398
400
 
399
401
  return self._github.request(
@@ -484,13 +486,15 @@ class OrgsClient:
484
486
 
485
487
  url = f"/orgs/{org}"
486
488
 
487
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
488
-
489
- if not kwargs:
490
- kwargs = UNSET
489
+ headers = {
490
+ "Content-Type": "application/json",
491
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
492
+ **(headers or {}),
493
+ }
491
494
 
492
495
  json = kwargs if data is UNSET else data
493
- json = type_validate_python(OrgsOrgPatchBody, json)
496
+ if self._github.config.rest_api_validate_body:
497
+ json = type_validate_python(OrgsOrgPatchBody, json)
494
498
  json = model_dump(json) if isinstance(json, BaseModel) else json
495
499
 
496
500
  return await self._github.arequest(
@@ -617,13 +621,15 @@ class OrgsClient:
617
621
 
618
622
  url = f"/orgs/{org}/announcement"
619
623
 
620
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
621
-
622
- if not kwargs:
623
- kwargs = UNSET
624
+ headers = {
625
+ "Content-Type": "application/json",
626
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
627
+ **(headers or {}),
628
+ }
624
629
 
625
630
  json = kwargs if data is UNSET else data
626
- json = type_validate_python(Announcement, json)
631
+ if self._github.config.rest_api_validate_body:
632
+ json = type_validate_python(Announcement, json)
627
633
  json = model_dump(json) if isinstance(json, BaseModel) else json
628
634
 
629
635
  return self._github.request(
@@ -668,13 +674,15 @@ class OrgsClient:
668
674
 
669
675
  url = f"/orgs/{org}/announcement"
670
676
 
671
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
672
-
673
- if not kwargs:
674
- kwargs = UNSET
677
+ headers = {
678
+ "Content-Type": "application/json",
679
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
680
+ **(headers or {}),
681
+ }
675
682
 
676
683
  json = kwargs if data is UNSET else data
677
- json = type_validate_python(Announcement, json)
684
+ if self._github.config.rest_api_validate_body:
685
+ json = type_validate_python(Announcement, json)
678
686
  json = model_dump(json) if isinstance(json, BaseModel) else json
679
687
 
680
688
  return await self._github.arequest(
@@ -1220,13 +1228,17 @@ class OrgsClient:
1220
1228
 
1221
1229
  url = f"/orgs/{org}/custom-repository-roles"
1222
1230
 
1223
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1224
-
1225
- if not kwargs:
1226
- kwargs = UNSET
1231
+ headers = {
1232
+ "Content-Type": "application/json",
1233
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1234
+ **(headers or {}),
1235
+ }
1227
1236
 
1228
1237
  json = kwargs if data is UNSET else data
1229
- json = type_validate_python(OrganizationCustomRepositoryRoleCreateSchema, json)
1238
+ if self._github.config.rest_api_validate_body:
1239
+ json = type_validate_python(
1240
+ OrganizationCustomRepositoryRoleCreateSchema, json
1241
+ )
1230
1242
  json = model_dump(json) if isinstance(json, BaseModel) else json
1231
1243
 
1232
1244
  return self._github.request(
@@ -1282,13 +1294,17 @@ class OrgsClient:
1282
1294
 
1283
1295
  url = f"/orgs/{org}/custom-repository-roles"
1284
1296
 
1285
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1286
-
1287
- if not kwargs:
1288
- kwargs = UNSET
1297
+ headers = {
1298
+ "Content-Type": "application/json",
1299
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1300
+ **(headers or {}),
1301
+ }
1289
1302
 
1290
1303
  json = kwargs if data is UNSET else data
1291
- json = type_validate_python(OrganizationCustomRepositoryRoleCreateSchema, json)
1304
+ if self._github.config.rest_api_validate_body:
1305
+ json = type_validate_python(
1306
+ OrganizationCustomRepositoryRoleCreateSchema, json
1307
+ )
1292
1308
  json = model_dump(json) if isinstance(json, BaseModel) else json
1293
1309
 
1294
1310
  return await self._github.arequest(
@@ -1435,13 +1451,17 @@ class OrgsClient:
1435
1451
 
1436
1452
  url = f"/orgs/{org}/custom-repository-roles/{role_id}"
1437
1453
 
1438
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1439
-
1440
- if not kwargs:
1441
- kwargs = UNSET
1454
+ headers = {
1455
+ "Content-Type": "application/json",
1456
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1457
+ **(headers or {}),
1458
+ }
1442
1459
 
1443
1460
  json = kwargs if data is UNSET else data
1444
- json = type_validate_python(OrganizationCustomRepositoryRoleUpdateSchema, json)
1461
+ if self._github.config.rest_api_validate_body:
1462
+ json = type_validate_python(
1463
+ OrganizationCustomRepositoryRoleUpdateSchema, json
1464
+ )
1445
1465
  json = model_dump(json) if isinstance(json, BaseModel) else json
1446
1466
 
1447
1467
  return self._github.request(
@@ -1500,13 +1520,17 @@ class OrgsClient:
1500
1520
 
1501
1521
  url = f"/orgs/{org}/custom-repository-roles/{role_id}"
1502
1522
 
1503
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1504
-
1505
- if not kwargs:
1506
- kwargs = UNSET
1523
+ headers = {
1524
+ "Content-Type": "application/json",
1525
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1526
+ **(headers or {}),
1527
+ }
1507
1528
 
1508
1529
  json = kwargs if data is UNSET else data
1509
- json = type_validate_python(OrganizationCustomRepositoryRoleUpdateSchema, json)
1530
+ if self._github.config.rest_api_validate_body:
1531
+ json = type_validate_python(
1532
+ OrganizationCustomRepositoryRoleUpdateSchema, json
1533
+ )
1510
1534
  json = model_dump(json) if isinstance(json, BaseModel) else json
1511
1535
 
1512
1536
  return await self._github.arequest(
@@ -1562,13 +1586,17 @@ class OrgsClient:
1562
1586
 
1563
1587
  url = f"/orgs/{org}/custom_roles"
1564
1588
 
1565
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1566
-
1567
- if not kwargs:
1568
- kwargs = UNSET
1589
+ headers = {
1590
+ "Content-Type": "application/json",
1591
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1592
+ **(headers or {}),
1593
+ }
1569
1594
 
1570
1595
  json = kwargs if data is UNSET else data
1571
- json = type_validate_python(OrganizationCustomRepositoryRoleCreateSchema, json)
1596
+ if self._github.config.rest_api_validate_body:
1597
+ json = type_validate_python(
1598
+ OrganizationCustomRepositoryRoleCreateSchema, json
1599
+ )
1572
1600
  json = model_dump(json) if isinstance(json, BaseModel) else json
1573
1601
 
1574
1602
  return self._github.request(
@@ -1624,13 +1652,17 @@ class OrgsClient:
1624
1652
 
1625
1653
  url = f"/orgs/{org}/custom_roles"
1626
1654
 
1627
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1628
-
1629
- if not kwargs:
1630
- kwargs = UNSET
1655
+ headers = {
1656
+ "Content-Type": "application/json",
1657
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1658
+ **(headers or {}),
1659
+ }
1631
1660
 
1632
1661
  json = kwargs if data is UNSET else data
1633
- json = type_validate_python(OrganizationCustomRepositoryRoleCreateSchema, json)
1662
+ if self._github.config.rest_api_validate_body:
1663
+ json = type_validate_python(
1664
+ OrganizationCustomRepositoryRoleCreateSchema, json
1665
+ )
1634
1666
  json = model_dump(json) if isinstance(json, BaseModel) else json
1635
1667
 
1636
1668
  return await self._github.arequest(
@@ -1777,13 +1809,17 @@ class OrgsClient:
1777
1809
 
1778
1810
  url = f"/orgs/{org}/custom_roles/{role_id}"
1779
1811
 
1780
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1781
-
1782
- if not kwargs:
1783
- kwargs = UNSET
1812
+ headers = {
1813
+ "Content-Type": "application/json",
1814
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1815
+ **(headers or {}),
1816
+ }
1784
1817
 
1785
1818
  json = kwargs if data is UNSET else data
1786
- json = type_validate_python(OrganizationCustomRepositoryRoleUpdateSchema, json)
1819
+ if self._github.config.rest_api_validate_body:
1820
+ json = type_validate_python(
1821
+ OrganizationCustomRepositoryRoleUpdateSchema, json
1822
+ )
1787
1823
  json = model_dump(json) if isinstance(json, BaseModel) else json
1788
1824
 
1789
1825
  return self._github.request(
@@ -1842,13 +1878,17 @@ class OrgsClient:
1842
1878
 
1843
1879
  url = f"/orgs/{org}/custom_roles/{role_id}"
1844
1880
 
1845
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1846
-
1847
- if not kwargs:
1848
- kwargs = UNSET
1881
+ headers = {
1882
+ "Content-Type": "application/json",
1883
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1884
+ **(headers or {}),
1885
+ }
1849
1886
 
1850
1887
  json = kwargs if data is UNSET else data
1851
- json = type_validate_python(OrganizationCustomRepositoryRoleUpdateSchema, json)
1888
+ if self._github.config.rest_api_validate_body:
1889
+ json = type_validate_python(
1890
+ OrganizationCustomRepositoryRoleUpdateSchema, json
1891
+ )
1852
1892
  json = model_dump(json) if isinstance(json, BaseModel) else json
1853
1893
 
1854
1894
  return await self._github.arequest(
@@ -2081,13 +2121,15 @@ class OrgsClient:
2081
2121
 
2082
2122
  url = f"/orgs/{org}/hooks"
2083
2123
 
2084
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2085
-
2086
- if not kwargs:
2087
- kwargs = UNSET
2124
+ headers = {
2125
+ "Content-Type": "application/json",
2126
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2127
+ **(headers or {}),
2128
+ }
2088
2129
 
2089
2130
  json = kwargs if data is UNSET else data
2090
- json = type_validate_python(OrgsOrgHooksPostBody, json)
2131
+ if self._github.config.rest_api_validate_body:
2132
+ json = type_validate_python(OrgsOrgHooksPostBody, json)
2091
2133
  json = model_dump(json) if isinstance(json, BaseModel) else json
2092
2134
 
2093
2135
  return self._github.request(
@@ -2138,13 +2180,15 @@ class OrgsClient:
2138
2180
 
2139
2181
  url = f"/orgs/{org}/hooks"
2140
2182
 
2141
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2142
-
2143
- if not kwargs:
2144
- kwargs = UNSET
2183
+ headers = {
2184
+ "Content-Type": "application/json",
2185
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2186
+ **(headers or {}),
2187
+ }
2145
2188
 
2146
2189
  json = kwargs if data is UNSET else data
2147
- json = type_validate_python(OrgsOrgHooksPostBody, json)
2190
+ if self._github.config.rest_api_validate_body:
2191
+ json = type_validate_python(OrgsOrgHooksPostBody, json)
2148
2192
  json = model_dump(json) if isinstance(json, BaseModel) else json
2149
2193
 
2150
2194
  return await self._github.arequest(
@@ -2301,13 +2345,15 @@ class OrgsClient:
2301
2345
 
2302
2346
  url = f"/orgs/{org}/hooks/{hook_id}"
2303
2347
 
2304
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2305
-
2306
- if not kwargs:
2307
- kwargs = UNSET
2348
+ headers = {
2349
+ "Content-Type": "application/json",
2350
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2351
+ **(headers or {}),
2352
+ }
2308
2353
 
2309
2354
  json = kwargs if data is UNSET else data
2310
- json = type_validate_python(OrgsOrgHooksHookIdPatchBody, json)
2355
+ if self._github.config.rest_api_validate_body:
2356
+ json = type_validate_python(OrgsOrgHooksHookIdPatchBody, json)
2311
2357
  json = model_dump(json) if isinstance(json, BaseModel) else json
2312
2358
 
2313
2359
  return self._github.request(
@@ -2366,13 +2412,15 @@ class OrgsClient:
2366
2412
 
2367
2413
  url = f"/orgs/{org}/hooks/{hook_id}"
2368
2414
 
2369
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2370
-
2371
- if not kwargs:
2372
- kwargs = UNSET
2415
+ headers = {
2416
+ "Content-Type": "application/json",
2417
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2418
+ **(headers or {}),
2419
+ }
2373
2420
 
2374
2421
  json = kwargs if data is UNSET else data
2375
- json = type_validate_python(OrgsOrgHooksHookIdPatchBody, json)
2422
+ if self._github.config.rest_api_validate_body:
2423
+ json = type_validate_python(OrgsOrgHooksHookIdPatchBody, json)
2376
2424
  json = model_dump(json) if isinstance(json, BaseModel) else json
2377
2425
 
2378
2426
  return await self._github.arequest(
@@ -2470,13 +2518,15 @@ class OrgsClient:
2470
2518
 
2471
2519
  url = f"/orgs/{org}/hooks/{hook_id}/config"
2472
2520
 
2473
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2474
-
2475
- if not kwargs:
2476
- kwargs = UNSET
2521
+ headers = {
2522
+ "Content-Type": "application/json",
2523
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2524
+ **(headers or {}),
2525
+ }
2477
2526
 
2478
2527
  json = kwargs if data is UNSET else data
2479
- json = type_validate_python(OrgsOrgHooksHookIdConfigPatchBody, json)
2528
+ if self._github.config.rest_api_validate_body:
2529
+ json = type_validate_python(OrgsOrgHooksHookIdConfigPatchBody, json)
2480
2530
  json = model_dump(json) if isinstance(json, BaseModel) else json
2481
2531
 
2482
2532
  return self._github.request(
@@ -2526,13 +2576,15 @@ class OrgsClient:
2526
2576
 
2527
2577
  url = f"/orgs/{org}/hooks/{hook_id}/config"
2528
2578
 
2529
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2530
-
2531
- if not kwargs:
2532
- kwargs = UNSET
2579
+ headers = {
2580
+ "Content-Type": "application/json",
2581
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2582
+ **(headers or {}),
2583
+ }
2533
2584
 
2534
2585
  json = kwargs if data is UNSET else data
2535
- json = type_validate_python(OrgsOrgHooksHookIdConfigPatchBody, json)
2586
+ if self._github.config.rest_api_validate_body:
2587
+ json = type_validate_python(OrgsOrgHooksHookIdConfigPatchBody, json)
2536
2588
  json = model_dump(json) if isinstance(json, BaseModel) else json
2537
2589
 
2538
2590
  return await self._github.arequest(
@@ -2968,13 +3020,15 @@ class OrgsClient:
2968
3020
 
2969
3021
  url = f"/orgs/{org}/invitations"
2970
3022
 
2971
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2972
-
2973
- if not kwargs:
2974
- kwargs = UNSET
3023
+ headers = {
3024
+ "Content-Type": "application/json",
3025
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3026
+ **(headers or {}),
3027
+ }
2975
3028
 
2976
3029
  json = kwargs if data is UNSET else data
2977
- json = type_validate_python(OrgsOrgInvitationsPostBody, json)
3030
+ if self._github.config.rest_api_validate_body:
3031
+ json = type_validate_python(OrgsOrgInvitationsPostBody, json)
2978
3032
  json = model_dump(json) if isinstance(json, BaseModel) else json
2979
3033
 
2980
3034
  return self._github.request(
@@ -3032,13 +3086,15 @@ class OrgsClient:
3032
3086
 
3033
3087
  url = f"/orgs/{org}/invitations"
3034
3088
 
3035
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3036
-
3037
- if not kwargs:
3038
- kwargs = UNSET
3089
+ headers = {
3090
+ "Content-Type": "application/json",
3091
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3092
+ **(headers or {}),
3093
+ }
3039
3094
 
3040
3095
  json = kwargs if data is UNSET else data
3041
- json = type_validate_python(OrgsOrgInvitationsPostBody, json)
3096
+ if self._github.config.rest_api_validate_body:
3097
+ json = type_validate_python(OrgsOrgInvitationsPostBody, json)
3042
3098
  json = model_dump(json) if isinstance(json, BaseModel) else json
3043
3099
 
3044
3100
  return await self._github.arequest(
@@ -3430,13 +3486,15 @@ class OrgsClient:
3430
3486
 
3431
3487
  url = f"/orgs/{org}/memberships/{username}"
3432
3488
 
3433
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3434
-
3435
- if not kwargs:
3436
- kwargs = UNSET
3489
+ headers = {
3490
+ "Content-Type": "application/json",
3491
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3492
+ **(headers or {}),
3493
+ }
3437
3494
 
3438
3495
  json = kwargs if data is UNSET else data
3439
- json = type_validate_python(OrgsOrgMembershipsUsernamePutBody, json)
3496
+ if self._github.config.rest_api_validate_body:
3497
+ json = type_validate_python(OrgsOrgMembershipsUsernamePutBody, json)
3440
3498
  json = model_dump(json) if isinstance(json, BaseModel) else json
3441
3499
 
3442
3500
  return self._github.request(
@@ -3492,13 +3550,15 @@ class OrgsClient:
3492
3550
 
3493
3551
  url = f"/orgs/{org}/memberships/{username}"
3494
3552
 
3495
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3496
-
3497
- if not kwargs:
3498
- kwargs = UNSET
3553
+ headers = {
3554
+ "Content-Type": "application/json",
3555
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3556
+ **(headers or {}),
3557
+ }
3499
3558
 
3500
3559
  json = kwargs if data is UNSET else data
3501
- json = type_validate_python(OrgsOrgMembershipsUsernamePutBody, json)
3560
+ if self._github.config.rest_api_validate_body:
3561
+ json = type_validate_python(OrgsOrgMembershipsUsernamePutBody, json)
3502
3562
  json = model_dump(json) if isinstance(json, BaseModel) else json
3503
3563
 
3504
3564
  return await self._github.arequest(
@@ -3726,15 +3786,17 @@ class OrgsClient:
3726
3786
 
3727
3787
  url = f"/orgs/{org}/organization-roles"
3728
3788
 
3729
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3730
-
3731
- if not kwargs:
3732
- kwargs = UNSET
3789
+ headers = {
3790
+ "Content-Type": "application/json",
3791
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3792
+ **(headers or {}),
3793
+ }
3733
3794
 
3734
3795
  json = kwargs if data is UNSET else data
3735
- json = type_validate_python(
3736
- OrganizationCustomOrganizationRoleCreateSchema, json
3737
- )
3796
+ if self._github.config.rest_api_validate_body:
3797
+ json = type_validate_python(
3798
+ OrganizationCustomOrganizationRoleCreateSchema, json
3799
+ )
3738
3800
  json = model_dump(json) if isinstance(json, BaseModel) else json
3739
3801
 
3740
3802
  return self._github.request(
@@ -3793,15 +3855,17 @@ class OrgsClient:
3793
3855
 
3794
3856
  url = f"/orgs/{org}/organization-roles"
3795
3857
 
3796
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3797
-
3798
- if not kwargs:
3799
- kwargs = UNSET
3858
+ headers = {
3859
+ "Content-Type": "application/json",
3860
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3861
+ **(headers or {}),
3862
+ }
3800
3863
 
3801
3864
  json = kwargs if data is UNSET else data
3802
- json = type_validate_python(
3803
- OrganizationCustomOrganizationRoleCreateSchema, json
3804
- )
3865
+ if self._github.config.rest_api_validate_body:
3866
+ json = type_validate_python(
3867
+ OrganizationCustomOrganizationRoleCreateSchema, json
3868
+ )
3805
3869
  json = model_dump(json) if isinstance(json, BaseModel) else json
3806
3870
 
3807
3871
  return await self._github.arequest(
@@ -4193,15 +4257,17 @@ class OrgsClient:
4193
4257
 
4194
4258
  url = f"/orgs/{org}/organization-roles/{role_id}"
4195
4259
 
4196
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4197
-
4198
- if not kwargs:
4199
- kwargs = UNSET
4260
+ headers = {
4261
+ "Content-Type": "application/json",
4262
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4263
+ **(headers or {}),
4264
+ }
4200
4265
 
4201
4266
  json = kwargs if data is UNSET else data
4202
- json = type_validate_python(
4203
- OrganizationCustomOrganizationRoleUpdateSchema, json
4204
- )
4267
+ if self._github.config.rest_api_validate_body:
4268
+ json = type_validate_python(
4269
+ OrganizationCustomOrganizationRoleUpdateSchema, json
4270
+ )
4205
4271
  json = model_dump(json) if isinstance(json, BaseModel) else json
4206
4272
 
4207
4273
  return self._github.request(
@@ -4263,15 +4329,17 @@ class OrgsClient:
4263
4329
 
4264
4330
  url = f"/orgs/{org}/organization-roles/{role_id}"
4265
4331
 
4266
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4267
-
4268
- if not kwargs:
4269
- kwargs = UNSET
4332
+ headers = {
4333
+ "Content-Type": "application/json",
4334
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4335
+ **(headers or {}),
4336
+ }
4270
4337
 
4271
4338
  json = kwargs if data is UNSET else data
4272
- json = type_validate_python(
4273
- OrganizationCustomOrganizationRoleUpdateSchema, json
4274
- )
4339
+ if self._github.config.rest_api_validate_body:
4340
+ json = type_validate_python(
4341
+ OrganizationCustomOrganizationRoleUpdateSchema, json
4342
+ )
4275
4343
  json = model_dump(json) if isinstance(json, BaseModel) else json
4276
4344
 
4277
4345
  return await self._github.arequest(
@@ -4525,13 +4593,17 @@ class OrgsClient:
4525
4593
 
4526
4594
  url = f"/orgs/{org}/outside_collaborators/{username}"
4527
4595
 
4528
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4529
-
4530
- if not kwargs:
4531
- kwargs = UNSET
4596
+ headers = {
4597
+ "Content-Type": "application/json",
4598
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4599
+ **(headers or {}),
4600
+ }
4532
4601
 
4533
4602
  json = kwargs if data is UNSET else data
4534
- json = type_validate_python(OrgsOrgOutsideCollaboratorsUsernamePutBody, json)
4603
+ if self._github.config.rest_api_validate_body:
4604
+ json = type_validate_python(
4605
+ OrgsOrgOutsideCollaboratorsUsernamePutBody, json
4606
+ )
4535
4607
  json = model_dump(json) if isinstance(json, BaseModel) else json
4536
4608
 
4537
4609
  return self._github.request(
@@ -4585,13 +4657,17 @@ class OrgsClient:
4585
4657
 
4586
4658
  url = f"/orgs/{org}/outside_collaborators/{username}"
4587
4659
 
4588
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4589
-
4590
- if not kwargs:
4591
- kwargs = UNSET
4660
+ headers = {
4661
+ "Content-Type": "application/json",
4662
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4663
+ **(headers or {}),
4664
+ }
4592
4665
 
4593
4666
  json = kwargs if data is UNSET else data
4594
- json = type_validate_python(OrgsOrgOutsideCollaboratorsUsernamePutBody, json)
4667
+ if self._github.config.rest_api_validate_body:
4668
+ json = type_validate_python(
4669
+ OrgsOrgOutsideCollaboratorsUsernamePutBody, json
4670
+ )
4595
4671
  json = model_dump(json) if isinstance(json, BaseModel) else json
4596
4672
 
4597
4673
  return await self._github.arequest(
@@ -4803,13 +4879,17 @@ class OrgsClient:
4803
4879
 
4804
4880
  url = f"/orgs/{org}/personal-access-token-requests"
4805
4881
 
4806
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4807
-
4808
- if not kwargs:
4809
- kwargs = UNSET
4882
+ headers = {
4883
+ "Content-Type": "application/json",
4884
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4885
+ **(headers or {}),
4886
+ }
4810
4887
 
4811
4888
  json = kwargs if data is UNSET else data
4812
- json = type_validate_python(OrgsOrgPersonalAccessTokenRequestsPostBody, json)
4889
+ if self._github.config.rest_api_validate_body:
4890
+ json = type_validate_python(
4891
+ OrgsOrgPersonalAccessTokenRequestsPostBody, json
4892
+ )
4813
4893
  json = model_dump(json) if isinstance(json, BaseModel) else json
4814
4894
 
4815
4895
  return self._github.request(
@@ -4866,13 +4946,17 @@ class OrgsClient:
4866
4946
 
4867
4947
  url = f"/orgs/{org}/personal-access-token-requests"
4868
4948
 
4869
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4870
-
4871
- if not kwargs:
4872
- kwargs = UNSET
4949
+ headers = {
4950
+ "Content-Type": "application/json",
4951
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4952
+ **(headers or {}),
4953
+ }
4873
4954
 
4874
4955
  json = kwargs if data is UNSET else data
4875
- json = type_validate_python(OrgsOrgPersonalAccessTokenRequestsPostBody, json)
4956
+ if self._github.config.rest_api_validate_body:
4957
+ json = type_validate_python(
4958
+ OrgsOrgPersonalAccessTokenRequestsPostBody, json
4959
+ )
4876
4960
  json = model_dump(json) if isinstance(json, BaseModel) else json
4877
4961
 
4878
4962
  return await self._github.arequest(
@@ -4932,15 +5016,17 @@ class OrgsClient:
4932
5016
 
4933
5017
  url = f"/orgs/{org}/personal-access-token-requests/{pat_request_id}"
4934
5018
 
4935
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4936
-
4937
- if not kwargs:
4938
- kwargs = UNSET
5019
+ headers = {
5020
+ "Content-Type": "application/json",
5021
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5022
+ **(headers or {}),
5023
+ }
4939
5024
 
4940
5025
  json = kwargs if data is UNSET else data
4941
- json = type_validate_python(
4942
- OrgsOrgPersonalAccessTokenRequestsPatRequestIdPostBody, json
4943
- )
5026
+ if self._github.config.rest_api_validate_body:
5027
+ json = type_validate_python(
5028
+ OrgsOrgPersonalAccessTokenRequestsPatRequestIdPostBody, json
5029
+ )
4944
5030
  json = model_dump(json) if isinstance(json, BaseModel) else json
4945
5031
 
4946
5032
  return self._github.request(
@@ -4999,15 +5085,17 @@ class OrgsClient:
4999
5085
 
5000
5086
  url = f"/orgs/{org}/personal-access-token-requests/{pat_request_id}"
5001
5087
 
5002
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5003
-
5004
- if not kwargs:
5005
- kwargs = UNSET
5088
+ headers = {
5089
+ "Content-Type": "application/json",
5090
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5091
+ **(headers or {}),
5092
+ }
5006
5093
 
5007
5094
  json = kwargs if data is UNSET else data
5008
- json = type_validate_python(
5009
- OrgsOrgPersonalAccessTokenRequestsPatRequestIdPostBody, json
5010
- )
5095
+ if self._github.config.rest_api_validate_body:
5096
+ json = type_validate_python(
5097
+ OrgsOrgPersonalAccessTokenRequestsPatRequestIdPostBody, json
5098
+ )
5011
5099
  json = model_dump(json) if isinstance(json, BaseModel) else json
5012
5100
 
5013
5101
  return await self._github.arequest(
@@ -5250,13 +5338,15 @@ class OrgsClient:
5250
5338
 
5251
5339
  url = f"/orgs/{org}/personal-access-tokens"
5252
5340
 
5253
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5254
-
5255
- if not kwargs:
5256
- kwargs = UNSET
5341
+ headers = {
5342
+ "Content-Type": "application/json",
5343
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5344
+ **(headers or {}),
5345
+ }
5257
5346
 
5258
5347
  json = kwargs if data is UNSET else data
5259
- json = type_validate_python(OrgsOrgPersonalAccessTokensPostBody, json)
5348
+ if self._github.config.rest_api_validate_body:
5349
+ json = type_validate_python(OrgsOrgPersonalAccessTokensPostBody, json)
5260
5350
  json = model_dump(json) if isinstance(json, BaseModel) else json
5261
5351
 
5262
5352
  return self._github.request(
@@ -5312,13 +5402,15 @@ class OrgsClient:
5312
5402
 
5313
5403
  url = f"/orgs/{org}/personal-access-tokens"
5314
5404
 
5315
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5316
-
5317
- if not kwargs:
5318
- kwargs = UNSET
5405
+ headers = {
5406
+ "Content-Type": "application/json",
5407
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5408
+ **(headers or {}),
5409
+ }
5319
5410
 
5320
5411
  json = kwargs if data is UNSET else data
5321
- json = type_validate_python(OrgsOrgPersonalAccessTokensPostBody, json)
5412
+ if self._github.config.rest_api_validate_body:
5413
+ json = type_validate_python(OrgsOrgPersonalAccessTokensPostBody, json)
5322
5414
  json = model_dump(json) if isinstance(json, BaseModel) else json
5323
5415
 
5324
5416
  return await self._github.arequest(
@@ -5375,13 +5467,15 @@ class OrgsClient:
5375
5467
 
5376
5468
  url = f"/orgs/{org}/personal-access-tokens/{pat_id}"
5377
5469
 
5378
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5379
-
5380
- if not kwargs:
5381
- kwargs = UNSET
5470
+ headers = {
5471
+ "Content-Type": "application/json",
5472
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5473
+ **(headers or {}),
5474
+ }
5382
5475
 
5383
5476
  json = kwargs if data is UNSET else data
5384
- json = type_validate_python(OrgsOrgPersonalAccessTokensPatIdPostBody, json)
5477
+ if self._github.config.rest_api_validate_body:
5478
+ json = type_validate_python(OrgsOrgPersonalAccessTokensPatIdPostBody, json)
5385
5479
  json = model_dump(json) if isinstance(json, BaseModel) else json
5386
5480
 
5387
5481
  return self._github.request(
@@ -5437,13 +5531,15 @@ class OrgsClient:
5437
5531
 
5438
5532
  url = f"/orgs/{org}/personal-access-tokens/{pat_id}"
5439
5533
 
5440
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5441
-
5442
- if not kwargs:
5443
- kwargs = UNSET
5534
+ headers = {
5535
+ "Content-Type": "application/json",
5536
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5537
+ **(headers or {}),
5538
+ }
5444
5539
 
5445
5540
  json = kwargs if data is UNSET else data
5446
- json = type_validate_python(OrgsOrgPersonalAccessTokensPatIdPostBody, json)
5541
+ if self._github.config.rest_api_validate_body:
5542
+ json = type_validate_python(OrgsOrgPersonalAccessTokensPatIdPostBody, json)
5447
5543
  json = model_dump(json) if isinstance(json, BaseModel) else json
5448
5544
 
5449
5545
  return await self._github.arequest(
@@ -5626,13 +5722,15 @@ class OrgsClient:
5626
5722
 
5627
5723
  url = f"/orgs/{org}/properties/schema"
5628
5724
 
5629
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5630
-
5631
- if not kwargs:
5632
- kwargs = UNSET
5725
+ headers = {
5726
+ "Content-Type": "application/json",
5727
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5728
+ **(headers or {}),
5729
+ }
5633
5730
 
5634
5731
  json = kwargs if data is UNSET else data
5635
- json = type_validate_python(OrgsOrgPropertiesSchemaPatchBody, json)
5732
+ if self._github.config.rest_api_validate_body:
5733
+ json = type_validate_python(OrgsOrgPropertiesSchemaPatchBody, json)
5636
5734
  json = model_dump(json) if isinstance(json, BaseModel) else json
5637
5735
 
5638
5736
  return self._github.request(
@@ -5686,13 +5784,15 @@ class OrgsClient:
5686
5784
 
5687
5785
  url = f"/orgs/{org}/properties/schema"
5688
5786
 
5689
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5690
-
5691
- if not kwargs:
5692
- kwargs = UNSET
5787
+ headers = {
5788
+ "Content-Type": "application/json",
5789
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5790
+ **(headers or {}),
5791
+ }
5693
5792
 
5694
5793
  json = kwargs if data is UNSET else data
5695
- json = type_validate_python(OrgsOrgPropertiesSchemaPatchBody, json)
5794
+ if self._github.config.rest_api_validate_body:
5795
+ json = type_validate_python(OrgsOrgPropertiesSchemaPatchBody, json)
5696
5796
  json = model_dump(json) if isinstance(json, BaseModel) else json
5697
5797
 
5698
5798
  return await self._github.arequest(
@@ -5803,15 +5903,17 @@ class OrgsClient:
5803
5903
 
5804
5904
  url = f"/orgs/{org}/properties/schema/{custom_property_name}"
5805
5905
 
5806
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5807
-
5808
- if not kwargs:
5809
- kwargs = UNSET
5906
+ headers = {
5907
+ "Content-Type": "application/json",
5908
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5909
+ **(headers or {}),
5910
+ }
5810
5911
 
5811
5912
  json = kwargs if data is UNSET else data
5812
- json = type_validate_python(
5813
- OrgsOrgPropertiesSchemaCustomPropertyNamePutBody, json
5814
- )
5913
+ if self._github.config.rest_api_validate_body:
5914
+ json = type_validate_python(
5915
+ OrgsOrgPropertiesSchemaCustomPropertyNamePutBody, json
5916
+ )
5815
5917
  json = model_dump(json) if isinstance(json, BaseModel) else json
5816
5918
 
5817
5919
  return self._github.request(
@@ -5870,15 +5972,17 @@ class OrgsClient:
5870
5972
 
5871
5973
  url = f"/orgs/{org}/properties/schema/{custom_property_name}"
5872
5974
 
5873
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5874
-
5875
- if not kwargs:
5876
- kwargs = UNSET
5975
+ headers = {
5976
+ "Content-Type": "application/json",
5977
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5978
+ **(headers or {}),
5979
+ }
5877
5980
 
5878
5981
  json = kwargs if data is UNSET else data
5879
- json = type_validate_python(
5880
- OrgsOrgPropertiesSchemaCustomPropertyNamePutBody, json
5881
- )
5982
+ if self._github.config.rest_api_validate_body:
5983
+ json = type_validate_python(
5984
+ OrgsOrgPropertiesSchemaCustomPropertyNamePutBody, json
5985
+ )
5882
5986
  json = model_dump(json) if isinstance(json, BaseModel) else json
5883
5987
 
5884
5988
  return await self._github.arequest(
@@ -6055,13 +6159,15 @@ class OrgsClient:
6055
6159
 
6056
6160
  url = f"/orgs/{org}/properties/values"
6057
6161
 
6058
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6059
-
6060
- if not kwargs:
6061
- kwargs = UNSET
6162
+ headers = {
6163
+ "Content-Type": "application/json",
6164
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6165
+ **(headers or {}),
6166
+ }
6062
6167
 
6063
6168
  json = kwargs if data is UNSET else data
6064
- json = type_validate_python(OrgsOrgPropertiesValuesPatchBody, json)
6169
+ if self._github.config.rest_api_validate_body:
6170
+ json = type_validate_python(OrgsOrgPropertiesValuesPatchBody, json)
6065
6171
  json = model_dump(json) if isinstance(json, BaseModel) else json
6066
6172
 
6067
6173
  return self._github.request(
@@ -6114,13 +6220,15 @@ class OrgsClient:
6114
6220
 
6115
6221
  url = f"/orgs/{org}/properties/values"
6116
6222
 
6117
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6118
-
6119
- if not kwargs:
6120
- kwargs = UNSET
6223
+ headers = {
6224
+ "Content-Type": "application/json",
6225
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6226
+ **(headers or {}),
6227
+ }
6121
6228
 
6122
6229
  json = kwargs if data is UNSET else data
6123
- json = type_validate_python(OrgsOrgPropertiesValuesPatchBody, json)
6230
+ if self._github.config.rest_api_validate_body:
6231
+ json = type_validate_python(OrgsOrgPropertiesValuesPatchBody, json)
6124
6232
  json = model_dump(json) if isinstance(json, BaseModel) else json
6125
6233
 
6126
6234
  return await self._github.arequest(
@@ -6554,13 +6662,15 @@ class OrgsClient:
6554
6662
 
6555
6663
  url = f"/orgs/{org}/{security_product}/{enablement}"
6556
6664
 
6557
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6558
-
6559
- if not kwargs:
6560
- kwargs = UNSET
6665
+ headers = {
6666
+ "Content-Type": "application/json",
6667
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6668
+ **(headers or {}),
6669
+ }
6561
6670
 
6562
6671
  json = kwargs if data is UNSET else data
6563
- json = type_validate_python(OrgsOrgSecurityProductEnablementPostBody, json)
6672
+ if self._github.config.rest_api_validate_body:
6673
+ json = type_validate_python(OrgsOrgSecurityProductEnablementPostBody, json)
6564
6674
  json = model_dump(json) if isinstance(json, BaseModel) else json
6565
6675
 
6566
6676
  return self._github.request(
@@ -6634,13 +6744,15 @@ class OrgsClient:
6634
6744
 
6635
6745
  url = f"/orgs/{org}/{security_product}/{enablement}"
6636
6746
 
6637
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6638
-
6639
- if not kwargs:
6640
- kwargs = UNSET
6747
+ headers = {
6748
+ "Content-Type": "application/json",
6749
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6750
+ **(headers or {}),
6751
+ }
6641
6752
 
6642
6753
  json = kwargs if data is UNSET else data
6643
- json = type_validate_python(OrgsOrgSecurityProductEnablementPostBody, json)
6754
+ if self._github.config.rest_api_validate_body:
6755
+ json = type_validate_python(OrgsOrgSecurityProductEnablementPostBody, json)
6644
6756
  json = model_dump(json) if isinstance(json, BaseModel) else json
6645
6757
 
6646
6758
  return await self._github.arequest(
@@ -6813,13 +6925,15 @@ class OrgsClient:
6813
6925
 
6814
6926
  url = f"/user/memberships/orgs/{org}"
6815
6927
 
6816
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6817
-
6818
- if not kwargs:
6819
- kwargs = UNSET
6928
+ headers = {
6929
+ "Content-Type": "application/json",
6930
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6931
+ **(headers or {}),
6932
+ }
6820
6933
 
6821
6934
  json = kwargs if data is UNSET else data
6822
- json = type_validate_python(UserMembershipsOrgsOrgPatchBody, json)
6935
+ if self._github.config.rest_api_validate_body:
6936
+ json = type_validate_python(UserMembershipsOrgsOrgPatchBody, json)
6823
6937
  json = model_dump(json) if isinstance(json, BaseModel) else json
6824
6938
 
6825
6939
  return self._github.request(
@@ -6873,13 +6987,15 @@ class OrgsClient:
6873
6987
 
6874
6988
  url = f"/user/memberships/orgs/{org}"
6875
6989
 
6876
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6877
-
6878
- if not kwargs:
6879
- kwargs = UNSET
6990
+ headers = {
6991
+ "Content-Type": "application/json",
6992
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6993
+ **(headers or {}),
6994
+ }
6880
6995
 
6881
6996
  json = kwargs if data is UNSET else data
6882
- json = type_validate_python(UserMembershipsOrgsOrgPatchBody, json)
6997
+ if self._github.config.rest_api_validate_body:
6998
+ json = type_validate_python(UserMembershipsOrgsOrgPatchBody, json)
6883
6999
  json = model_dump(json) if isinstance(json, BaseModel) else json
6884
7000
 
6885
7001
  return await self._github.arequest(