Skip to content

Commit 99da035

Browse files
authored
Merge pull request #1484 from php-api-clients/GitHubEnterprise-3.13/from-1.1.4-71747b16e45e0f2a54b8e1ca561b75d5-from-1.1.4-71747b16e45e0f2a54b8e1ca561b75d5
2 parents bde9669 + 39e04cd commit 99da035

File tree

15 files changed

+118
-102
lines changed

15 files changed

+118
-102
lines changed

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

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "8985016ac4b27cc23057fb31dee10264",
2+
"specHash": "71747b16e45e0f2a54b8e1ca561b75d5",
33
"generatedFiles": {
44
"files": [
55
{
@@ -1596,7 +1596,7 @@
15961596
},
15971597
{
15981598
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForEnterprise.php",
1599-
"hash": "f4d6f6268171e5bdac4c36bd524d933e"
1599+
"hash": "1f68b2e0be822f1fe631c2ecbf33af29"
16001600
},
16011601
{
16021602
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForEnterpriseTest.php",
@@ -3264,7 +3264,7 @@
32643264
},
32653265
{
32663266
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForOrg.php",
3267-
"hash": "e19123d6c0aeecf27c8c9359cfa37d73"
3267+
"hash": "eea752ff872e32ab676814f4711443ce"
32683268
},
32693269
{
32703270
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForOrgTest.php",
@@ -7508,7 +7508,7 @@
75087508
},
75097509
{
75107510
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/Dependabot\/ListAlertsForRepo.php",
7511-
"hash": "e422d820f3a178650a8a21a39af7414f"
7511+
"hash": "cef6f06a6686302752fdf3b6a631d9a4"
75127512
},
75137513
{
75147514
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/Dependabot\/ListAlertsForRepoTest.php",
@@ -13236,7 +13236,7 @@
1323613236
},
1323713237
{
1323813238
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory.php",
13239-
"hash": "86de612bb69214b911c9aae2aefd17fd"
13239+
"hash": "35029681934336b952a05480c07a0f3e"
1324013240
},
1324113241
{
1324213242
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/BasicError.php",
@@ -17078,10 +17078,6 @@
1707817078
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Cwes.php",
1707917079
"hash": "d9634fd912b4375b20de87e707e1c45e"
1708017080
},
17081-
{
17082-
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Epss.php",
17083-
"hash": "a0e029eb84b40bf890eb5cb6a6ca8c98"
17084-
},
1708517081
{
1708617082
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/GlobalAdvisory\/Credits.php",
1708717083
"hash": "cdb9e33f008a8d4cf57b16e6735b95de"
@@ -26504,7 +26500,7 @@
2650426500
},
2650526501
{
2650626502
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Dependabot.php",
26507-
"hash": "111042e8c75e48fe50f41cf5f1bf5f32"
26503+
"hash": "9cc2dd2fb16ad3ef0e657d9ca943f44f"
2650826504
},
2650926505
{
2651026506
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php",
@@ -26948,15 +26944,15 @@
2694826944
},
2694926945
{
2695026946
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
26951-
"hash": "0fad69374da0792d6207a7cc43f16ccb"
26947+
"hash": "fb8d914498dc8ddad6eaa4249ed98e34"
2695226948
},
2695326949
{
2695426950
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
2695526951
"hash": "d1905900da5b62fabb0b324a38bb7279"
2695626952
},
2695726953
{
2695826954
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
26959-
"hash": "6c162baaded82b4c6734e822b560ac43"
26955+
"hash": "944582af066e6fc6c831c4e7b872a838"
2696026956
},
2696126957
{
2696226958
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -27160,11 +27156,11 @@
2716027156
},
2716127157
{
2716227158
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27163-
"hash": "b5ddf5ed50643698add8a2c384528e11"
27159+
"hash": "2fb5474325448bccbcb22bb7d1158ea1"
2716427160
},
2716527161
{
2716627162
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27167-
"hash": "dbaa0cc35ad0b17f0e6f5565b7c7a283"
27163+
"hash": "54beea339c8099994a522e19c9c55b8c"
2716827164
},
2716927165
{
2717027166
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27216,7 +27212,7 @@
2721627212
},
2721727213
{
2721827214
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Dependabot.php",
27219-
"hash": "08bd8e160023bd2237dee15bd8567253"
27215+
"hash": "41f38bbe9a82db393bb4c578316bf591"
2722027216
},
2722127217
{
2722227218
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Billing.php",
@@ -27668,7 +27664,7 @@
2766827664
},
2766927665
{
2767027666
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Advisories\/GhsaId.php",
27671-
"hash": "2c92e8991c2c9b8346d0136b96948f65"
27667+
"hash": "456a0b98504643ec116927b80d00d8cc"
2767227668
},
2767327669
{
2767427670
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App.php",
@@ -29944,7 +29940,7 @@
2994429940
},
2994529941
{
2994629942
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
29947-
"hash": "a80554fdc52f4357f7577e6a10c8b69d"
29943+
"hash": "151d6e808352d3ce2a34abb1d984740b"
2994829944
},
2994929945
{
2995029946
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php",
@@ -29957,6 +29953,10 @@
2995729953
{
2995829954
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietD29A14FC\/Tiet805269F1\/TietA52E66B2\/Tiet7F583E73.php",
2995929955
"hash": "bdc8166ddf7c904ff62c49a973846e7e"
29956+
},
29957+
{
29958+
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/SecurityAdvisoryEpss.php",
29959+
"hash": "d40638f97574f7a84a0e52535948cc82"
2996029960
}
2996129961
]
2996229962
},

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