Skip to content

Commit 3c3f4d0

Browse files
committed
Rerun generator
1 parent e583834 commit 3c3f4d0

File tree

79 files changed

+719
-681
lines changed

Some content is hidden

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

79 files changed

+719
-681
lines changed

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
invokerPackage: Aternos\CurseForgeApi
2-
artifactVersion: 1.2.2
2+
artifactVersion: 1.3.1
33
generatorName: php
44
outputDir: .
55
sourceFolder: src

lib/Api/CategoriesApi.php

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: 1.0.0
1818
* Generated by: https://openapi-generator.tech
19-
* Generator version: 7.7.0
19+
* Generator version: 7.11.0
2020
*/
2121

2222
/**
@@ -83,13 +83,13 @@ class CategoriesApi
8383
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
8484
*/
8585
public function __construct(
86-
ClientInterface $client = null,
87-
Configuration $config = null,
88-
HeaderSelector $selector = null,
89-
$hostIndex = 0
86+
?ClientInterface $client = null,
87+
?Configuration $config = null,
88+
?HeaderSelector $selector = null,
89+
int $hostIndex = 0
9090
) {
9191
$this->client = $client ?: new Client();
92-
$this->config = $config ?: new Configuration();
92+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9393
$this->headerSelector = $selector ?: new HeaderSelector();
9494
$this->hostIndex = $hostIndex;
9595
}
@@ -128,8 +128,8 @@ public function getConfig()
128128
* Get categories
129129
*
130130
* @param int $game_id A game unique id (required)
131-
* @param int $class_id A class unique id (optional)
132-
* @param bool $classes_only A flag used to only return classes (optional)
131+
* @param int|null $class_id A class unique id (optional)
132+
* @param bool|null $classes_only A flag used to only return classes (optional)
133133
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCategories'] to see the possible values for this operation
134134
*
135135
* @throws \Aternos\CurseForgeApi\ApiException on non-2xx response or if the response body is not in the expected format
@@ -148,8 +148,8 @@ public function getCategories($game_id, $class_id = null, $classes_only = null,
148148
* Get categories
149149
*
150150
* @param int $game_id A game unique id (required)
151-
* @param int $class_id A class unique id (optional)
152-
* @param bool $classes_only A flag used to only return classes (optional)
151+
* @param int|null $class_id A class unique id (optional)
152+
* @param bool|null $classes_only A flag used to only return classes (optional)
153153
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCategories'] to see the possible values for this operation
154154
*
155155
* @throws \Aternos\CurseForgeApi\ApiException on non-2xx response or if the response body is not in the expected format
@@ -182,18 +182,6 @@ public function getCategoriesWithHttpInfo($game_id, $class_id = null, $classes_o
182182

183183
$statusCode = $response->getStatusCode();
184184

185-
if ($statusCode < 200 || $statusCode > 299) {
186-
throw new ApiException(
187-
sprintf(
188-
'[%d] Error connecting to the API (%s)',
189-
$statusCode,
190-
(string) $request->getUri()
191-
),
192-
$statusCode,
193-
$response->getHeaders(),
194-
(string) $response->getBody()
195-
);
196-
}
197185

198186
switch($statusCode) {
199187
case 200:
@@ -225,6 +213,19 @@ public function getCategoriesWithHttpInfo($game_id, $class_id = null, $classes_o
225213
];
226214
}
227215

216+
if ($statusCode < 200 || $statusCode > 299) {
217+
throw new ApiException(
218+
sprintf(
219+
'[%d] Error connecting to the API (%s)',
220+
$statusCode,
221+
(string) $request->getUri()
222+
),
223+
$statusCode,
224+
$response->getHeaders(),
225+
(string) $response->getBody()
226+
);
227+
}
228+
228229
$returnType = '\Aternos\CurseForgeApi\Model\GetCategoriesResponse';
229230
if ($returnType === '\SplFileObject') {
230231
$content = $response->getBody(); //stream goes to serializer
@@ -274,8 +275,8 @@ public function getCategoriesWithHttpInfo($game_id, $class_id = null, $classes_o
274275
* Get categories
275276
*
276277
* @param int $game_id A game unique id (required)
277-
* @param int $class_id A class unique id (optional)
278-
* @param bool $classes_only A flag used to only return classes (optional)
278+
* @param int|null $class_id A class unique id (optional)
279+
* @param bool|null $classes_only A flag used to only return classes (optional)
279280
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCategories'] to see the possible values for this operation
280281
*
281282
* @throws \InvalidArgumentException
@@ -297,8 +298,8 @@ function ($response) {
297298
* Get categories
298299
*
299300
* @param int $game_id A game unique id (required)
300-
* @param int $class_id A class unique id (optional)
301-
* @param bool $classes_only A flag used to only return classes (optional)
301+
* @param int|null $class_id A class unique id (optional)
302+
* @param bool|null $classes_only A flag used to only return classes (optional)
302303
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCategories'] to see the possible values for this operation
303304
*
304305
* @throws \InvalidArgumentException
@@ -349,8 +350,8 @@ function ($exception) {
349350
* Create request for operation 'getCategories'
350351
*
351352
* @param int $game_id A game unique id (required)
352-
* @param int $class_id A class unique id (optional)
353-
* @param bool $classes_only A flag used to only return classes (optional)
353+
* @param int|null $class_id A class unique id (optional)
354+
* @param bool|null $classes_only A flag used to only return classes (optional)
354355
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCategories'] to see the possible values for this operation
355356
*
356357
* @throws \InvalidArgumentException

0 commit comments

Comments
 (0)