Skip to content

Commit 02f0616

Browse files
committed
Improve testing and content type detection and handling
1 parent 2e47339 commit 02f0616

File tree

1,738 files changed

+24464
-16804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,738 files changed

+24464
-16804
lines changed

etc/openapi-generator-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ templates:
1111
schemas:
1212
allowDuplication: true
1313
useAliasesForDuplication: true
14+
contentType:
15+
- ApiClients\Tools\OpenApiClientGenerator\ContentType\Json
16+
- ApiClients\Tools\OpenApiClientGenerator\ContentType\Raw
1417
voter:
1518
listOperation:
1619
- ApiClients\Tools\OpenApiClientGenerator\Voter\ListOperation\PageAndPerPageInQuery

src/Client.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,9 @@ public function callAsync(string $call, array $params = array())
323323
}
324324
$arguments['s'] = $params['s'];
325325
unset($params['s']);
326-
if (\array_key_exists(Hydrator\Operation\Octocat::class, $this->hydrator) == false) {
327-
$this->hydrator[Hydrator\Operation\Octocat::class] = $this->hydrators->getObjectMapperOperation🌀Octocat();
328-
}
329-
$operation = new Operation\Meta\GetOctocat($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Octocat::class], $arguments['s']);
326+
$operation = new Operation\Meta\GetOctocat($arguments['s']);
330327
$request = $operation->createRequest($params);
331-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operation\Meta\GetOctocat\Response\ApplicationoctocatStream\H200 {
328+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \Psr\Http\Message\ResponseInterface {
332329
return $operation->createResponse($response);
333330
});
334331
}
@@ -9262,7 +9259,7 @@ public function callAsync(string $call, array $params = array())
92629259
}
92639260
$operation = new Operation\Repos\GetContent($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Repos\CbOwnerRcb\CbRepoRcb\Contents\CbPathRcb::class], $arguments['owner'], $arguments['repo'], $arguments['path'], $arguments['ref']);
92649261
$request = $operation->createRequest($params);
9265-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ContentTree|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operation\Repos\GetContent\Response\Applicationjson\H200 {
9262+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\Operation\Repos\GetContent\Response\Applicationjson\H200 {
92669263
return $operation->createResponse($response);
92679264
});
92689265
}
@@ -10416,7 +10413,7 @@ public function callAsync(string $call, array $params = array())
1041610413
}
1041710414
$operation = new Operation\Scim\ListProvisionedIdentities($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Scim\V2\Organizations\CbOrgRcb\Users::class], $arguments['org'], $arguments['startIndex'], $arguments['count'], $arguments['filter']);
1041810415
$request = $operation->createRequest($params);
10419-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUserList {
10416+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : mixed {
1042010417
return $operation->createResponse($response);
1042110418
});
1042210419
}
@@ -11918,7 +11915,7 @@ public function callAsync(string $call, array $params = array())
1191811915
}
1191911916
$operation = new Operation\CodeScanning\GetAnalysis($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Repos\CbOwnerRcb\CbRepoRcb\CodeDashScanning\Analyses\CbAnalysisIdRcb::class], $arguments['owner'], $arguments['repo'], $arguments['analysis_id']);
1192011917
$request = $operation->createRequest($params);
11921-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operation\CodeScanning\GetAnalysis\Response\ApplicationjsonPlusSarif\H200 {
11918+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAnalysis {
1192211919
return $operation->createResponse($response);
1192311920
});
1192411921
}
@@ -13778,7 +13775,7 @@ public function callAsync(string $call, array $params = array())
1377813775
}
1377913776
$operation = new Operation\Scim\GetProvisioningInformationForUser($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Scim\V2\Organizations\CbOrgRcb\Users\CbScimUserIdRcb::class], $arguments['org'], $arguments['scim_user_id']);
1378013777
$request = $operation->createRequest($params);
13781-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser {
13778+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : mixed {
1378213779
return $operation->createResponse($response);
1378313780
});
1378413781
}
@@ -16560,7 +16557,7 @@ public function callAsync(string $call, array $params = array())
1656016557
}
1656116558
$operation = new Operation\Scim\ProvisionAndInviteUser($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Scim\V2\Organizations\CbOrgRcb\Users::class], $arguments['org']);
1656216559
$request = $operation->createRequest($params);
16563-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser {
16560+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : mixed {
1656416561
return $operation->createResponse($response);
1656516562
});
1656616563
}
@@ -20893,7 +20890,7 @@ public function callAsync(string $call, array $params = array())
2089320890
}
2089420891
$operation = new Operation\Scim\UpdateAttributeForUser($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Scim\V2\Organizations\CbOrgRcb\Users\CbScimUserIdRcb::class], $arguments['org'], $arguments['scim_user_id']);
2089520892
$request = $operation->createRequest($params);
20896-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser {
20893+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : mixed {
2089720894
return $operation->createResponse($response);
2089820895
});
2089920896
}
@@ -26669,7 +26666,7 @@ public function callAsync(string $call, array $params = array())
2666926666
}
2667026667
$operation = new Operation\Scim\SetInformationForProvisionedUser($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Scim\V2\Organizations\CbOrgRcb\Users\CbScimUserIdRcb::class], $arguments['org'], $arguments['scim_user_id']);
2667126668
$request = $operation->createRequest($params);
26672-
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : \ApiClients\Client\GitHubEnterpriseCloud\Schema\ScimUser {
26669+
return $this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(function (\Psr\Http\Message\ResponseInterface $response) use($operation) : mixed {
2667326670
return $operation->createResponse($response);
2667426671
});
2667526672
}

src/Hydrator/Operation/Enterprises/CbEnterpriseRcb/Actions/RunnerDashGroups/CbRunnerGroupIdRcb/Runners.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
100100

101101
after_id:
102102

103+
$value = $payload['runner_group_id'] ?? null;
104+
105+
if ($value === null) {
106+
$properties['runnerGroupId'] = null;
107+
goto after_runnerGroupId;
108+
}
109+
110+
$properties['runnerGroupId'] = $value;
111+
112+
after_runnerGroupId:
113+
103114
$value = $payload['name'] ?? null;
104115

105116
if ($value === null) {
@@ -376,6 +387,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
376387
after_id: $result['id'] = $id;
377388

378389

390+
$runnerGroupId = $object->runnerGroupId;
391+
392+
if ($runnerGroupId === null) {
393+
goto after_runnerGroupId;
394+
}
395+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
396+
397+
379398
$name = $object->name;
380399
after_name: $result['name'] = $name;
381400

src/Hydrator/Operation/Enterprises/CbEnterpriseRcb/Actions/Runners.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
100100

101101
after_id:
102102

103+
$value = $payload['runner_group_id'] ?? null;
104+
105+
if ($value === null) {
106+
$properties['runnerGroupId'] = null;
107+
goto after_runnerGroupId;
108+
}
109+
110+
$properties['runnerGroupId'] = $value;
111+
112+
after_runnerGroupId:
113+
103114
$value = $payload['name'] ?? null;
104115

105116
if ($value === null) {
@@ -384,6 +395,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
384395
after_id: $result['id'] = $id;
385396

386397

398+
$runnerGroupId = $object->runnerGroupId;
399+
400+
if ($runnerGroupId === null) {
401+
goto after_runnerGroupId;
402+
}
403+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
404+
405+
387406
$name = $object->name;
388407
after_name: $result['name'] = $name;
389408

src/Hydrator/Operation/Enterprises/CbEnterpriseRcb/Actions/Runners/CbRunnerIdRcb.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
4646

4747
after_id:
4848

49+
$value = $payload['runner_group_id'] ?? null;
50+
51+
if ($value === null) {
52+
$properties['runnerGroupId'] = null;
53+
goto after_runnerGroupId;
54+
}
55+
56+
$properties['runnerGroupId'] = $value;
57+
58+
after_runnerGroupId:
59+
4960
$value = $payload['name'] ?? null;
5061

5162
if ($value === null) {
@@ -295,6 +306,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
295306
after_id: $result['id'] = $id;
296307

297308

309+
$runnerGroupId = $object->runnerGroupId;
310+
311+
if ($runnerGroupId === null) {
312+
goto after_runnerGroupId;
313+
}
314+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
315+
316+
298317
$name = $object->name;
299318
after_name: $result['name'] = $name;
300319

src/Hydrator/Operation/Enterprises/CbEnterpriseRcb/Dependabot/Alerts.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
237237

238238
after_fixedAt:
239239

240+
$value = $payload['auto_dismissed_at'] ?? null;
241+
242+
if ($value === null) {
243+
$properties['autoDismissedAt'] = null;
244+
goto after_autoDismissedAt;
245+
}
246+
247+
$properties['autoDismissedAt'] = $value;
248+
249+
after_autoDismissedAt:
250+
240251
$value = $payload['repository'] ?? null;
241252

242253
if ($value === null) {
@@ -1977,6 +1988,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
19771988
after_fixedAt: $result['fixed_at'] = $fixedAt;
19781989

19791990

1991+
$autoDismissedAt = $object->autoDismissedAt;
1992+
1993+
if ($autoDismissedAt === null) {
1994+
goto after_autoDismissedAt;
1995+
}
1996+
after_autoDismissedAt: $result['auto_dismissed_at'] = $autoDismissedAt;
1997+
1998+
19801999
$repository = $object->repository;
19812000
$repository = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️SimpleRepository($repository);
19822001
after_repository: $result['repository'] = $repository;

src/Hydrator/Operation/Orgs/CbOrgRcb/Actions/RunnerDashGroups/CbRunnerGroupIdRcb/Runners.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
100100

101101
after_id:
102102

103+
$value = $payload['runner_group_id'] ?? null;
104+
105+
if ($value === null) {
106+
$properties['runnerGroupId'] = null;
107+
goto after_runnerGroupId;
108+
}
109+
110+
$properties['runnerGroupId'] = $value;
111+
112+
after_runnerGroupId:
113+
103114
$value = $payload['name'] ?? null;
104115

105116
if ($value === null) {
@@ -376,6 +387,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
376387
after_id: $result['id'] = $id;
377388

378389

390+
$runnerGroupId = $object->runnerGroupId;
391+
392+
if ($runnerGroupId === null) {
393+
goto after_runnerGroupId;
394+
}
395+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
396+
397+
379398
$name = $object->name;
380399
after_name: $result['name'] = $name;
381400

src/Hydrator/Operation/Orgs/CbOrgRcb/Actions/Runners.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
100100

101101
after_id:
102102

103+
$value = $payload['runner_group_id'] ?? null;
104+
105+
if ($value === null) {
106+
$properties['runnerGroupId'] = null;
107+
goto after_runnerGroupId;
108+
}
109+
110+
$properties['runnerGroupId'] = $value;
111+
112+
after_runnerGroupId:
113+
103114
$value = $payload['name'] ?? null;
104115

105116
if ($value === null) {
@@ -376,6 +387,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
376387
after_id: $result['id'] = $id;
377388

378389

390+
$runnerGroupId = $object->runnerGroupId;
391+
392+
if ($runnerGroupId === null) {
393+
goto after_runnerGroupId;
394+
}
395+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
396+
397+
379398
$name = $object->name;
380399
after_name: $result['name'] = $name;
381400

src/Hydrator/Operation/Orgs/CbOrgRcb/Actions/Runners/CbRunnerIdRcb.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
4646

4747
after_id:
4848

49+
$value = $payload['runner_group_id'] ?? null;
50+
51+
if ($value === null) {
52+
$properties['runnerGroupId'] = null;
53+
goto after_runnerGroupId;
54+
}
55+
56+
$properties['runnerGroupId'] = $value;
57+
58+
after_runnerGroupId:
59+
4960
$value = $payload['name'] ?? null;
5061

5162
if ($value === null) {
@@ -295,6 +306,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
295306
after_id: $result['id'] = $id;
296307

297308

309+
$runnerGroupId = $object->runnerGroupId;
310+
311+
if ($runnerGroupId === null) {
312+
goto after_runnerGroupId;
313+
}
314+
after_runnerGroupId: $result['runner_group_id'] = $runnerGroupId;
315+
316+
298317
$name = $object->name;
299318
after_name: $result['name'] = $name;
300319

0 commit comments

Comments
 (0)