Skip to content

Commit 2896247

Browse files
committed
Bump league/openapi-psr7-validator
1 parent d3f48f1 commit 2896247

File tree

6 files changed

+172
-8
lines changed

6 files changed

+172
-8
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"api-clients/contracts": "dev-main",
1414
"cebe/php-openapi": "dev-openapi-31 as 1.6.0",
1515
"eventsauce/object-hydrator": "^1.1",
16+
"league/openapi-psr7-validator": "^0.18",
1617
"react/async": "^4.0",
1718
"wyrihaximus/react-awaitable-observable": "^1.0"
1819
},

src/Hydrator/WebHook/ProjectsV2.php

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function hydrateObject(string $className, array $payload): object
2828
'ApiClients\Client\GitHubAE\Schema\ProjectsV2' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️ProjectsV2($payload),
2929
'ApiClients\Client\GitHubAE\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️SimpleUser($payload),
3030
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectCreated' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectCreated($payload),
31+
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectDeleted($payload),
3132
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited($payload),
3233
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited\Changes' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited⚡️Changes($payload),
3334
'ApiClients\Client\GitHubAE\Schema\WebhookMemberEdited\Changes\Permission' => $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookMemberEdited⚡️Changes⚡️Permission($payload),
@@ -821,6 +822,98 @@ private function hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️We
821822
}
822823

823824

825+
private function hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectDeleted(array $payload): \ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted
826+
{
827+
$properties = [];
828+
$missingFields = [];
829+
try {
830+
$value = $payload['action'] ?? null;
831+
832+
if ($value === null) {
833+
$missingFields[] = 'action';
834+
goto after_action;
835+
}
836+
837+
$properties['action'] = $value;
838+
839+
after_action:
840+
841+
$value = $payload['organization'] ?? null;
842+
843+
if ($value === null) {
844+
$missingFields[] = 'organization';
845+
goto after_organization;
846+
}
847+
848+
if (is_array($value)) {
849+
try {
850+
$this->hydrationStack[] = 'organization';
851+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️OrganizationSimple($value);
852+
} finally {
853+
array_pop($this->hydrationStack);
854+
}
855+
}
856+
857+
$properties['organization'] = $value;
858+
859+
after_organization:
860+
861+
$value = $payload['projects_v2'] ?? null;
862+
863+
if ($value === null) {
864+
$missingFields[] = 'projects_v2';
865+
goto after_projects_v2;
866+
}
867+
868+
if (is_array($value)) {
869+
try {
870+
$this->hydrationStack[] = 'projects_v2';
871+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️ProjectsV2($value);
872+
} finally {
873+
array_pop($this->hydrationStack);
874+
}
875+
}
876+
877+
$properties['projects_v2'] = $value;
878+
879+
after_projects_v2:
880+
881+
$value = $payload['sender'] ?? null;
882+
883+
if ($value === null) {
884+
$missingFields[] = 'sender';
885+
goto after_sender;
886+
}
887+
888+
if (is_array($value)) {
889+
try {
890+
$this->hydrationStack[] = 'sender';
891+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️SimpleUser($value);
892+
} finally {
893+
array_pop($this->hydrationStack);
894+
}
895+
}
896+
897+
$properties['sender'] = $value;
898+
899+
after_sender:
900+
901+
} catch (\Throwable $exception) {
902+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted', $exception, stack: $this->hydrationStack);
903+
}
904+
905+
if (count($missingFields) > 0) {
906+
throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted::class, $missingFields, stack: $this->hydrationStack);
907+
}
908+
909+
try {
910+
return new \ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted(...$properties);
911+
} catch (\Throwable $exception) {
912+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted', $exception, stack: $this->hydrationStack);
913+
}
914+
}
915+
916+
824917
private function hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited(array $payload): \ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited
825918
{
826919
$properties = [];
@@ -1290,6 +1383,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
12901383
'ApiClients\Client\GitHubAE\Schema\ProjectsV2' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️ProjectsV2($object),
12911384
'ApiClients\Client\GitHubAE\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️SimpleUser($object),
12921385
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectCreated' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectCreated($object),
1386+
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectDeleted($object),
12931387
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited($object),
12941388
'ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited\Changes' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited⚡️Changes($object),
12951389
'ApiClients\Client\GitHubAE\Schema\WebhookMemberEdited\Changes\Permission' => $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookMemberEdited⚡️Changes⚡️Permission($object),
@@ -1682,6 +1776,34 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema
16821776
}
16831777

16841778

1779+
private function serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectDeleted(mixed $object): mixed
1780+
{
1781+
\assert($object instanceof \ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectDeleted);
1782+
$result = [];
1783+
1784+
$action = $object->action;
1785+
after_action: $result['action'] = $action;
1786+
1787+
1788+
$organization = $object->organization;
1789+
$organization = $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️OrganizationSimple($organization);
1790+
after_organization: $result['organization'] = $organization;
1791+
1792+
1793+
$projects_v2 = $object->projects_v2;
1794+
$projects_v2 = $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️ProjectsV2($projects_v2);
1795+
after_projects_v2: $result['projects_v2'] = $projects_v2;
1796+
1797+
1798+
$sender = $object->sender;
1799+
$sender = $this->serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️SimpleUser($sender);
1800+
after_sender: $result['sender'] = $sender;
1801+
1802+
1803+
return $result;
1804+
}
1805+
1806+
16851807
private function serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️WebhookProjectsV2ProjectEdited(mixed $object): mixed
16861808
{
16871809
\assert($object instanceof \ApiClients\Client\GitHubAE\Schema\WebhookProjectsV2ProjectEdited);

0 commit comments

Comments
 (0)