diff --git a/config.yaml b/config.yaml index 5b0247d..d519245 100644 --- a/config.yaml +++ b/config.yaml @@ -1,5 +1,5 @@ invokerPackage: Aternos\HangarApi -artifactVersion: 3.1.0 +artifactVersion: 3.1.1 generatorName: php outputDir: . sourceFolder: src diff --git a/lib/Api/APIKeysApi.php b/lib/Api/APIKeysApi.php index b8456b8..4754160 100644 --- a/lib/Api/APIKeysApi.php +++ b/lib/Api/APIKeysApi.php @@ -198,7 +198,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType } switch($statusCode) { - case 403: + case 201: if ('string' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -225,7 +225,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType $response->getStatusCode(), $response->getHeaders() ]; - case 401: + case 403: if ('string' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -252,7 +252,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType $response->getStatusCode(), $response->getHeaders() ]; - case 201: + case 401: if ('string' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -311,7 +311,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType } catch (ApiException $e) { switch ($e->getCode()) { - case 403: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'string', @@ -319,7 +319,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType ); $e->setResponseObject($data); break; - case 401: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'string', @@ -327,7 +327,7 @@ public function createKeyWithHttpInfo($create_api_key_form, string $contentType ); $e->setResponseObject($data); break; - case 201: + case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), 'string', @@ -751,7 +751,7 @@ public function deleteKeyRequest($name, string $contentType = self::contentTypes * * @throws \Aternos\HangarApi\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \Aternos\HangarApi\Model\ApiKey|\Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey[] + * @return \Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey */ public function getKeys(string $contentType = self::contentTypes['getKeys'][0]) { @@ -768,7 +768,7 @@ public function getKeys(string $contentType = self::contentTypes['getKeys'][0]) * * @throws \Aternos\HangarApi\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \Aternos\HangarApi\Model\ApiKey|\Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey[], HTTP status code, HTTP response headers (array of strings) + * @return array of \Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey[]|\Aternos\HangarApi\Model\ApiKey, HTTP status code, HTTP response headers (array of strings) */ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['getKeys'][0]) { @@ -810,12 +810,12 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge } switch($statusCode) { - case 200: - if ('\Aternos\HangarApi\Model\ApiKey' === '\SplFileObject') { + case 403: + if ('\Aternos\HangarApi\Model\ApiKey[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Aternos\HangarApi\Model\ApiKey' !== 'string') { + if ('\Aternos\HangarApi\Model\ApiKey[]' !== 'string') { try { $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); } catch (\JsonException $exception) { @@ -833,11 +833,11 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge } return [ - ObjectSerializer::deserialize($content, '\Aternos\HangarApi\Model\ApiKey', []), + ObjectSerializer::deserialize($content, '\Aternos\HangarApi\Model\ApiKey[]', []), $response->getStatusCode(), $response->getHeaders() ]; - case 403: + case 401: if ('\Aternos\HangarApi\Model\ApiKey[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -864,12 +864,12 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge $response->getStatusCode(), $response->getHeaders() ]; - case 401: - if ('\Aternos\HangarApi\Model\ApiKey[]' === '\SplFileObject') { + case 200: + if ('\Aternos\HangarApi\Model\ApiKey' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('\Aternos\HangarApi\Model\ApiKey[]' !== 'string') { + if ('\Aternos\HangarApi\Model\ApiKey' !== 'string') { try { $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); } catch (\JsonException $exception) { @@ -887,7 +887,7 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge } return [ - ObjectSerializer::deserialize($content, '\Aternos\HangarApi\Model\ApiKey[]', []), + ObjectSerializer::deserialize($content, '\Aternos\HangarApi\Model\ApiKey', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -923,15 +923,15 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Aternos\HangarApi\Model\ApiKey', + '\Aternos\HangarApi\Model\ApiKey[]', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 403: + case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Aternos\HangarApi\Model\ApiKey[]', @@ -939,10 +939,10 @@ public function getKeysWithHttpInfo(string $contentType = self::contentTypes['ge ); $e->setResponseObject($data); break; - case 401: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Aternos\HangarApi\Model\ApiKey[]', + '\Aternos\HangarApi\Model\ApiKey', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/lib/Client/List/ProjectMemberList.php b/lib/Client/List/ProjectMemberList.php index 25f9a7c..c6e0235 100644 --- a/lib/Client/List/ProjectMemberList.php +++ b/lib/Client/List/ProjectMemberList.php @@ -5,6 +5,7 @@ use Aternos\HangarApi\ApiException; use Aternos\HangarApi\Client\HangarAPIClient; use Aternos\HangarApi\Model\PaginatedResultProjectMember; +use Aternos\HangarApi\Model\ProjectMember; use Aternos\HangarApi\Model\RequestPagination; /** @@ -12,6 +13,7 @@ * * @package Aternos\HangarApi\Client\List * @description A paginated list of project members + * @extends ResultList */ class ProjectMemberList extends ResultList { diff --git a/lib/Configuration.php b/lib/Configuration.php index db2386b..092739e 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -100,7 +100,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/3.1.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/3.1.1/PHP'; /** * Debug switch (default set to false) @@ -433,7 +433,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 1.0' . PHP_EOL; - $report .= ' SDK Package Version: 3.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 3.1.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report;