Skip to content

[GitHub] Update to 1.1.4-dbba2c62a8f04380c590a1aa0d1194e8 from 1.1.4-2c0c305301b4db15047c06c5d15a3675 #1536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clients/GitHub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4153,6 +4153,7 @@ $client->call('GET /orgs/{org}/attestations/{subject_digest}', [
'after' => 'generated',
'org' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -4163,6 +4164,7 @@ $client->operations()->orgs()->listAttestations( before: 'generated',
after: 'generated',
org: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down Expand Up @@ -13117,6 +13119,7 @@ $client->call('GET /repos/{owner}/{repo}/attestations/{subject_digest}', [
'before' => 'generated',
'after' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -13128,6 +13131,7 @@ $client->operations()->repos()->listAttestations( owner: 'generated',
before: 'generated',
after: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down Expand Up @@ -28087,6 +28091,7 @@ $client->call('GET /users/{username}/attestations/{subject_digest}', [
'after' => 'generated',
'username' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -28097,6 +28102,7 @@ $client->operations()->users()->listAttestations( before: 'generated',
after: 'generated',
username: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down
144 changes: 60 additions & 84 deletions clients/GitHub/etc/openapi-client-generator.state

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHub/src/Client.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHub/src/ClientInterface.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace ApiClients\Client\GitHub\Internal\Hydrator\Operation\Users\Username\Attestations;

use ApiClients\Client\GitHub\Schema\BasicError;
use ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok;
use ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json;
use EventSauce\ObjectHydrator\IterableList;
use EventSauce\ObjectHydrator\ObjectMapper;
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
Expand Down Expand Up @@ -39,13 +39,13 @@ public function __construct()
public function hydrateObject(string $className, array $payload): object
{
return match ($className) {
'ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($payload),
'ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($payload),
'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload),
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
};
}

private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(array $payload): Json
{
$properties = [];
$missingFields = [];
Expand All @@ -61,17 +61,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Oper

after_attestations:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
}

if (count($missingFields) > 0) {
throw UnableToHydrateObject::dueToMissingFields(Ok::class, $missingFields, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToMissingFields(Json::class, $missingFields, stack: $this->hydrationStack);
}

try {
return new Ok(...$properties);
return new Json(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
}
}

Expand Down Expand Up @@ -169,7 +169,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'DateTime' => $this->serializeValueDateTime($object),
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
'ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($object),
'ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($object),
'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object),
default => throw new LogicException("No serialization defined for $className"),
};
Expand Down Expand Up @@ -233,9 +233,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed
return $serializer->serialize($value, $this);
}

private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed
private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(mixed $object): mixed
{
assert($object instanceof Ok);
assert($object instanceof Json);
$result = [];

$attestations = $object->attestations;
Expand Down
4 changes: 2 additions & 2 deletions clients/GitHub/src/Internal/Hydrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ public function hydrateObject(string $className, array $payload): object
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionConfigurationDisabled', '\\ApiClients\\Client\\GitHub\\Schema\\EnterpriseWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleInstallation', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimpleWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionConfigurationEnabled' => $this->getObjectMapperWebHook🪝BranchProtectionConfiguration()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksRule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AdminEnforced', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorNames', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorsOnly', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedDismissalActorsOnly', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LinearHistoryRequirementEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockBranchEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockAllowsForkSync', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\PullRequestReviewsEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequireLastPushApproval', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecks', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecksEnforcementLevel' => $this->getObjectMapperWebHook🪝BranchProtectionRule()->hydrateObject($className, $payload),
Expand Down Expand Up @@ -1423,7 +1423,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionConfigurationDisabled', '\\ApiClients\\Client\\GitHub\\Schema\\EnterpriseWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\SimpleInstallation', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimpleWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\CustomProperties', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository\\Owner', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryWebhooks\\TemplateRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionConfigurationEnabled' => $this->getObjectMapperWebHook🪝BranchProtectionConfiguration()->serializeObject($object),
'\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhooksRule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AdminEnforced', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorNames', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorsOnly', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedDismissalActorsOnly', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LinearHistoryRequirementEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockBranchEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockAllowsForkSync', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\PullRequestReviewsEnforcementLevel', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequireLastPushApproval', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecks', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecksEnforcementLevel' => $this->getObjectMapperWebHook🪝BranchProtectionRule()->serializeObject($object),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,25 @@ final class ListAttestations
private string $org;
/**The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. **/
private string $subjectDigest;
/**Optional filter for fetching attestations with a given predicate type.
This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. **/
private string $predicateType;
/**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
private int $perPage;

public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Attestations\SubjectDigest $hydrator, string $before, string $after, string $org, string $subjectDigest, int $perPage = 30)
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Attestations\SubjectDigest $hydrator, string $before, string $after, string $org, string $subjectDigest, string $predicateType, int $perPage = 30)
{
$this->before = $before;
$this->after = $after;
$this->org = $org;
$this->subjectDigest = $subjectDigest;
$this->predicateType = $predicateType;
$this->perPage = $perPage;
}

public function createRequest(): RequestInterface
{
return new Request('GET', str_replace(['{before}', '{after}', '{org}', '{subject_digest}', '{per_page}'], [$this->before, $this->after, $this->org, $this->subjectDigest, $this->perPage], '/orgs/{org}/attestations/{subject_digest}' . '?before={before}&after={after}&per_page={per_page}'));
return new Request('GET', str_replace(['{before}', '{after}', '{org}', '{subject_digest}', '{predicate_type}', '{per_page}'], [$this->before, $this->after, $this->org, $this->subjectDigest, $this->predicateType, $this->perPage], '/orgs/{org}/attestations/{subject_digest}' . '?before={before}&after={after}&predicate_type={predicate_type}&per_page={per_page}'));
}

public function createResponse(ResponseInterface $response): Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,26 @@ final class ListAttestations
private string $after;
/**The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`. **/
private string $subjectDigest;
/**Optional filter for fetching attestations with a given predicate type.
This option accepts `provenance`, `sbom`, or freeform text for custom predicate types. **/
private string $predicateType;
/**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
private int $perPage;

public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Attestations\SubjectDigest $hydrator, string $owner, string $repo, string $before, string $after, string $subjectDigest, int $perPage = 30)
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Attestations\SubjectDigest $hydrator, string $owner, string $repo, string $before, string $after, string $subjectDigest, string $predicateType, int $perPage = 30)
{
$this->owner = $owner;
$this->repo = $repo;
$this->before = $before;
$this->after = $after;
$this->subjectDigest = $subjectDigest;
$this->predicateType = $predicateType;
$this->perPage = $perPage;
}

public function createRequest(): RequestInterface
{
return new Request('GET', str_replace(['{owner}', '{repo}', '{before}', '{after}', '{subject_digest}', '{per_page}'], [$this->owner, $this->repo, $this->before, $this->after, $this->subjectDigest, $this->perPage], '/repos/{owner}/{repo}/attestations/{subject_digest}' . '?before={before}&after={after}&per_page={per_page}'));
return new Request('GET', str_replace(['{owner}', '{repo}', '{before}', '{after}', '{subject_digest}', '{predicate_type}', '{per_page}'], [$this->owner, $this->repo, $this->before, $this->after, $this->subjectDigest, $this->predicateType, $this->perPage], '/repos/{owner}/{repo}/attestations/{subject_digest}' . '?before={before}&after={after}&predicate_type={predicate_type}&per_page={per_page}'));
}

public function createResponse(ResponseInterface $response): Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json
Expand Down
Loading
Loading