diff --git a/clients/GitHubEnterprise-3.15/etc/openapi-client-generator.state b/clients/GitHubEnterprise-3.15/etc/openapi-client-generator.state index d3c00e9a6f7..b1409e183b3 100644 --- a/clients/GitHubEnterprise-3.15/etc/openapi-client-generator.state +++ b/clients/GitHubEnterprise-3.15/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "531e13661f965ac04f0ddfe589e8a768", + "specHash": "0e6a4a1bd0678c8ca272e91b4354bf3a", "generatedFiles": { "files": [ { @@ -1604,11 +1604,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "0231ba82da6a9893a6507e9870156668" + "hash": "17b208c8bbb86b888e74cf63cc438eae" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForEnterprise.php", - "hash": "4bc5d6f123edc566d7b8a526bb4add05" + "hash": "a53ab95d403d167c4cc01534b7982d1e" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForEnterpriseTest.php", @@ -4812,11 +4812,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrg.php", - "hash": "ebe957fd1625c433101a77c41360c45b" + "hash": "60df073fc54beca0fcd54532deb820a3" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrg.php", - "hash": "df0be2f42b31115c4cfe94d29007a7a9" + "hash": "3f571d60978cfd1cfaf29a085a3b7309" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgTest.php", @@ -4824,11 +4824,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "dece5a9b05864345454c39555c389434" + "hash": "8ba3c5c649c2416d5d6b514cf5aaef54" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForOrgListing.php", - "hash": "04b7e5d458c6abb8ec7873edd193a9cc" + "hash": "ddf7aa0871077b49e8608604db23555a" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForOrgListingTest.php", @@ -7232,15 +7232,15 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/UpdateAlert.php", - "hash": "4414595983724d58e1cdf5c09e8f409f" + "hash": "b7b8c2aaaf47299f09adbb2b88b5daf5" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateAlert.php", - "hash": "0d58379475f7ab773df9ae4b3b7d84c5" + "hash": "fd3b96fa7070fd31d1490b2ae4861c54" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateAlertTest.php", - "hash": "5e18056057b185cf3a4348a8b97f093c" + "hash": "78119db7046be60d7d867ad3af28c6fa" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/ListAlertInstances.php", @@ -10628,11 +10628,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepo.php", - "hash": "4fc1bba338a9da930c88a78cb87329c3" + "hash": "c0641cd8ae323a57691371e4834b2712" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepo.php", - "hash": "6ce3589ba60d1913c2b76a8bae5847f1" + "hash": "577f770ebbb8a15b8326d7474121d3fa" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoTest.php", @@ -10640,11 +10640,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "5a37b821f6184e89905c5f120b94138f" + "hash": "9179d8e416689e27eab71e3d05eb6c09" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/SecretScanning\/ListAlertsForRepoListing.php", - "hash": "1dee4bf2412aded3977570b36ba1b5e7" + "hash": "1fd156690c8f36712caa02720855d32e" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/SecretScanning\/ListAlertsForRepoListingTest.php", @@ -15412,15 +15412,15 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php", - "hash": "1fc2f779d08ed5752c34175a6d602409" + "hash": "be43c3a32b264a082842b4342eeed775" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php", - "hash": "838b43367eb6df1a6caf3240812fc8e5" + "hash": "988efed4f7c1c3059ab0f63d472321a6" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php", - "hash": "5658982cf775d944e65e8d66e337f54f" + "hash": "bc1f73d90a1b2bbdf5c6f1ecdf0d6ce4" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php", @@ -26056,7 +26056,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UpdateAlert\/Request\/ApplicationJson.php", - "hash": "ffbb63d8bfc655b760e73bb0a84b41b7" + "hash": "ef09173d8d817efd8e1e4e81d9f0edcc" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UploadSarif\/Request\/ApplicationJson.php", @@ -26728,7 +26728,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecretScanning.php", - "hash": "bc73428e7d9e42ed9badc19bad71e9cb" + "hash": "050fa76b7131e2e730b1248529cb4d11" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/AnnouncementBanners.php", @@ -26848,7 +26848,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/List\/SecretScanning.php", - "hash": "1fec596505bf75591427f79980b7c03c" + "hash": "c62ca48a00921755b35a8b8a7b357f3f" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php", @@ -27084,7 +27084,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php", - "hash": "f4eded73dbc98d19cc03cd2545bc0a44" + "hash": "b169946b91470cd53c5ec292b35ad780" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Issues.php", @@ -27208,7 +27208,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "03a78049cc14a10e8b8ad6bf8778c4ab" + "hash": "43e123d904ad91affb4e18292130dc94" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php", @@ -27216,7 +27216,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "f44dd133d5a777f374149df2b549e928" + "hash": "57e1cd0431c002a99609afd769015d76" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -27248,11 +27248,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "acd7909d2adc36a5541ecf4184f9e6ac" + "hash": "80934af4705b7c0eaa614cdb7db97b69" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "48ef5001857b680a305472fbbc03d23e" + "hash": "41d737c1beb73b93d83b7e4725f104fb" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -27356,7 +27356,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php", - "hash": "619ee85831f1ccf3b4aa9570bc701fb6" + "hash": "e6af182f8222fb648cfc3c789507197c" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Nine.php", @@ -27420,11 +27420,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "057a0e66c0fac8be025f4333a6d16a9b" + "hash": "e4eff747111d5775c682f08dd59e5904" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "0afba759e55aef88b3e3a19ce1993b10" + "hash": "d5915f612743de0fe849f83f6c162c29" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -27468,11 +27468,11 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/CodeScanning.php", - "hash": "035196723d9518e17e7f016fa71af9c8" + "hash": "254f6e3c029935a79e15b051e78e67ba" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "75160b9f5f6f722926af37274c9fa6a9" + "hash": "2cf667fa5fe44d232492f95c3ad3ffd9" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Dependabot.php", @@ -29040,7 +29040,7 @@ }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber.php", - "hash": "b9452bc32629313c2650579a65f77f38" + "hash": "a926bd101b56e9d2fa2d26b4ba0ef2d2" }, { "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Instances.php", @@ -30291,20 +30291,24 @@ "hash": "d0ca0c14c2d902d47122181008e84185" }, { - "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure.php", - "hash": "402d90be4e3731ec2090b344dd7be2cb" + "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php", + "hash": "918a75e1fc3897bd242cdd1f3516cd1a" }, { - "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosureMetadata.php", - "hash": "481b587324bb974972dd0edc53d33df7" + "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertCreateRequest.php", + "hash": "b1c32113d0944e1335325145d49ced03" }, { - "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure\/Data.php", - "hash": "7e31b58800848793f0d914de6f592979" + "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning.php", + "hash": "4311c37f93cd8a3fa3609969d2db5374" }, { - "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php", - "hash": "918a75e1fc3897bd242cdd1f3516cd1a" + "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanningMetadata.php", + "hash": "4d08e7e942465ee37362f1f5a8df1060" + }, + { + "name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning\/Data.php", + "hash": "2a8bbc4780615e5e98d79b6596143aaf" } ] }, diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php b/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php index 6675f92fc09..eb79e94ae2a 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php @@ -41,7 +41,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed if ($signature === 'data|type' && $value['type'] === 'secret_scanning_closure') { try { - return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosure::class, $value); + return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanning::class, $value); } catch (Throwable) { } } diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php b/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php index 77f03f2525e..91b890d5b3e 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.php @@ -34,7 +34,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed if ($signature === 'alert_title|reason' && ($value['reason'] === 'fixed_later' || $value['reason'] === 'false_positive' || $value['reason'] === 'tests' || $value['reason'] === 'revoked')) { try { - return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosureMetadata::class, $value); + return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanningMetadata::class, $value); } catch (Throwable) { } } diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php b/clients/GitHubEnterprise-3.15/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php index ac16c1c6208..c42e5d0d8e8 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Hydrator/Operation/Repos/Owner/Repo/CodeScanning/Alerts/AlertNumber.php @@ -12,6 +12,7 @@ use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertRule; use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAnalysisTool; use ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable; +use ApiClients\Client\GitHubEnterprise\Schema\ScimError; use ApiClients\Client\GitHubEnterprise\Schema\SimpleUser; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -57,6 +58,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($payload), 'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload), + 'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -1098,6 +1100,91 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema } } + private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(array $payload): ScimError + { + $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['detail'] ?? null; + + if ($value === null) { + $properties['detail'] = null; + goto after_detail; + } + + $properties['detail'] = $value; + + after_detail: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + + $value = $payload['scim_type'] ?? null; + + if ($value === null) { + $properties['scimType'] = null; + goto after_scimType; + } + + $properties['scimType'] = $value; + + after_scimType: + + $value = $payload['schemas'] ?? null; + + if ($value === null) { + $properties['schemas'] = null; + goto after_schemas; + } + + $properties['schemas'] = $value; + + after_schemas: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(ScimError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new ScimError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack); + } + } + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -1138,6 +1225,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($object), 'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object), + 'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($object), default => throw new LogicException("No serialization defined for $className"), }; } catch (Throwable $exception) { @@ -1752,6 +1840,69 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡ return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(mixed $object): mixed + { + assert($object instanceof ScimError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $detail = $object->detail; + + if ($detail === null) { + goto after_detail; + } + + after_detail: $result['detail'] = $detail; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + $scimType = $object->scimType; + + if ($scimType === null) { + goto after_scimType; + } + + after_scimType: $result['scim_type'] = $scimType; + + $schemas = $object->schemas; + + if ($schemas === null) { + goto after_schemas; + } + + static $schemasSerializer0; + + if ($schemasSerializer0 === null) { + $schemasSerializer0 = new SerializeArrayItems(...[]); + } + + $schemas = $schemasSerializer0->serialize($schemas, $this); + after_schemas: $result['schemas'] = $schemas; + + return $result; + } + /** * @param class-string $className * @param iterable $payloads; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/CodeScanning/UpdateAlert.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/CodeScanning/UpdateAlert.php index 1da32c3c658..5ada5811c28 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/CodeScanning/UpdateAlert.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/CodeScanning/UpdateAlert.php @@ -59,6 +59,14 @@ public function createResponse(ResponseInterface $response): Schema\CodeScanning $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\CodeScanningAlert::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); return $this->hydrator->hydrateObject(Schema\CodeScanningAlert::class, $body); + /** + * Bad Request + **/ + + case 400: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(400, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); /** * Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository **/ @@ -85,6 +93,19 @@ public function createResponse(ResponseInterface $response): Schema\CodeScanning throw new ErrorSchemas\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable(503, $this->hydrator->hydrateObject(Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable::class, $body)); } + break; + case 'application/scim+json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Bad Request + **/ + case 400: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ScimError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\ScimError(400, $this->hydrator->hydrateObject(Schema\ScimError::class, $body)); + } + break; } diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php index fcbad870e25..4cac34e8bea 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForEnterprise.php @@ -29,7 +29,7 @@ final class ListAlertsForEnterprise private string $enterprise; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php index 7597daaf3e5..7b2def9a9d1 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrg.php @@ -29,7 +29,7 @@ final class ListAlertsForOrg private string $org; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php index 21dd514722c..f30605305b6 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForOrgListing.php @@ -29,7 +29,7 @@ final class ListAlertsForOrgListing private string $org; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php index 24d29c9db99..83a3c88fe10 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepo.php @@ -32,7 +32,7 @@ final class ListAlertsForRepo private string $repo; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php index b0d034ebe5f..c0b2ef22905 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operation/SecretScanning/ListAlertsForRepoListing.php @@ -32,7 +32,7 @@ final class ListAlertsForRepoListing private string $repo; /**Set to `open` or `resolved` to only list secret scanning alerts in a specific state. **/ private string $state; - /**A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ + /**A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. **/ private string $secretType; /**A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. **/ private string $resolution; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/CodeScanning/UpdateAlert.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/CodeScanning/UpdateAlert.php index 16b4474e1eb..1e824a18990 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/CodeScanning/UpdateAlert.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/CodeScanning/UpdateAlert.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $owner, string $repo, int $alertNumber, array $params): CodeScanningAlert { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\CodeScanning\UpdateAlert($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $alertNumber); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php index 7d2c83ecca5..6665c6eb236 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForEnterprise.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\SecretScanning\ListAlertsForEnterprise($this->responseSchemaValidator, $this->hydrator, $enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php index 04af6e4307a..c4de6c75b3a 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\SecretScanning\ListAlertsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php index f8d5e4eae11..a63936fc2c2 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForOrgListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\SecretScanning\ListAlertsForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php index 6bb3619606b..9f398e2dc66 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepo.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\SecretScanning\ListAlertsForRepo($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php index 2ef0a92b104..d73db645221 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Operator/SecretScanning/ListAlertsForRepoListing.php @@ -25,7 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function call(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort = 'created', string $direction = 'desc', int $page = 1, int $perPage = 30): iterable|WithoutBody { $operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\SecretScanning\ListAlertsForRepoListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Five.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Five.php index d8f23a0c469..67e4b161f93 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Five.php @@ -52,7 +52,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|WithoutBody|iterable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|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): HookDelivery|ActionsEnterprisePermissions|Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|iterable|WithoutBody|GistComment|GhesChecksSystemRequirements|GhesClusterStatus|\ApiClients\Client\GitHubEnterprise\Schema\Operations\EnterpriseAdmin\GetManageConfigApplyStatus\Response\ApplicationJson\Ok|GhesLicenseInfo|GhesConfigNodes|GhesGetSettings|GhesReplicationStatus|BasicError|ThreadSubscription|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|OrgPreReceiveHook|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Installation|Language|LicenseContent|Page|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/SecretScanning.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/SecretScanning.php index 28a1d29aad6..943fcd53f25 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/SecretScanning.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/SecretScanning.php @@ -37,7 +37,7 @@ public function getSecurityAnalysisSettingsForEnterprise(array $params): Enterpr return $operator->call($arguments['enterprise']); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepo(array $params): iterable|WithoutBody { $arguments = []; @@ -118,7 +118,7 @@ public function listAlertsForRepo(array $params): iterable|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['state'], $arguments['secret_type'], $arguments['resolution'], $arguments['before'], $arguments['after'], $arguments['validity'], $arguments['sort'], $arguments['direction'], $arguments['page'], $arguments['per_page']); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForEnterprise(array $params): iterable { $arguments = []; @@ -187,7 +187,7 @@ public function listAlertsForEnterprise(array $params): iterable return $operator->call($arguments['enterprise'], $arguments['state'], $arguments['secret_type'], $arguments['resolution'], $arguments['before'], $arguments['after'], $arguments['validity'], $arguments['sort'], $arguments['direction'], $arguments['per_page']); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrg(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Six.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Six.php index d580d991783..a686b1e69b1 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/Get/Six.php @@ -70,7 +70,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|WithoutBody|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 */ + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|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): PreReceiveEnvironmentDownloadStatus|ActionsCacheUsageOrgEnterprise|ActionsCacheUsagePolicyEnterprise|Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|AdvancedSecurityActiveCommitters|\ApiClients\Client\GitHubEnterprise\Schema\Operations\EnterpriseAdmin\GetManageConfigApplyEvents\Response\ApplicationJson\Ok|WithoutBody|GhesLicenseCheck|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodeSecurityConfiguration|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Package|CustomProperty|RuleSuite|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|Json|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|CommitComment|Commit|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|RepositoryPreReceiveHook|PullRequest|Release|RepositoryRuleset|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterprise\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|ScimEnterpriseGroupList|ScimEnterpriseUserList|TeamRepository { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Five.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Five.php index dda11c9dc13..8882ef251de 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|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|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/SecretScanning.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/SecretScanning.php index 6e0faf82d39..1fe7eb67ab7 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/SecretScanning.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/SecretScanning.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrgListing(array $params): iterable { $arguments = []; @@ -102,7 +102,7 @@ public function listAlertsForOrgListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepoListing(array $params): iterable|WithoutBody { $arguments = []; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Six.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Six.php index 8577391cabb..e857e464454 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Six.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|WithoutBody|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/CodeScanning.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/CodeScanning.php index 030665bed3c..76d1f89f954 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/CodeScanning.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/CodeScanning.php @@ -42,7 +42,6 @@ public function updateDefaultSetup(array $params): EmptyObject|CodeScanningDefau return $operator->call($arguments['owner'], $arguments['repo'], $params); } - /** @return */ public function updateAlert(array $params): CodeScanningAlert { $arguments = []; diff --git a/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/Seven.php b/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/Seven.php index 46952949b86..624131f90f6 100644 --- a/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/Seven.php +++ b/clients/GitHubEnterprise-3.15/src/Internal/Router/Patch/Seven.php @@ -26,6 +26,7 @@ public function __construct(private Routers $routers) { } + /** @return |Schema\CodeScanningAlert */ public function call(string $call, array $params, array $pathChunks): TeamDiscussion|WithoutBody|CodeScanningAlert|DependabotAlert|GitRef|WebhookConfig|IssueComment|PullRequestReviewComment|ReleaseAsset|SecretScanningAlert|GroupResponse|UserResponse|TeamDiscussionComment { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterprise-3.15/src/Operation/CodeScanning.php b/clients/GitHubEnterprise-3.15/src/Operation/CodeScanning.php index 1a0d5c77f3a..5cab50b880e 100644 --- a/clients/GitHubEnterprise-3.15/src/Operation/CodeScanning.php +++ b/clients/GitHubEnterprise-3.15/src/Operation/CodeScanning.php @@ -64,7 +64,6 @@ public function getAlert(string $owner, string $repo, int $alertNumber): CodeSca return $this->operators->codeScanning👷GetAlert()->call($owner, $repo, $alertNumber); } - /** @return */ public function updateAlert(string $owner, string $repo, int $alertNumber, array $params): CodeScanningAlert { return $this->operators->codeScanning👷UpdateAlert()->call($owner, $repo, $alertNumber, $params); diff --git a/clients/GitHubEnterprise-3.15/src/Operation/SecretScanning.php b/clients/GitHubEnterprise-3.15/src/Operation/SecretScanning.php index c8976a5aa1c..d3733412a99 100644 --- a/clients/GitHubEnterprise-3.15/src/Operation/SecretScanning.php +++ b/clients/GitHubEnterprise-3.15/src/Operation/SecretScanning.php @@ -29,7 +29,7 @@ public function patchSecurityAnalysisSettingsForEnterprise(string $enterprise, a return $this->operators->secretScanning👷PatchSecurityAnalysisSettingsForEnterprise()->call($enterprise, $params); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForEnterprise(string $enterprise, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForEnterprise()->call($enterprise, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $perPage); @@ -41,25 +41,25 @@ public function postSecurityProductEnablementForEnterprise(string $enterprise, s return $this->operators->secretScanning👷PostSecurityProductEnablementForEnterprise()->call($enterprise, $securityProduct, $enablement); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrg(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForOrg()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return Observable */ + /** @return iterable */ public function listAlertsForOrgListing(string $org, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable { return $this->operators->secretScanning👷ListAlertsForOrgListing()->call($org, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepo(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepo()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); } - /** @return Observable|WithoutBody */ + /** @return iterable|WithoutBody */ public function listAlertsForRepoListing(string $owner, string $repo, string $state, string $secretType, string $resolution, string $before, string $after, string $validity, string $sort, string $direction, int $page, int $perPage): iterable|WithoutBody { return $this->operators->secretScanning👷ListAlertsForRepoListing()->call($owner, $repo, $state, $secretType, $resolution, $before, $after, $validity, $sort, $direction, $page, $perPage); diff --git a/clients/GitHubEnterprise-3.15/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterprise-3.15/src/PHPStan/ClientCallReturnTypes.php index 1fab040d149..11a2ae07976 100644 --- a/clients/GitHubEnterprise-3.15/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterprise-3.15/src/PHPStan/ClientCallReturnTypes.php @@ -608,7 +608,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /enterprises/{enterprise}/settings/billing/advanced-security') { @@ -1736,11 +1736,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/security-managers') { @@ -2592,7 +2592,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\CodeScanningAlert'); } if ($call === 'GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances') { @@ -3752,11 +3752,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'LIST /repos/{owner}/{repo}/secret-scanning/alerts') { - return $this->typeResolver->resolve('Observable|WithoutBody'); + return $this->typeResolver->resolve('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}') { diff --git a/clients/GitHubEnterprise-3.15/src/Schema/CodeScanning/UpdateAlert/Request/ApplicationJson.php b/clients/GitHubEnterprise-3.15/src/Schema/CodeScanning/UpdateAlert/Request/ApplicationJson.php index c1ed911dd0c..772af2b8465 100644 --- a/clients/GitHubEnterprise-3.15/src/Schema/CodeScanning/UpdateAlert/Request/ApplicationJson.php +++ b/clients/GitHubEnterprise-3.15/src/Schema/CodeScanning/UpdateAlert/Request/ApplicationJson.php @@ -42,6 +42,10 @@ "null" ], "description": "The dismissal comment associated with the dismissal of the alert." + }, + "create_request": { + "type": "boolean", + "description": "If `true`, attempt to create an alert dismissal request." } } }'; @@ -50,17 +54,20 @@ public const SCHEMA_EXAMPLE_DATA = '{ "state": "open", "dismissed_reason": "used in tests", - "dismissed_comment": "generated" + "dismissed_comment": "generated", + "create_request": false }'; /** * state: Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * dismissedReason: **Required when the state is dismissed.** The reason for dismissing or closing the alert. * dismissedComment: The dismissal comment associated with the dismissal of the alert. + * createRequest: If `true`, attempt to create an alert dismissal request. */ public function __construct(public string $state, #[MapFrom('dismissed_reason')] public string|null $dismissedReason, #[MapFrom('dismissed_comment')] - public string|null $dismissedComment,) + public string|null $dismissedComment, #[MapFrom('create_request')] + public bool|null $createRequest,) { } } diff --git a/clients/GitHubEnterprise-3.15/src/Schema/CodeScanningAlertCreateRequest.php b/clients/GitHubEnterprise-3.15/src/Schema/CodeScanningAlertCreateRequest.php new file mode 100644 index 00000000000..8c03fd8fa39 --- /dev/null +++ b/clients/GitHubEnterprise-3.15/src/Schema/CodeScanningAlertCreateRequest.php @@ -0,0 +1,20 @@ +operations()->codeScanning()->updateAlert('generated', 'generated', 12, json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + /** @test */ + public function call_httpCode_400_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(400, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/repos/generated/generated/code-scanning/alerts/12', Argument::type('array'), json_encode(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\UpdateAlert::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_400_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(400, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/repos/generated/generated/code-scanning/alerts/12', Argument::type('array'), json_encode(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->updateAlert('generated', 'generated', 12, json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + + /** @test */ + public function call_httpCode_400_requestContentType_application_json_responseContentType_application_scim_json_zero(): void + { + self::expectException(ErrorSchemas\ScimError::class); + $response = new Response(400, ['Content-Type' => 'application/scim+json'], json_encode(json_decode(Schema\ScimError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/repos/generated/generated/code-scanning/alerts/12', Argument::type('array'), json_encode(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\CodeScanning\UpdateAlert::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['alert_number'] = 12; + + return $data; + })(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_400_requestContentType_application_json_responseContentType_application_scim_json_zero(): void + { + self::expectException(ErrorSchemas\ScimError::class); + $response = new Response(400, ['Content-Type' => 'application/scim+json'], json_encode(json_decode(Schema\ScimError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('PATCH', '/repos/generated/generated/code-scanning/alerts/12', Argument::type('array'), json_encode(json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->codeScanning()->updateAlert('generated', 'generated', 12, json_decode(Schema\CodeScanning\UpdateAlert\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } + /** @test */ public function call_httpCode_403_requestContentType_application_json_responseContentType_application_json_zero(): void { diff --git a/clients/GitHubEnterprise-3.15/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterprise-3.15/tests/Types/ClientCallReturnTypes.php index 76063a3b827..92440d2f85b 100644 --- a/clients/GitHubEnterprise-3.15/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterprise-3.15/tests/Types/ClientCallReturnTypes.php @@ -158,7 +158,7 @@ function authHeader(): string assertType('', $client->call('GET /enterprises/{enterprise}/code_security_and_analysis')); assertType('', $client->call('PATCH /enterprises/{enterprise}/code_security_and_analysis')); assertType('Observable|WithoutBody', $client->call('GET /enterprises/{enterprise}/dependabot/alerts')); -assertType('Observable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/secret-scanning/alerts')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/advanced-security')); assertType('', $client->call('POST /enterprises/{enterprise}/{security_product}/{enablement}')); assertType('Observable|WithoutBody', $client->call('GET /events')); @@ -440,8 +440,8 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /orgs/{org}/rulesets/{ruleset_id}')); -assertType('Observable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); -assertType('Observable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); +assertType('iterable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); +assertType('iterable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); assertType('Observable', $client->call('GET /orgs/{org}/security-managers')); assertType('', $client->call('PUT /orgs/{org}/security-managers/teams/{team_slug}')); assertType('', $client->call('DELETE /orgs/{org}/security-managers/teams/{team_slug}')); @@ -654,7 +654,7 @@ function authHeader(): string 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('Schema\\CodeScanningAlert', $client->call('PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}')); 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')); @@ -944,8 +944,8 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}')); -assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); -assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); +assertType('iterable|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('', $client->call('PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations')); diff --git a/etc/specs/GitHubEnterprise-3.15/current.spec.yaml b/etc/specs/GitHubEnterprise-3.15/current.spec.yaml index 5d701b8c010..6ff943270e7 100644 --- a/etc/specs/GitHubEnterprise-3.15/current.spec.yaml +++ b/etc/specs/GitHubEnterprise-3.15/current.spec.yaml @@ -26734,6 +26734,8 @@ paths: "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" dismissed_comment: "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" + create_request: + "$ref": "#/components/schemas/code-scanning-alert-create-request" required: - state examples: @@ -26743,6 +26745,7 @@ paths: dismissed_reason: false positive dismissed_comment: This alert is not actually correct, because there's a sanitizer included in the library. + create_request: true responses: '200': description: Response @@ -26753,6 +26756,8 @@ paths: examples: default: "$ref": "#/components/examples/code-scanning-alert-dismissed" + '400': + "$ref": "#/components/responses/bad_request" '403': "$ref": "#/components/responses/code_scanning_forbidden_write" '404': @@ -82325,6 +82330,9 @@ components: enum: - open - dismissed + code-scanning-alert-create-request: + type: boolean + description: If `true`, attempt to create an alert dismissal request. code-scanning-analysis-sarif-id: type: string description: An identifier for the upload. @@ -92361,7 +92369,7 @@ components: path: type: string description: The path of the file where the secret was detected - exemption-request-secret-scanning-closure: + dismissal-request-secret-scanning: title: Secret scanning alert dismissal request data description: Secret scanning alerts that have dismissal requests. type: object @@ -92399,7 +92407,7 @@ components: - fixed_later - false_positive - tests - exemption-request-secret-scanning-closure-metadata: + dismissal-request-secret-scanning-metadata: title: Secret scanning alert dismissal request metadata description: Metadata for a secret scanning alert dismissal request. type: object @@ -92480,7 +92488,7 @@ components: oneOf: - "$ref": "#/components/schemas/exemption-request-push-ruleset-bypass" - "$ref": "#/components/schemas/exemption-request-secret-scanning" - - "$ref": "#/components/schemas/exemption-request-secret-scanning-closure" + - "$ref": "#/components/schemas/dismissal-request-secret-scanning" resource_identifier: type: string description: The unique identifier for the request type of the exemption @@ -92508,7 +92516,7 @@ components: description: Metadata about the exemption request. oneOf: - "$ref": "#/components/schemas/exemption-request-secret-scanning-metadata" - - "$ref": "#/components/schemas/exemption-request-secret-scanning-closure-metadata" + - "$ref": "#/components/schemas/dismissal-request-secret-scanning-metadata" expires_at: type: string format: date-time @@ -217452,7 +217460,7 @@ components: name: secret_type in: query description: A comma-separated list of secret types to return. All default secret - patterns are returned. To return experimental patterns, pass the token name(s) + patterns are returned. To return generic patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-server@3.15/enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. required: false