Skip to content

Commit 4ecd622

Browse files
authored
Merge pull request #1485 from php-api-clients/GitHubEnterprise-3.14/from-1.1.4-4d3a9ded7363917824fb2d5fa79ad2ce-from-1.1.4-4d3a9ded7363917824fb2d5fa79ad2ce
2 parents 99da035 + f942a85 commit 4ecd622

File tree

15 files changed

+118
-102
lines changed

15 files changed

+118
-102
lines changed

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

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "560f263b37d18da211a6122a0343d80c",
2+
"specHash": "4d3a9ded7363917824fb2d5fa79ad2ce",
33
"generatedFiles": {
44
"files": [
55
{
@@ -1596,7 +1596,7 @@
15961596
},
15971597
{
15981598
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForEnterprise.php",
1599-
"hash": "f4d6f6268171e5bdac4c36bd524d933e"
1599+
"hash": "1f68b2e0be822f1fe631c2ecbf33af29"
16001600
},
16011601
{
16021602
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForEnterpriseTest.php",
@@ -3264,7 +3264,7 @@
32643264
},
32653265
{
32663266
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForOrg.php",
3267-
"hash": "e19123d6c0aeecf27c8c9359cfa37d73"
3267+
"hash": "eea752ff872e32ab676814f4711443ce"
32683268
},
32693269
{
32703270
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForOrgTest.php",
@@ -7672,7 +7672,7 @@
76727672
},
76737673
{
76747674
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForRepo.php",
7675-
"hash": "e422d820f3a178650a8a21a39af7414f"
7675+
"hash": "cef6f06a6686302752fdf3b6a631d9a4"
76767676
},
76777677
{
76787678
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForRepoTest.php",
@@ -13400,7 +13400,7 @@
1340013400
},
1340113401
{
1340213402
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory.php",
13403-
"hash": "86de612bb69214b911c9aae2aefd17fd"
13403+
"hash": "35029681934336b952a05480c07a0f3e"
1340413404
},
1340513405
{
1340613406
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/BasicError.php",
@@ -17334,10 +17334,6 @@
1733417334
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Cwes.php",
1733517335
"hash": "d9634fd912b4375b20de87e707e1c45e"
1733617336
},
17337-
{
17338-
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Epss.php",
17339-
"hash": "a0e029eb84b40bf890eb5cb6a6ca8c98"
17340-
},
1734117337
{
1734217338
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Credits.php",
1734317339
"hash": "cdb9e33f008a8d4cf57b16e6735b95de"
@@ -26800,7 +26796,7 @@
2680026796
},
2680126797
{
2680226798
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php",
26803-
"hash": "111042e8c75e48fe50f41cf5f1bf5f32"
26799+
"hash": "9cc2dd2fb16ad3ef0e657d9ca943f44f"
2680426800
},
2680526801
{
2680626802
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php",
@@ -27244,15 +27240,15 @@
2724427240
},
2724527241
{
2724627242
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
27247-
"hash": "d1a40c69474af4bf4be5a44e87865a51"
27243+
"hash": "e2d6b10c43a46b1771acf2174be392b6"
2724827244
},
2724927245
{
2725027246
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
2725127247
"hash": "d1905900da5b62fabb0b324a38bb7279"
2725227248
},
2725327249
{
2725427250
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
27255-
"hash": "7b395922549e62b93ca3308420eac933"
27251+
"hash": "b07c3129c02039907ccb3a8d3d76e9cc"
2725627252
},
2725727253
{
2725827254
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -27456,11 +27452,11 @@
2745627452
},
2745727453
{
2745827454
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27459-
"hash": "0ed3fe4b1429901a1b264d5f18be04b8"
27455+
"hash": "eb9acf050e7c53fe1a316472b8cdc81d"
2746027456
},
2746127457
{
2746227458
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27463-
"hash": "48d85f190e7bae295c4e0a21673bc5db"
27459+
"hash": "e5864aba0dd4de9cada7ede4eeee69c5"
2746427460
},
2746527461
{
2746627462
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27512,7 +27508,7 @@
2751227508
},
2751327509
{
2751427510
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Dependabot.php",
27515-
"hash": "08bd8e160023bd2237dee15bd8567253"
27511+
"hash": "41f38bbe9a82db393bb4c578316bf591"
2751627512
},
2751727513
{
2751827514
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Billing.php",
@@ -27968,7 +27964,7 @@
2796827964
},
2796927965
{
2797027966
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Advisories\/GhsaId.php",
27971-
"hash": "2c92e8991c2c9b8346d0136b96948f65"
27967+
"hash": "456a0b98504643ec116927b80d00d8cc"
2797227968
},
2797327969
{
2797427970
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App.php",
@@ -30260,7 +30256,7 @@
3026030256
},
3026130257
{
3026230258
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
30263-
"hash": "252e30a5170965571e9b49245ad836c7"
30259+
"hash": "63b54b366f1a7d3da7f55fdc8d4b4e81"
3026430260
},
3026530261
{
3026630262
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php",
@@ -30273,6 +30269,10 @@
3027330269
{
3027430270
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietD29A14FC\/Tiet805269F1\/TietA52E66B2\/Tiet7F583E73.php",
3027530271
"hash": "bdc8166ddf7c904ff62c49a973846e7e"
30272+
},
30273+
{
30274+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/SecurityAdvisoryEpss.php",
30275+
"hash": "d40638f97574f7a84a0e52535948cc82"
3027630276
}
3027730277
]
3027830278
},

clients/GitHubEnterprise-3.14/src/Internal/Hydrator/Operation/Advisories/GhsaId.php

+31-31
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities\CvssVThree;
1111
use ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory;
1212
use ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Cvss;
13-
use ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Epss;
13+
use ApiClients\Client\GitHubEnterprise\Schema\SecurityAdvisoryEpss;
1414
use EventSauce\ObjectHydrator\IterableList;
1515
use EventSauce\ObjectHydrator\ObjectMapper;
1616
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
@@ -51,7 +51,7 @@ public function hydrateObject(string $className, array $payload): object
5151
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities($payload),
5252
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities\CvssVThree' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities⚡️CvssVThree($payload),
5353
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities\CvssVFour' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities⚡️CvssVFour($payload),
54-
'ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Epss' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss($payload),
54+
'ApiClients\Client\GitHubEnterprise\Schema\SecurityAdvisoryEpss' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss($payload),
5555
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($payload),
5656
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
5757
};
@@ -300,17 +300,6 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
300300

301301
after_cvssSeverities:
302302

303-
$value = $payload['cwes'] ?? null;
304-
305-
if ($value === null) {
306-
$properties['cwes'] = null;
307-
goto after_cwes;
308-
}
309-
310-
$properties['cwes'] = $value;
311-
312-
after_cwes:
313-
314303
$value = $payload['epss'] ?? null;
315304

316305
if ($value === null) {
@@ -321,7 +310,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
321310
if (is_array($value)) {
322311
try {
323312
$this->hydrationStack[] = 'epss';
324-
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss($value);
313+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss($value);
325314
} finally {
326315
array_pop($this->hydrationStack);
327316
}
@@ -331,6 +320,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
331320

332321
after_epss:
333322

323+
$value = $payload['cwes'] ?? null;
324+
325+
if ($value === null) {
326+
$properties['cwes'] = null;
327+
goto after_cwes;
328+
}
329+
330+
$properties['cwes'] = $value;
331+
332+
after_cwes:
333+
334334
$value = $payload['credits'] ?? null;
335335

336336
if ($value === null) {
@@ -538,7 +538,7 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
538538
}
539539
}
540540

541-
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss(array $payload): Epss
541+
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss(array $payload): SecurityAdvisoryEpss
542542
{
543543
$properties = [];
544544
$missingFields = [];
@@ -565,17 +565,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
565565

566566
after_percentile:
567567
} catch (Throwable $exception) {
568-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Epss', $exception, stack: $this->hydrationStack);
568+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\SecurityAdvisoryEpss', $exception, stack: $this->hydrationStack);
569569
}
570570

571571
if (count($missingFields) > 0) {
572-
throw UnableToHydrateObject::dueToMissingFields(Epss::class, $missingFields, stack: $this->hydrationStack);
572+
throw UnableToHydrateObject::dueToMissingFields(SecurityAdvisoryEpss::class, $missingFields, stack: $this->hydrationStack);
573573
}
574574

575575
try {
576-
return new Epss(...$properties);
576+
return new SecurityAdvisoryEpss(...$properties);
577577
} catch (Throwable $exception) {
578-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Epss', $exception, stack: $this->hydrationStack);
578+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\SecurityAdvisoryEpss', $exception, stack: $this->hydrationStack);
579579
}
580580
}
581581

@@ -678,7 +678,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
678678
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities($object),
679679
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities\CvssVThree' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities⚡️CvssVThree($object),
680680
'ApiClients\Client\GitHubEnterprise\Schema\CvssSeverities\CvssVFour' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities⚡️CvssVFour($object),
681-
'ApiClients\Client\GitHubEnterprise\Schema\GlobalAdvisory\Epss' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss($object),
681+
'ApiClients\Client\GitHubEnterprise\Schema\SecurityAdvisoryEpss' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss($object),
682682
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($object),
683683
default => throw new LogicException("No serialization defined for $className"),
684684
};
@@ -890,6 +890,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
890890
$cvssSeverities = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CvssSeverities($cvssSeverities);
891891
after_cvssSeverities: $result['cvss_severities'] = $cvssSeverities;
892892

893+
$epss = $object->epss;
894+
895+
if ($epss === null) {
896+
goto after_epss;
897+
}
898+
899+
$epss = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss($epss);
900+
after_epss: $result['epss'] = $epss;
901+
893902
$cwes = $object->cwes;
894903

895904
if ($cwes === null) {
@@ -905,15 +914,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
905914
$cwes = $cwesSerializer0->serialize($cwes, $this);
906915
after_cwes: $result['cwes'] = $cwes;
907916

908-
$epss = $object->epss;
909-
910-
if ($epss === null) {
911-
goto after_epss;
912-
}
913-
914-
$epss = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss($epss);
915-
after_epss: $result['epss'] = $epss;
916-
917917
$credits = $object->credits;
918918

919919
if ($credits === null) {
@@ -1030,9 +1030,9 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
10301030
return $result;
10311031
}
10321032

1033-
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️GlobalAdvisory⚡️Epss(mixed $object): mixed
1033+
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SecurityAdvisoryEpss(mixed $object): mixed
10341034
{
1035-
assert($object instanceof Epss);
1035+
assert($object instanceof SecurityAdvisoryEpss);
10361036
$result = [];
10371037

10381038
$percentage = $object->percentage;

0 commit comments

Comments
 (0)