Skip to content

Commit

Permalink
Fix duplicated use stmt in generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dmetzner committed Jun 3, 2022
1 parent 129a55b commit 3ab472c
Show file tree
Hide file tree
Showing 67 changed files with 10,207 additions and 9,467 deletions.
42 changes: 0 additions & 42 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -107,50 +107,8 @@ Service/StrictJsonDeserializationVisitorFactory.php
Service/SymfonyValidator.php
Service/TypeMismatchException.php
Service/ValidatorInterface.php
Tests/Api/AuthenticationApiInterfaceTest.php
Tests/Api/MediaLibraryApiInterfaceTest.php
Tests/Api/NotificationsApiInterfaceTest.php
Tests/Api/ProjectsApiInterfaceTest.php
Tests/Api/SearchApiInterfaceTest.php
Tests/Api/UserApiInterfaceTest.php
Tests/Api/UtilityApiInterfaceTest.php
Tests/AppKernel.php
Tests/Controller/ControllerTest.php
Tests/Model/BaseUserTest.php
Tests/Model/BasicUserDataResponseTest.php
Tests/Model/DryRunTest.php
Tests/Model/ExtendedUserDataResponseAllOfTest.php
Tests/Model/ExtendedUserDataResponseTest.php
Tests/Model/ExtensionResponseTest.php
Tests/Model/FeaturedProjectResponseTest.php
Tests/Model/JWTResponseTest.php
Tests/Model/LoginRequestTest.php
Tests/Model/MediaCategoryResponseTest.php
Tests/Model/MediaFileResponseTest.php
Tests/Model/MediaPackageResponseTest.php
Tests/Model/NotificationContentTest.php
Tests/Model/NotificationResponseTest.php
Tests/Model/NotificationsCountResponseTest.php
Tests/Model/OAuthLoginRequestTest.php
Tests/Model/ProjectReportRequestTest.php
Tests/Model/ProjectResponseTest.php
Tests/Model/ProjectsCategoryTest.php
Tests/Model/RefreshRequestTest.php
Tests/Model/RegisterErrorResponseTest.php
Tests/Model/RegisterRequestTest.php
Tests/Model/ResetPasswordErrorResponseTest.php
Tests/Model/ResetPasswordRequestTest.php
Tests/Model/SearchResponseTest.php
Tests/Model/SurveyResponseTest.php
Tests/Model/TagResponseTest.php
Tests/Model/UpdateProjectErrorResponseTest.php
Tests/Model/UpdateProjectFailureResponseTest.php
Tests/Model/UpdateProjectRequestTest.php
Tests/Model/UpdateUserErrorResponseTest.php
Tests/Model/UpdateUserRequestAllOfTest.php
Tests/Model/UpdateUserRequestTest.php
Tests/Model/UpgradeTokenRequestTest.php
Tests/Model/UploadErrorResponseTest.php
Tests/test_config.yml
autoload.php
git_push.sh
Expand Down
81 changes: 42 additions & 39 deletions Api/ApiServer.php
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
*
*/

/**
Expand All @@ -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];
}
}
186 changes: 103 additions & 83 deletions Api/AuthenticationApiInterface.php
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
*
*/

/**
Expand All @@ -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;

}
Loading

0 comments on commit 3ab472c

Please sign in to comment.