diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index e690a910f06..e452eb4418f 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "a62519fb7f7e65d753064fbb86d95c90", + "specHash": "846e79a967c97fff1f751d713e16fc13", "generatedFiles": { "files": [ { @@ -4856,7 +4856,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/SetAppAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "07c3d43816a2aaa1c922989c4e9b074c" + "hash": "f15d666f0697883fdb76342c58c86074" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/SetTeamAccessRestrictions\/Request\/ApplicationJson.php", @@ -4868,7 +4868,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/SetUserAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "959569f92c09306a5f517a7e94ff96e0" + "hash": "ad45ee7bca088a84d28ad6919f063397" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/RenameBranch\/Request\/ApplicationJson.php", @@ -4876,7 +4876,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Checks\/Create\/Request\/ApplicationJson.php", - "hash": "8332bde9e2e508172dc2bd4fcadd9e2b" + "hash": "db93173fd1d853466a0ad40f230cfd8e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Checks\/Create\/Request\/ApplicationJson\/Output.php", @@ -4980,7 +4980,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Repos\/GetContent\/Response\/ApplicationJson\/Ok.php", - "hash": "2a8c4d401f639b738c82930800a06181" + "hash": "66c0e86a0c6c180214e25df91164ad7a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateOrUpdateFileContents\/Request\/ApplicationJson.php", @@ -5588,7 +5588,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "f5fa854c8d633d552f10ee03ace12aec" + "hash": "895c90a8f6c68e8a7a75869125ef85ba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Codespaces.php", @@ -11502,17 +11502,13 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/RemoveStatusCheckContexts\/Request\/ApplicationJson.php", "hash": "f219f7134f850a0940ef8df339a6ab23" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietBC8D00E4\/Tiet2092A7CE\/Tiet794EA03B\/TietA6AE3B1A.php", - "hash": "ca91063498fbf2a4365e1adf964eec93" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/AddAppAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "23ea70c2c0f28a7c432d6173946f7bd3" + "hash": "b2dd8c1964553fa03fc31d437ad2a5ad" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/RemoveAppAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "ac9de5bb36562d34f5b04b4bf98fa1fd" + "hash": "87ac9a665e0533f0f1b5c2f13ec9025c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet2627BD0F\/Tiet79C28288\/TietDDF35698\/TietF49935EA.php", @@ -11522,17 +11518,13 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/RemoveTeamAccessRestrictions\/Request\/ApplicationJson.php", "hash": "8d93914edd195664accc08ab9c0e85ec" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet666EC903\/TietB174FC55\/TietB7801801\/Tiet2B6C6BE2.php", - "hash": "261dac804bad0f555689374cdf09f909" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/AddUserAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "f1b1e9a828b4e714e4e9336fe605b521" + "hash": "babd3784ef1a5ea6dfac3ce0be5a16fb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/RemoveUserAccessRestrictions\/Request\/ApplicationJson.php", - "hash": "10b98d64f0f246ccb35688a8084248c6" + "hash": "75fb0e32c5f9f6709d6977403b2abb0f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet6AF2B3AE\/Tiet1426BE24\/Tiet29564A00\/Tiet1F9716F8.php", @@ -11680,11 +11672,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotSeatDetails.php", - "hash": "45ea17da364c6d93645ba99ff27df1d8" + "hash": "71f4354ce2e2195c0502b1c58685d270" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Copilot\/ListCopilotSeats\/Response\/ApplicationJson\/Ok.php", - "hash": "e79f2f53fbd57620603ac59c891eb4b2" + "hash": "1c08d3802ed3f5f09d489c90519b80ed" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietF5944C0A\/TietAA99D7D8\/Tiet9AE1F544\/TietA28F869C.php", @@ -17632,7 +17624,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertsForRepo.php", - "hash": "06e3a790b953a5eb66c3d25e5c7c65dd" + "hash": "6398f78e91377952d326f9bbc98a5c80" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepoTest.php", @@ -17644,7 +17636,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertsForRepoListing.php", - "hash": "763906299392b93dde8ef696df8bd789" + "hash": "8ac241f71a05cf3fbd36f1676a39b172" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertsForRepoListingTest.php", @@ -17680,7 +17672,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertInstances.php", - "hash": "34947e1ae5ac78c65ba59771896d870c" + "hash": "03906dc7464364678827d07f4495d61b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertInstancesTest.php", @@ -17692,7 +17684,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListAlertInstancesListing.php", - "hash": "5f6f50e0cc742ec747687919a25cedd2" + "hash": "94e017fe4d7171b5391471f94b7b8feb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListAlertInstancesListingTest.php", @@ -17704,7 +17696,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListRecentAnalyses.php", - "hash": "034f125ff066bc758d804d59354db8e9" + "hash": "d54cd150c808e4101b0e38357ba24eeb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListRecentAnalysesTest.php", @@ -17716,7 +17708,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/ListRecentAnalysesListing.php", - "hash": "3eed5c566124f2bc5cc7acaa87278921" + "hash": "15bfa987f2cc662a92dc5c806549c71c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/ListRecentAnalysesListingTest.php", @@ -24520,7 +24512,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeScanning.php", - "hash": "01a923f7f133ef046ac9968bec025e01" + "hash": "397c1058e013c6c3b6d13471578fa3b9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Copilot.php", @@ -24764,7 +24756,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/CodeScanning.php", - "hash": "64cd2aff0bbb80e74e240dd2296d8bab" + "hash": "cebc7adbf12eb4c44156edbfd0aaf81c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", @@ -24964,7 +24956,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "b77768e180a3157762ab6af6eee4d75a" + "hash": "b2a28a4c2a159a5554c4694f89317cfd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -24972,7 +24964,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", - "hash": "998b58d4e30daba5585f05e1f1b96e63" + "hash": "59c87acfb9e14c210b4c997bdde01a04" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Nine.php", @@ -25068,7 +25060,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "eb06c4e1ebb6c95165b202892c84a4b7" + "hash": "308c392e37c1750ea31302f83f39951f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -25076,7 +25068,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php", - "hash": "05594522210f244e96713ea68309c113" + "hash": "23bdb9499299a0f47afc0c009e703d61" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Ten.php", @@ -25612,7 +25604,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Members\/Username\/Copilot.php", - "hash": "ce3c4cac03917d34b46571d9b9d81162" + "hash": "79a20fd637d2fecbf00f10bd42cb3147" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Memberships\/Username.php", @@ -27160,7 +27152,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "a6a0840e8714d16dad2b0df13cc8bc9d" + "hash": "efacbae4d809e227253736215f55ce5c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27316,7 +27308,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Classroom.php", - "hash": "d3dd148e540193cb96695103a37e4096" + "hash": "6b75e1657d51a588bfa4e360407fab5e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Assignments\/AssignmentId.php", @@ -27350,10 +27342,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runs\/RunId\/ForceCancel.php", "hash": "0f46902e91fde4c11e8a41ec267da6a2" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Assignee.php", - "hash": "97bb887016552fb64fd21ab77e81a916" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePatternWithType.php", "hash": "abd5611c375521c3e48027d0e1629808" @@ -27748,11 +27736,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "2c2fada3ff16e30970a362eaad8d7df8" + "hash": "b279bfe420072ca3881b316b41cde25a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "e0a910c6c699a2fa62eb539875dd88ff" + "hash": "a3cd037b10acacb7fbfa8165f0c08dac" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -29542,10 +29530,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/EnterpriseTeam.php", "hash": "7fc1fb4a6b32ed3dbc505149bcfddaa0" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Organization.php", - "hash": "49df666bb0c15c4980d06323fd5a13ee" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/TeamRoleAssignment.php", "hash": "3894b060697253081cbcafe9e322e237" @@ -29592,7 +29576,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Copilot\/ListCopilotSeatsForEnterprise\/Response\/ApplicationJson\/Ok.php", - "hash": "6157f73720a2d7f0dd4f983cc6d487e5" + "hash": "9186b42a601359e27cb165753f1d9100" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Copilot\/Billing\/Seats.php", @@ -30461,6 +30445,14 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Classroom\/ListAcceptedAssignmentsForAnAssignmentListingTest.php", "hash": "9f83275b3264e5721c75f5e519252f6d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet98658574\/TietA85321D0\/Tiet6D8839E8\/TietDC0C852E.php", + "hash": "61c7a9026fefc729d5a5d78d59cef7a1" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet6B82E311\/TietAB37E426\/Tiet938DAB86\/TietABDC4BA5.php", + "hash": "82ffa7187f7f6bd092834767628b8a35" } ] }, diff --git a/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Assignee.php b/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Assignee.php deleted file mode 100644 index fcfa6a71a2a..00000000000 --- a/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Assignee.php +++ /dev/null @@ -1,38 +0,0 @@ -hydrateObject(Schema\SimpleUser::class, $value); - } catch (Throwable) { - } - } - } - - return $value; - } -} diff --git a/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Organization.php b/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Organization.php deleted file mode 100644 index 4db0ca8aeda..00000000000 --- a/clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Organization.php +++ /dev/null @@ -1,38 +0,0 @@ -hydrateObject(Schema\OrganizationSimple::class, $value); - } catch (Throwable) { - } - } - } - - return $value; - } -} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Members/Username/Copilot.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Members/Username/Copilot.php index 6e401e71fb1..d1ef75e81b5 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Members/Username/Copilot.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Members/Username/Copilot.php @@ -4,9 +4,7 @@ namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Orgs\Org\Members\Username; -use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\CopilotSeatDetails\Assignee; use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\CopilotSeatDetails\AssigningTeam; -use ApiClients\Client\GitHub\Internal\Attribute\CastUnionToType\Schema\CopilotSeatDetails\Organization; use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\CopilotSeatDetails; use ApiClients\Client\GitHub\Schema\OrganizationSimple; @@ -48,9 +46,9 @@ public function hydrateObject(string $className, array $payload): object { return match ($className) { 'ApiClients\Client\GitHub\Schema\CopilotSeatDetails' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatDetails($payload), - 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\OrganizationSimple' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimple($payload), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -67,19 +65,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi goto after_assignee; } - static $assigneeCaster1; - - if ($assigneeCaster1 === null) { - $assigneeCaster1 = new Assignee(...[]); - } - - $value = $assigneeCaster1->cast($value, $this); - - if ($value === null) { - $missingFields[] = 'assignee'; - goto after_assignee; - } - if (is_array($value)) { try { $this->hydrationStack[] = 'assignee'; @@ -100,19 +85,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi goto after_organization; } - static $organizationCaster1; - - if ($organizationCaster1 === null) { - $organizationCaster1 = new Organization(...[]); - } - - $value = $organizationCaster1->cast($value, $this); - - if ($value === null) { - $properties['organization'] = null; - goto after_organization; - } - if (is_array($value)) { try { $this->hydrationStack[] = 'organization'; @@ -219,69 +191,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Copi } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError - { - $properties = []; - $missingFields = []; - try { - $value = $payload['message'] ?? null; - - if ($value === null) { - $properties['message'] = null; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $properties['documentationUrl'] = null; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $properties['url'] = null; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['status'] ?? null; - - if ($value === null) { - $properties['status'] = null; - goto after_status; - } - - $properties['status'] = $value; - - after_status: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new BasicError(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); - } - } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser { $properties = []; @@ -683,6 +592,69 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Orga } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -715,6 +687,8 @@ public function serializeObjectOfType(object $object, string $className): mixed 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), 'ApiClients\Client\GitHub\Schema\CopilotSeatDetails' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CopilotSeatDetails($object), + 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), + 'ApiClients\Client\GitHub\Schema\OrganizationSimple' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimple($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -846,6 +820,146 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed + { + assert($object instanceof SimpleUser); + $result = []; + + $name = $object->name; + + if ($name === null) { + goto after_name; + } + + after_name: $result['name'] = $name; + + $email = $object->email; + + if ($email === null) { + goto after_email; + } + + after_email: $result['email'] = $email; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $gravatarId = $object->gravatarId; + + if ($gravatarId === null) { + goto after_gravatarId; + } + + after_gravatarId: $result['gravatar_id'] = $gravatarId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $htmlUrl = $object->htmlUrl; + after_htmlUrl: $result['html_url'] = $htmlUrl; + + $followersUrl = $object->followersUrl; + after_followersUrl: $result['followers_url'] = $followersUrl; + + $followingUrl = $object->followingUrl; + after_followingUrl: $result['following_url'] = $followingUrl; + + $gistsUrl = $object->gistsUrl; + after_gistsUrl: $result['gists_url'] = $gistsUrl; + + $starredUrl = $object->starredUrl; + after_starredUrl: $result['starred_url'] = $starredUrl; + + $subscriptionsUrl = $object->subscriptionsUrl; + after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; + + $organizationsUrl = $object->organizationsUrl; + after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $receivedEventsUrl = $object->receivedEventsUrl; + after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; + + $type = $object->type; + after_type: $result['type'] = $type; + + $siteAdmin = $object->siteAdmin; + after_siteAdmin: $result['site_admin'] = $siteAdmin; + + $starredAt = $object->starredAt; + + if ($starredAt === null) { + goto after_starredAt; + } + + after_starredAt: $result['starred_at'] = $starredAt; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimple(mixed $object): mixed + { + assert($object instanceof OrganizationSimple); + $result = []; + + $login = $object->login; + after_login: $result['login'] = $login; + + $id = $object->id; + after_id: $result['id'] = $id; + + $nodeId = $object->nodeId; + after_nodeId: $result['node_id'] = $nodeId; + + $url = $object->url; + after_url: $result['url'] = $url; + + $reposUrl = $object->reposUrl; + after_reposUrl: $result['repos_url'] = $reposUrl; + + $eventsUrl = $object->eventsUrl; + after_eventsUrl: $result['events_url'] = $eventsUrl; + + $hooksUrl = $object->hooksUrl; + after_hooksUrl: $result['hooks_url'] = $hooksUrl; + + $issuesUrl = $object->issuesUrl; + after_issuesUrl: $result['issues_url'] = $issuesUrl; + + $membersUrl = $object->membersUrl; + after_membersUrl: $result['members_url'] = $membersUrl; + + $publicMembersUrl = $object->publicMembersUrl; + after_publicMembersUrl: $result['public_members_url'] = $publicMembersUrl; + + $avatarUrl = $object->avatarUrl; + after_avatarUrl: $result['avatar_url'] = $avatarUrl; + + $description = $object->description; + + if ($description === null) { + goto after_description; + } + + after_description: $result['description'] = $description; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed { assert($object instanceof BasicError); diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 9525c5e502f..a16ca82f10e 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -794,8 +794,8 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\GetCodespacesForUserInOrg\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\DeleteFromOrganization\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces🌀CodespaceName()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Codespace', '\\ApiClients\\Client\\GitHub\\Schema\\CodespaceMachine', '\\ApiClients\\Client\\GitHub\\Schema\\Codespace\\GitStatus', '\\ApiClients\\Client\\GitHub\\Schema\\Codespace\\RuntimeConstraints' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces🌀CodespaceName🌀Stop()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Migration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Migrations()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()->hydrateObject($className, $payload), @@ -1149,8 +1149,8 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\GetCodespacesForUserInOrg\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Codespaces\\DeleteFromOrganization\\Response\\ApplicationJson\\Accepted\\Application\\Json' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces🌀CodespaceName()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Codespace', '\\ApiClients\\Client\\GitHub\\Schema\\CodespaceMachine', '\\ApiClients\\Client\\GitHub\\Schema\\Codespace\\GitStatus', '\\ApiClients\\Client\\GitHub\\Schema\\Codespace\\RuntimeConstraints' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Codespaces🌀CodespaceName🌀Stop()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Migration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Migrations()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()->serializeObject($object), diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstances.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstances.php index 8128ba07ec3..e3a0e349933 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstances.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstances.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, int $alertNumber, string $ref, int $pr, int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListAlertInstances($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber, $ref, $pr, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstancesListing.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstancesListing.php index 8f44eafaf0b..cf600162a39 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstancesListing.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertInstancesListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, int $alertNumber, string $ref, int $pr, int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListAlertInstancesListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber, $ref, $pr, $page, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php index 9fe078d98ff..9f3b4d2813a 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php index 8c9a1040bf3..63b40cbafc7 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalyses.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalyses.php index b28edddf017..1d9ed4b8465 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalyses.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalyses.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, int $pr, string $ref, string $sarifId, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListRecentAnalyses($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $pr, $ref, $sarifId, $page, $perPage, $direction, $sort); diff --git a/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalysesListing.php b/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalysesListing.php index 7d94b9da5c7..112db6af471 100644 --- a/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalysesListing.php +++ b/clients/GitHub/src/Internal/Operator/CodeScanning/ListRecentAnalysesListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $owner, string $repo, string $toolName, string|null $toolGuid, int $pr, string $ref, string $sarifId, int $page = 1, int $perPage = 30, string $direction = 'desc', string $sort = 'created'): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeScanning\ListRecentAnalysesListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $toolName, $toolGuid, $pr, $ref, $sarifId, $page, $perPage, $direction, $sort); diff --git a/clients/GitHub/src/Internal/Router/Get/CodeScanning.php b/clients/GitHub/src/Internal/Router/Get/CodeScanning.php index 49350577318..ca276ea0ba0 100644 --- a/clients/GitHub/src/Internal/Router/Get/CodeScanning.php +++ b/clients/GitHub/src/Internal/Router/Get/CodeScanning.php @@ -102,7 +102,7 @@ public function listAlertsForOrg(array $params): iterable return $operator->call($arguments['org'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['before'], $arguments['after'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort']); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; @@ -183,7 +183,7 @@ public function listAlertsForRepo(array $params): iterable|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['tool_name'], $arguments['tool_guid'], $arguments['ref'], $arguments['pr'], $arguments['state'], $arguments['severity'], $arguments['page'], $arguments['per_page'], $arguments['direction'], $arguments['sort']); } - /** @return iterable */ + /** @return Observable */ public function listRecentAnalyses(array $params): iterable { $arguments = []; @@ -381,7 +381,7 @@ public function getSarif(array $params): CodeScanningSarifsStatus|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['sarif_id']); } - /** @return iterable */ + /** @return Observable */ public function listAlertInstances(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Eight.php b/clients/GitHub/src/Internal/Router/Get/Eight.php index 3ff2f255253..830ad5893a6 100644 --- a/clients/GitHub/src/Internal/Router/Get/Eight.php +++ b/clients/GitHub/src/Internal/Router/Get/Eight.php @@ -35,7 +35,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|iterable|Observable|WithoutBody */ + /** @return |Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): PackageVersion|iterable|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index feccd59c5b4..e60a802fe22 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -74,7 +74,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): Ok|iterable|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/CodeScanning.php b/clients/GitHub/src/Internal/Router/List/CodeScanning.php index 9fa4ac77a36..4b3ea93238d 100644 --- a/clients/GitHub/src/Internal/Router/List/CodeScanning.php +++ b/clients/GitHub/src/Internal/Router/List/CodeScanning.php @@ -102,7 +102,7 @@ public function listAlertsForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; @@ -189,7 +189,7 @@ public function listAlertsForRepoListing(array $params): iterable|WithoutBody } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function listRecentAnalysesListing(array $params): iterable { $arguments = []; @@ -270,7 +270,7 @@ public function listRecentAnalysesListing(array $params): iterable } while (count($items) > 0); } - /** @return iterable */ + /** @return Observable */ public function listAlertInstancesListing(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/List/Eight.php b/clients/GitHub/src/Internal/Router/List/Eight.php index a4051aecbaf..b0d21bfe73a 100644 --- a/clients/GitHub/src/Internal/Router/List/Eight.php +++ b/clients/GitHub/src/Internal/Router/List/Eight.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|iterable|Observable|WithoutBody */ + /** @return Observable|Observable|Observable|Observable|WithoutBody */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index 061084af6f7..e2afcb66c84 100644 --- a/clients/GitHub/src/Internal/Router/List/Six.php +++ b/clients/GitHub/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Operation/CodeScanning.php b/clients/GitHub/src/Operation/CodeScanning.php index 9011723eb6d..b3f656dbad9 100644 --- a/clients/GitHub/src/Operation/CodeScanning.php +++ b/clients/GitHub/src/Operation/CodeScanning.php @@ -37,13 +37,13 @@ public function listAlertsForOrgListing(string $org, string $toolName, string|nu return $this->operators->codeScanning👷ListAlertsForOrgListing()->call($org, $toolName, $toolGuid, $before, $after, $state, $severity, $page, $perPage, $direction, $sort); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepo(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody { return $this->operators->codeScanning👷ListAlertsForRepo()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); } - /** @return iterable|WithoutBody */ + /** @return Observable|WithoutBody */ public function listAlertsForRepoListing(string $owner, string $repo, string $toolName, string|null $toolGuid, string $ref, int $pr, string $state, string $severity, int $page, int $perPage, string $direction, string $sort): iterable|WithoutBody { return $this->operators->codeScanning👷ListAlertsForRepoListing()->call($owner, $repo, $toolName, $toolGuid, $ref, $pr, $state, $severity, $page, $perPage, $direction, $sort); @@ -61,25 +61,25 @@ public function updateAlert(string $owner, string $repo, int $alertNumber, array return $this->operators->codeScanning👷UpdateAlert()->call($owner, $repo, $alertNumber, $params); } - /** @return iterable */ + /** @return Observable */ public function listAlertInstances(string $owner, string $repo, int $alertNumber, string $ref, int $pr, int $page, int $perPage): iterable { return $this->operators->codeScanning👷ListAlertInstances()->call($owner, $repo, $alertNumber, $ref, $pr, $page, $perPage); } - /** @return iterable */ + /** @return Observable */ public function listAlertInstancesListing(string $owner, string $repo, int $alertNumber, string $ref, int $pr, int $page, int $perPage): iterable { return $this->operators->codeScanning👷ListAlertInstancesListing()->call($owner, $repo, $alertNumber, $ref, $pr, $page, $perPage); } - /** @return iterable */ + /** @return Observable */ public function listRecentAnalyses(string $owner, string $repo, string $toolName, string|null $toolGuid, int $pr, string $ref, string $sarifId, int $page, int $perPage, string $direction, string $sort): iterable { return $this->operators->codeScanning👷ListRecentAnalyses()->call($owner, $repo, $toolName, $toolGuid, $pr, $ref, $sarifId, $page, $perPage, $direction, $sort); } - /** @return iterable */ + /** @return Observable */ public function listRecentAnalysesListing(string $owner, string $repo, string $toolName, string|null $toolGuid, int $pr, string $ref, string $sarifId, int $page, int $perPage, string $direction, string $sort): iterable { return $this->operators->codeScanning👷ListRecentAnalysesListing()->call($owner, $repo, $toolName, $toolGuid, $pr, $ref, $sarifId, $page, $perPage, $direction, $sort); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index f89747722a6..87997385669 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -2204,11 +2204,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/code-scanning/alerts') { - return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve('Observable|WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}') { @@ -2220,19 +2220,19 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/analyses') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'LIST /repos/{owner}/{repo}/code-scanning/analyses') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}') { diff --git a/clients/GitHub/src/Schema/AliasAbstract/Tiet666EC903/TietB174FC55/TietB7801801/Tiet2B6C6BE2.php b/clients/GitHub/src/Schema/AliasAbstract/Tiet666EC903/TietB174FC55/TietB7801801/Tiet2B6C6BE2.php deleted file mode 100644 index d00cf94cadd..00000000000 --- a/clients/GitHub/src/Schema/AliasAbstract/Tiet666EC903/TietB174FC55/TietB7801801/Tiet2B6C6BE2.php +++ /dev/null @@ -1,46 +0,0 @@ -call('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}')); assertType('', $client->call('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs')); assertType('', $client->call('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts')); -assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts')); +assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); -assertType('iterable', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); -assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); -assertType('iterable', $client->call('GET /repos/{owner}/{repo}/code-scanning/analyses')); -assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/code-scanning/analyses')); +assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); +assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances')); +assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/analyses')); +assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/code-scanning/analyses')); assertType('', $client->call('GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/code-scanning/codeql/databases')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 5b638814c8e..b882ee19d8b 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -21173,28 +21173,24 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - apps: - type: array - description: 'The GitHub Apps that have push access to this branch. - Use the slugified version of the app name. **Note**: The list - of users, apps, and teams in total is limited to 100 items.' - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: - type: string + type: object + properties: + apps: + type: array + description: 'The GitHub Apps that have push access to this branch. + Use the slugified version of the app name. **Note**: The list + of users, apps, and teams in total is limited to 100 items.' + items: + type: string + required: + - apps + example: + apps: + - my-app examples: default: value: @@ -21237,28 +21233,24 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - apps: - type: array - description: 'The GitHub Apps that have push access to this branch. - Use the slugified version of the app name. **Note**: The list - of users, apps, and teams in total is limited to 100 items.' - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: - type: string + type: object + properties: + apps: + type: array + description: 'The GitHub Apps that have push access to this branch. + Use the slugified version of the app name. **Note**: The list + of users, apps, and teams in total is limited to 100 items.' + items: + type: string + required: + - apps + example: + apps: + - my-app examples: default: value: @@ -21301,27 +21293,24 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: + required: true content: application/json: schema: - oneOf: - - type: object - properties: - apps: - type: array - description: 'The GitHub Apps that have push access to this branch. - Use the slugified version of the app name. **Note**: The list - of users, apps, and teams in total is limited to 100 items.' - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: - type: string + type: object + properties: + apps: + type: array + description: 'The GitHub Apps that have push access to this branch. + Use the slugified version of the app name. **Note**: The list + of users, apps, and teams in total is limited to 100 items.' + items: + type: string + required: + - apps + example: + apps: + - my-app examples: default: value: @@ -21631,26 +21620,22 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - users: - type: array - description: The username for users - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string + type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona examples: default: summary: Example adding a user in a branch protection rule @@ -21698,26 +21683,22 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - users: - type: array - description: The username for users - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string + type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona examples: default: summary: Example replacing a user in a branch protection rule @@ -21765,25 +21746,22 @@ paths: - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: + required: true content: application/json: schema: - oneOf: - - type: object - properties: - users: - type: array - description: The username for users - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string + type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona examples: default: summary: Example removing a user in a branch protection rule @@ -22096,6 +22074,8 @@ paths: required: - name - head_sha + discriminator: + propertyName: status oneOf: - properties: status: @@ -25978,6 +25958,13 @@ paths: - "$ref": "#/components/schemas/content-file" - "$ref": "#/components/schemas/content-symlink" - "$ref": "#/components/schemas/content-submodule" + discriminator: + propertyName: type + mapping: + array: "#/components/schemas/content-directory" + file: "#/components/schemas/content-file" + symlink: "#/components/schemas/content-symlink" + submodule: "#/components/schemas/content-submodule" examples: response-if-content-is-a-file: "$ref": "#/components/examples/content-file-response-if-content-is-a-file" @@ -67532,17 +67519,10 @@ components: type: object properties: assignee: - type: object - description: The assignee that has been granted access to GitHub Copilot. - additionalProperties: true - oneOf: - - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/simple-user" organization: - type: - - object - - 'null' - description: The organization to which this seat belongs. - oneOf: + anyOf: + - type: 'null' - "$ref": "#/components/schemas/organization-simple" assigning_team: description: The team through which the assignee is granted access to GitHub