-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duplicated use stmt in generator
- Loading branch information
Showing
67 changed files
with
10,207 additions
and
9,467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
/** | ||
* ApiServer. | ||
* ApiServer | ||
* | ||
* PHP version 8.1.1 | ||
* | ||
* @category Class | ||
* | ||
* @package OpenAPI\Server\Api | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
|
||
/** | ||
* Catroweb API. | ||
* Catroweb API | ||
* | ||
* API for the Catrobat Share Platform | ||
* | ||
* The version of the OpenAPI document: v1.1.2 | ||
* The version of the OpenAPI document: v1.1.3 | ||
* Contact: [email protected] | ||
* Generated by: https://github.com/openapitools/openapi-generator.git | ||
* | ||
*/ | ||
|
||
/** | ||
|
@@ -29,51 +29,54 @@ | |
|
||
namespace OpenAPI\Server\Api; | ||
|
||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
/** | ||
* ApiServer Class Doc Comment. | ||
* ApiServer Class Doc Comment | ||
* | ||
* PHP version 8.1.1 | ||
* | ||
* @category Class | ||
* | ||
* @package OpenAPI\Server\Api | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
class ApiServer | ||
{ | ||
private array $apis = []; | ||
|
||
/** | ||
* Adds an API handler to the server. | ||
* | ||
* @param string $api An API name of the handle | ||
* @param mixed $handler A handler to set for the given API | ||
*/ | ||
public function addApiHandler(string $api, $handler): void | ||
{ | ||
if (isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('API has already a handler: '.$api); | ||
} | ||
/** | ||
* @var array | ||
*/ | ||
private array $apis = array(); | ||
|
||
$this->apis[$api] = $handler; | ||
} | ||
/** | ||
* Adds an API handler to the server. | ||
* | ||
* @param string $api An API name of the handle | ||
* @param mixed $handler A handler to set for the given API | ||
*/ | ||
public function addApiHandler(string $api, $handler): void | ||
{ | ||
if (isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('API has already a handler: '.$api); | ||
} | ||
|
||
/** | ||
* Returns an API handler. | ||
* | ||
* @param string $api An API name of the handle | ||
* | ||
* @throws \InvalidArgumentException When no such handler exists | ||
* | ||
* @return mixed Returns a handler | ||
*/ | ||
public function getApiHandler(string $api) | ||
{ | ||
if (!isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('No handler for '.$api.' implemented.'); | ||
$this->apis[$api] = $handler; | ||
} | ||
|
||
return $this->apis[$api]; | ||
} | ||
/** | ||
* Returns an API handler. | ||
* | ||
* @param string $api An API name of the handle | ||
* @return mixed Returns a handler | ||
* @throws \InvalidArgumentException When no such handler exists | ||
*/ | ||
public function getApiHandler(string $api) | ||
{ | ||
if (!isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('No handler for '.$api.' implemented.'); | ||
} | ||
|
||
return $this->apis[$api]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
/** | ||
* AuthenticationApiInterface. | ||
* AuthenticationApiInterface | ||
* | ||
* PHP version 8.1.1 | ||
* | ||
* @category Class | ||
* | ||
* @package OpenAPI\Server | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
|
||
/** | ||
* Catroweb API. | ||
* Catroweb API | ||
* | ||
* API for the Catrobat Share Platform | ||
* | ||
* The version of the OpenAPI document: v1.1.2 | ||
* The version of the OpenAPI document: v1.1.3 | ||
* Contact: [email protected] | ||
* Generated by: https://github.com/openapitools/openapi-generator.git | ||
* | ||
*/ | ||
|
||
/** | ||
|
@@ -29,93 +29,113 @@ | |
|
||
namespace OpenAPI\Server\Api; | ||
|
||
use Symfony\Component\HttpFoundation\File\UploadedFile; | ||
use OpenAPI\Server\Model\JWTResponse; | ||
use OpenAPI\Server\Model\LoginRequest; | ||
use OpenAPI\Server\Model\OAuthLoginRequest; | ||
use OpenAPI\Server\Model\RefreshRequest; | ||
use OpenAPI\Server\Model\UpgradeTokenRequest; | ||
|
||
/** | ||
* AuthenticationApiInterface Interface Doc Comment. | ||
* AuthenticationApiInterface Interface Doc Comment | ||
* | ||
* @category Interface | ||
* | ||
* @package OpenAPI\Server\Api | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
interface AuthenticationApiInterface | ||
{ | ||
/** | ||
* Sets authentication method PandaAuth. | ||
* | ||
* @param string $value value of the PandaAuth authentication method | ||
*/ | ||
public function setPandaAuth($value); | ||
|
||
/** | ||
* Operation authenticationDelete. | ||
* | ||
* Expires refresh token | ||
* | ||
* @param string $x_refresh Refresh Token (required) | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
*/ | ||
public function authenticationDelete(string $x_refresh, int &$responseCode, array &$responseHeaders): void; | ||
|
||
/** | ||
* Operation authenticationGet. | ||
* | ||
* Check token | ||
* | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
*/ | ||
public function authenticationGet(int &$responseCode, array &$responseHeaders): void; | ||
|
||
/** | ||
* Operation authenticationOauthPost. | ||
* | ||
* OAuth Login | ||
* | ||
* @param OAuthLoginRequest $o_auth_login_request (required) | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationOauthPost(OAuthLoginRequest $o_auth_login_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
/** | ||
* Operation authenticationPost. | ||
* | ||
* Login | ||
* | ||
* @param LoginRequest $login_request (required) | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationPost(LoginRequest $login_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
/** | ||
* Operation authenticationRefreshPost. | ||
* | ||
* Refresh token | ||
* | ||
* @param RefreshRequest $refresh_request (required) | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationRefreshPost(RefreshRequest $refresh_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
/** | ||
* Operation authenticationUpgradePost. | ||
* | ||
* Upgrade a deprecated token to JWT | ||
* | ||
* @param UpgradeTokenRequest $upgrade_token_request (required) | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationUpgradePost(UpgradeTokenRequest $upgrade_token_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
/** | ||
* Sets authentication method PandaAuth | ||
* | ||
* @param string $value Value of the PandaAuth authentication method. | ||
* | ||
* @return void | ||
*/ | ||
public function setPandaAuth($value); | ||
|
||
/** | ||
* Operation authenticationDelete | ||
* | ||
* Expires refresh token | ||
* | ||
* @param string $x_refresh Refresh Token (required) | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return void | ||
*/ | ||
public function authenticationDelete(string $x_refresh, int &$responseCode, array &$responseHeaders): void; | ||
|
||
|
||
/** | ||
* Operation authenticationGet | ||
* | ||
* Check token | ||
* | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return void | ||
*/ | ||
public function authenticationGet(int &$responseCode, array &$responseHeaders): void; | ||
|
||
|
||
/** | ||
* Operation authenticationOauthPost | ||
* | ||
* OAuth Login | ||
* | ||
* @param OAuthLoginRequest $o_auth_login_request (required) | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationOauthPost(OAuthLoginRequest $o_auth_login_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
|
||
/** | ||
* Operation authenticationPost | ||
* | ||
* Login | ||
* | ||
* @param LoginRequest $login_request (required) | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationPost(LoginRequest $login_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
|
||
/** | ||
* Operation authenticationRefreshPost | ||
* | ||
* Refresh token | ||
* | ||
* @param RefreshRequest $refresh_request (required) | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationRefreshPost(RefreshRequest $refresh_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
|
||
/** | ||
* Operation authenticationUpgradePost | ||
* | ||
* Upgrade a deprecated token to JWT | ||
* | ||
* @param UpgradeTokenRequest $upgrade_token_request (required) | ||
* @param int $responseCode | ||
* @param array $responseHeaders Additional HTTP headers to return with the response () | ||
* | ||
* @return ?object | ||
*/ | ||
public function authenticationUpgradePost(UpgradeTokenRequest $upgrade_token_request, int &$responseCode, array &$responseHeaders): ?object; | ||
|
||
} |
Oops, something went wrong.