Skip to content

Commit ed012f9

Browse files
authored
Merge pull request #1486 from php-api-clients/GitHubEnterprise-3.15/from-1.1.4-2766a6279db0f2ed943b5c4abdd093c7-from-1.1.4-2766a6279db0f2ed943b5c4abdd093c7
2 parents 4ecd622 + 6e01d26 commit ed012f9

File tree

15 files changed

+118
-102
lines changed

15 files changed

+118
-102
lines changed

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

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "64f3614e3a2420f2e1d792c6db1487f6",
2+
"specHash": "2766a6279db0f2ed943b5c4abdd093c7",
33
"generatedFiles": {
44
"files": [
55
{
@@ -1596,7 +1596,7 @@
15961596
},
15971597
{
15981598
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForEnterprise.php",
1599-
"hash": "f4d6f6268171e5bdac4c36bd524d933e"
1599+
"hash": "1f68b2e0be822f1fe631c2ecbf33af29"
16001600
},
16011601
{
16021602
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForEnterpriseTest.php",
@@ -3384,7 +3384,7 @@
33843384
},
33853385
{
33863386
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForOrg.php",
3387-
"hash": "e19123d6c0aeecf27c8c9359cfa37d73"
3387+
"hash": "eea752ff872e32ab676814f4711443ce"
33883388
},
33893389
{
33903390
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForOrgTest.php",
@@ -7804,7 +7804,7 @@
78047804
},
78057805
{
78067806
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForRepo.php",
7807-
"hash": "e422d820f3a178650a8a21a39af7414f"
7807+
"hash": "cef6f06a6686302752fdf3b6a631d9a4"
78087808
},
78097809
{
78107810
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForRepoTest.php",
@@ -13428,7 +13428,7 @@
1342813428
},
1342913429
{
1343013430
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory.php",
13431-
"hash": "86de612bb69214b911c9aae2aefd17fd"
13431+
"hash": "35029681934336b952a05480c07a0f3e"
1343213432
},
1343313433
{
1343413434
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/BasicError.php",
@@ -17374,10 +17374,6 @@
1737417374
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Cwes.php",
1737517375
"hash": "d9634fd912b4375b20de87e707e1c45e"
1737617376
},
17377-
{
17378-
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Epss.php",
17379-
"hash": "a0e029eb84b40bf890eb5cb6a6ca8c98"
17380-
},
1738117377
{
1738217378
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Credits.php",
1738317379
"hash": "cdb9e33f008a8d4cf57b16e6735b95de"
@@ -26764,7 +26760,7 @@
2676426760
},
2676526761
{
2676626762
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php",
26767-
"hash": "111042e8c75e48fe50f41cf5f1bf5f32"
26763+
"hash": "9cc2dd2fb16ad3ef0e657d9ca943f44f"
2676826764
},
2676926765
{
2677026766
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php",
@@ -27224,15 +27220,15 @@
2722427220
},
2722527221
{
2722627222
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
27227-
"hash": "45d90c7d0fa3045cfc0d85d4a0a768ca"
27223+
"hash": "03a78049cc14a10e8b8ad6bf8778c4ab"
2722827224
},
2722927225
{
2723027226
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
2723127227
"hash": "d1905900da5b62fabb0b324a38bb7279"
2723227228
},
2723327229
{
2723427230
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
27235-
"hash": "29558896ef32876e1de67d9be253c61e"
27231+
"hash": "f44dd133d5a777f374149df2b549e928"
2723627232
},
2723727233
{
2723827234
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -27436,11 +27432,11 @@
2743627432
},
2743727433
{
2743827434
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27439-
"hash": "31b617af68d8c4f4f3e44fa808b51d74"
27435+
"hash": "057a0e66c0fac8be025f4333a6d16a9b"
2744027436
},
2744127437
{
2744227438
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27443-
"hash": "c7324df2298799ac3a1c1f929239efe1"
27439+
"hash": "0afba759e55aef88b3e3a19ce1993b10"
2744427440
},
2744527441
{
2744627442
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27492,7 +27488,7 @@
2749227488
},
2749327489
{
2749427490
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Dependabot.php",
27495-
"hash": "08bd8e160023bd2237dee15bd8567253"
27491+
"hash": "41f38bbe9a82db393bb4c578316bf591"
2749627492
},
2749727493
{
2749827494
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Billing.php",
@@ -27952,7 +27948,7 @@
2795227948
},
2795327949
{
2795427950
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Advisories\/GhsaId.php",
27955-
"hash": "2c92e8991c2c9b8346d0136b96948f65"
27951+
"hash": "456a0b98504643ec116927b80d00d8cc"
2795627952
},
2795727953
{
2795827954
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App.php",
@@ -30268,7 +30264,7 @@
3026830264
},
3026930265
{
3027030266
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
30271-
"hash": "7679f4d4a16985f2c7bc46c968262ca2"
30267+
"hash": "0fca55461f16de6f843e1abfddbf427c"
3027230268
},
3027330269
{
3027430270
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php",
@@ -30281,6 +30277,10 @@
3028130277
{
3028230278
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet67EF09F8\/Tiet8959F0C4\/Tiet45DBD47E\/Tiet2C497E99.php",
3028330279
"hash": "c7758842144998b720421e79a0c42bfe"
30280+
},
30281+
{
30282+
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/SecurityAdvisoryEpss.php",
30283+
"hash": "d40638f97574f7a84a0e52535948cc82"
3028430284
}
3028530285
]
3028630286
},

clients/GitHubEnterprise-3.15/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)