Skip to content

Commit 6f77fe3

Browse files
committed
Improve testing and content type detection and handling
1 parent 054df14 commit 6f77fe3

File tree

1,207 files changed

+15844
-10699
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,207 files changed

+15844
-10699
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: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4096,7 +4096,7 @@ public function callAsync(string $call, array $params = array())
40964096
}
40974097
$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']);
40984098
$request = $operation->createRequest($params);
4099-
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\GitHubAE\Schema\ContentTree|\ApiClients\Client\GitHubAE\Schema\Operation\Repos\GetContent\Response\Applicationjson\H200 {
4099+
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\GitHubAE\Schema\Operation\Repos\GetContent\Response\Applicationjson\H200 {
41004100
return $operation->createResponse($response);
41014101
});
41024102
}
@@ -5150,12 +5150,9 @@ public function callAsync(string $call, array $params = array())
51505150
}
51515151
$arguments['s'] = $params['s'];
51525152
unset($params['s']);
5153-
if (\array_key_exists(Hydrator\Operation\Octocat::class, $this->hydrator) == false) {
5154-
$this->hydrator[Hydrator\Operation\Octocat::class] = $this->hydrators->getObjectMapperOperation🌀Octocat();
5155-
}
5156-
$operation = new Operation\Meta\GetOctocat($this->responseSchemaValidator, $this->hydrator[Hydrator\Operation\Octocat::class], $arguments['s']);
5153+
$operation = new Operation\Meta\GetOctocat($arguments['s']);
51575154
$request = $operation->createRequest($params);
5158-
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\GitHubAE\Schema\Operation\Meta\GetOctocat\Response\ApplicationoctocatStream\H200 {
5155+
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 {
51595156
return $operation->createResponse($response);
51605157
});
51615158
}
@@ -7880,7 +7877,7 @@ public function callAsync(string $call, array $params = array())
78807877
}
78817878
$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']);
78827879
$request = $operation->createRequest($params);
7883-
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\GitHubAE\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHubAE\Schema\Operation\CodeScanning\GetAnalysis\Response\ApplicationjsonPlusSarif\H200 {
7880+
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\GitHubAE\Schema\CodeScanningAnalysis {
78847881
return $operation->createResponse($response);
78857882
});
78867883
}

src/Error/ScimError.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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/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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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/Repos/CbOwnerRcb/CbRepoRcb/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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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/Repos/CbOwnerRcb/CbRepoRcb/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⚡️GitHubAE⚡️Schema⚡️Ru
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⚡️GitHubAE⚡️Schema
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)