Skip to content

Commit 492979d

Browse files
authored
Merge pull request #1554 from php-api-clients/GitHubEnterprise-3.14/from-1.1.4-c6bac21f127e4771c961c4af72e21fc4-from-1.1.4-c6bac21f127e4771c961c4af72e21fc4
2 parents 90437b8 + 1a34384 commit 492979d

File tree

19 files changed

+324
-43
lines changed

19 files changed

+324
-43
lines changed

clients/GitHubEnterprise-3.14/etc/openapi-client-generator.state

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "d5ac2a68d76d323d5182cd11d4daf614",
2+
"specHash": "c6bac21f127e4771c961c4af72e21fc4",
33
"generatedFiles": {
44
"files": [
55
{
@@ -7112,15 +7112,15 @@
71127112
},
71137113
{
71147114
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/UpdateAlert.php",
7115-
"hash": "4414595983724d58e1cdf5c09e8f409f"
7115+
"hash": "b7b8c2aaaf47299f09adbb2b88b5daf5"
71167116
},
71177117
{
71187118
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateAlert.php",
7119-
"hash": "0d58379475f7ab773df9ae4b3b7d84c5"
7119+
"hash": "fd3b96fa7070fd31d1490b2ae4861c54"
71207120
},
71217121
{
71227122
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateAlertTest.php",
7123-
"hash": "5e18056057b185cf3a4348a8b97f093c"
7123+
"hash": "78119db7046be60d7d867ad3af28c6fa"
71247124
},
71257125
{
71267126
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/ListAlertInstances.php",
@@ -15372,15 +15372,15 @@
1537215372
},
1537315373
{
1537415374
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php",
15375-
"hash": "1fc2f779d08ed5752c34175a6d602409"
15375+
"hash": "be43c3a32b264a082842b4342eeed775"
1537615376
},
1537715377
{
1537815378
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php",
15379-
"hash": "838b43367eb6df1a6caf3240812fc8e5"
15379+
"hash": "988efed4f7c1c3059ab0f63d472321a6"
1538015380
},
1538115381
{
1538215382
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php",
15383-
"hash": "5658982cf775d944e65e8d66e337f54f"
15383+
"hash": "bc1f73d90a1b2bbdf5c6f1ecdf0d6ce4"
1538415384
},
1538515385
{
1538615386
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php",
@@ -26072,7 +26072,7 @@
2607226072
},
2607326073
{
2607426074
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UpdateAlert\/Request\/ApplicationJson.php",
26075-
"hash": "ffbb63d8bfc655b760e73bb0a84b41b7"
26075+
"hash": "ef09173d8d817efd8e1e4e81d9f0edcc"
2607626076
},
2607726077
{
2607826078
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UploadSarif\/Request\/ApplicationJson.php",
@@ -27108,7 +27108,7 @@
2710827108
},
2710927109
{
2711027110
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php",
27111-
"hash": "f4eded73dbc98d19cc03cd2545bc0a44"
27111+
"hash": "b169946b91470cd53c5ec292b35ad780"
2711227112
},
2711327113
{
2711427114
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Issues.php",
@@ -27376,7 +27376,7 @@
2737627376
},
2737727377
{
2737827378
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php",
27379-
"hash": "619ee85831f1ccf3b4aa9570bc701fb6"
27379+
"hash": "e6af182f8222fb648cfc3c789507197c"
2738027380
},
2738127381
{
2738227382
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Nine.php",
@@ -27440,11 +27440,11 @@
2744027440
},
2744127441
{
2744227442
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27443-
"hash": "eb9acf050e7c53fe1a316472b8cdc81d"
27443+
"hash": "97dd79ecd381fec3cd9fc9f457fd7a7e"
2744427444
},
2744527445
{
2744627446
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27447-
"hash": "e5864aba0dd4de9cada7ede4eeee69c5"
27447+
"hash": "33e3e8b67ec421309a6fd76be03316dc"
2744827448
},
2744927449
{
2745027450
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27456,7 +27456,7 @@
2745627456
},
2745727457
{
2745827458
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Meta.php",
27459-
"hash": "efb7434a503625c23355172c4638e6bb"
27459+
"hash": "41cc72ff89d01e5b48be965d9a5b63fd"
2746027460
},
2746127461
{
2746227462
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
@@ -27488,7 +27488,7 @@
2748827488
},
2748927489
{
2749027490
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/CodeScanning.php",
27491-
"hash": "035196723d9518e17e7f016fa71af9c8"
27491+
"hash": "254f6e3c029935a79e15b051e78e67ba"
2749227492
},
2749327493
{
2749427494
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/SecretScanning.php",
@@ -27572,7 +27572,7 @@
2757227572
},
2757327573
{
2757427574
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php",
27575-
"hash": "a69f445c74c4b7b7c28abe4e750cc769"
27575+
"hash": "a638452f9411a0fc738141835c32327d"
2757627576
},
2757727577
{
2757827578
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Git.php",
@@ -27584,7 +27584,7 @@
2758427584
},
2758527585
{
2758627586
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Search.php",
27587-
"hash": "6e92f41ff9de1bd3067e80b3f3da380d"
27587+
"hash": "522fda33c8ae6024675365cb3775c1f1"
2758827588
},
2758927589
{
2759027590
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Users.php",
@@ -29028,7 +29028,7 @@
2902829028
},
2902929029
{
2903029030
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber.php",
29031-
"hash": "b9452bc32629313c2650579a65f77f38"
29031+
"hash": "a926bd101b56e9d2fa2d26b4ba0ef2d2"
2903229032
},
2903329033
{
2903429034
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Instances.php",
@@ -30283,20 +30283,24 @@
3028330283
"hash": "d0ca0c14c2d902d47122181008e84185"
3028430284
},
3028530285
{
30286-
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure.php",
30287-
"hash": "402d90be4e3731ec2090b344dd7be2cb"
30286+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
30287+
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
3028830288
},
3028930289
{
30290-
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosureMetadata.php",
30291-
"hash": "481b587324bb974972dd0edc53d33df7"
30290+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertCreateRequest.php",
30291+
"hash": "b1c32113d0944e1335325145d49ced03"
3029230292
},
3029330293
{
30294-
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure\/Data.php",
30295-
"hash": "7e31b58800848793f0d914de6f592979"
30294+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning.php",
30295+
"hash": "4311c37f93cd8a3fa3609969d2db5374"
3029630296
},
3029730297
{
30298-
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
30299-
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
30298+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanningMetadata.php",
30299+
"hash": "4d08e7e942465ee37362f1f5a8df1060"
30300+
},
30301+
{
30302+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning\/Data.php",
30303+
"hash": "2a8bbc4780615e5e98d79b6596143aaf"
3030030304
}
3030130305
]
3030230306
},

clients/GitHubEnterprise-3.14/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
4141

4242
if ($signature === 'data|type' && $value['type'] === 'secret_scanning_closure') {
4343
try {
44-
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosure::class, $value);
44+
return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanning::class, $value);
4545
} catch (Throwable) {
4646
}
4747
}

clients/GitHubEnterprise-3.14/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
3434

3535
if ($signature === 'alert_title|reason' && ($value['reason'] === 'fixed_later' || $value['reason'] === 'false_positive' || $value['reason'] === 'tests' || $value['reason'] === 'revoked')) {
3636
try {
37-
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosureMetadata::class, $value);
37+
return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanningMetadata::class, $value);
3838
} catch (Throwable) {
3939
}
4040
}

clients/GitHubEnterprise-3.14/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertRule;
1313
use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAnalysisTool;
1414
use ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable;
15+
use ApiClients\Client\GitHubEnterprise\Schema\ScimError;
1516
use ApiClients\Client\GitHubEnterprise\Schema\SimpleUser;
1617
use EventSauce\ObjectHydrator\IterableList;
1718
use EventSauce\ObjectHydrator\ObjectMapper;
@@ -57,6 +58,7 @@ public function hydrateObject(string $className, array $payload): object
5758
'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($payload),
5859
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($payload),
5960
'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload),
61+
'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($payload),
6062
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
6163
};
6264
}
@@ -1098,6 +1100,91 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
10981100
}
10991101
}
11001102

1103+
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(array $payload): ScimError
1104+
{
1105+
$properties = [];
1106+
$missingFields = [];
1107+
try {
1108+
$value = $payload['message'] ?? null;
1109+
1110+
if ($value === null) {
1111+
$properties['message'] = null;
1112+
goto after_message;
1113+
}
1114+
1115+
$properties['message'] = $value;
1116+
1117+
after_message:
1118+
1119+
$value = $payload['documentation_url'] ?? null;
1120+
1121+
if ($value === null) {
1122+
$properties['documentationUrl'] = null;
1123+
goto after_documentationUrl;
1124+
}
1125+
1126+
$properties['documentationUrl'] = $value;
1127+
1128+
after_documentationUrl:
1129+
1130+
$value = $payload['detail'] ?? null;
1131+
1132+
if ($value === null) {
1133+
$properties['detail'] = null;
1134+
goto after_detail;
1135+
}
1136+
1137+
$properties['detail'] = $value;
1138+
1139+
after_detail:
1140+
1141+
$value = $payload['status'] ?? null;
1142+
1143+
if ($value === null) {
1144+
$properties['status'] = null;
1145+
goto after_status;
1146+
}
1147+
1148+
$properties['status'] = $value;
1149+
1150+
after_status:
1151+
1152+
$value = $payload['scim_type'] ?? null;
1153+
1154+
if ($value === null) {
1155+
$properties['scimType'] = null;
1156+
goto after_scimType;
1157+
}
1158+
1159+
$properties['scimType'] = $value;
1160+
1161+
after_scimType:
1162+
1163+
$value = $payload['schemas'] ?? null;
1164+
1165+
if ($value === null) {
1166+
$properties['schemas'] = null;
1167+
goto after_schemas;
1168+
}
1169+
1170+
$properties['schemas'] = $value;
1171+
1172+
after_schemas:
1173+
} catch (Throwable $exception) {
1174+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack);
1175+
}
1176+
1177+
if (count($missingFields) > 0) {
1178+
throw UnableToHydrateObject::dueToMissingFields(ScimError::class, $missingFields, stack: $this->hydrationStack);
1179+
}
1180+
1181+
try {
1182+
return new ScimError(...$properties);
1183+
} catch (Throwable $exception) {
1184+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack);
1185+
}
1186+
}
1187+
11011188
private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array
11021189
{
11031190
foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) {
@@ -1138,6 +1225,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
11381225
'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($object),
11391226
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($object),
11401227
'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object),
1228+
'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($object),
11411229
default => throw new LogicException("No serialization defined for $className"),
11421230
};
11431231
} catch (Throwable $exception) {
@@ -1752,6 +1840,69 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
17521840
return $result;
17531841
}
17541842

1843+
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(mixed $object): mixed
1844+
{
1845+
assert($object instanceof ScimError);
1846+
$result = [];
1847+
1848+
$message = $object->message;
1849+
1850+
if ($message === null) {
1851+
goto after_message;
1852+
}
1853+
1854+
after_message: $result['message'] = $message;
1855+
1856+
$documentationUrl = $object->documentationUrl;
1857+
1858+
if ($documentationUrl === null) {
1859+
goto after_documentationUrl;
1860+
}
1861+
1862+
after_documentationUrl: $result['documentation_url'] = $documentationUrl;
1863+
1864+
$detail = $object->detail;
1865+
1866+
if ($detail === null) {
1867+
goto after_detail;
1868+
}
1869+
1870+
after_detail: $result['detail'] = $detail;
1871+
1872+
$status = $object->status;
1873+
1874+
if ($status === null) {
1875+
goto after_status;
1876+
}
1877+
1878+
after_status: $result['status'] = $status;
1879+
1880+
$scimType = $object->scimType;
1881+
1882+
if ($scimType === null) {
1883+
goto after_scimType;
1884+
}
1885+
1886+
after_scimType: $result['scim_type'] = $scimType;
1887+
1888+
$schemas = $object->schemas;
1889+
1890+
if ($schemas === null) {
1891+
goto after_schemas;
1892+
}
1893+
1894+
static $schemasSerializer0;
1895+
1896+
if ($schemasSerializer0 === null) {
1897+
$schemasSerializer0 = new SerializeArrayItems(...[]);
1898+
}
1899+
1900+
$schemas = $schemasSerializer0->serialize($schemas, $this);
1901+
after_schemas: $result['schemas'] = $schemas;
1902+
1903+
return $result;
1904+
}
1905+
17551906
/**
17561907
* @param class-string<T> $className
17571908
* @param iterable<array> $payloads;

0 commit comments

Comments
 (0)