From 9dc3d7fdc827434db2a87ad1649e4641c75bef10 Mon Sep 17 00:00:00 2001 From: dmetzner Date: Fri, 30 Aug 2024 18:56:46 +0000 Subject: [PATCH] Automated Code Generation --- .openapi-generator/FILES | 13 + Api/ApiServer.php | 2 +- Api/AuthenticationApiInterface.php | 2 +- Api/MediaLibraryApiInterface.php | 2 +- Api/NotificationsApiInterface.php | 2 +- Api/ProjectsApiInterface.php | 2 +- Api/SearchApiInterface.php | 2 +- Api/StudioApiInterface.php | 103 ++++++ Api/UserApiInterface.php | 2 +- Api/UtilityApiInterface.php | 2 +- Controller/AuthenticationController.php | 2 +- Controller/Controller.php | 4 +- Controller/MediaLibraryController.php | 2 +- Controller/NotificationsController.php | 2 +- Controller/ProjectsController.php | 2 +- Controller/SearchController.php | 2 +- Controller/StudioController.php | 311 ++++++++++++++++++ Controller/UserController.php | 2 +- Controller/UtilityController.php | 2 +- .../Compiler/OpenAPIServerApiPass.php | 2 +- .../OpenAPIServerExtension.php | 2 +- Model/BaseUser.php | 51 ++- Model/BasicUserDataResponse.php | 75 +++-- Model/CreateStudioErrorResponse.php | 149 +++++++++ Model/DryRun.php | 15 +- Model/ExtendedUserDataResponse.php | 83 +++-- Model/ExtensionResponse.php | 19 +- Model/FeaturedProjectResponse.php | 66 +++- Model/JWTResponse.php | 21 +- Model/LoginRequest.php | 37 ++- Model/MediaCategoryResponse.php | 30 +- Model/MediaFileResponse.php | 109 ++++-- Model/MediaPackageResponse.php | 44 ++- Model/NotificationContent.php | 84 +++-- Model/NotificationResponse.php | 43 ++- Model/NotificationsCountResponse.php | 48 ++- Model/OAuthLoginRequest.php | 19 +- Model/ProjectReportRequest.php | 15 +- Model/ProjectResponse.php | 191 ++++++++--- Model/ProjectsCategory.php | 76 ++++- Model/RefreshRequest.php | 12 +- Model/RegisterErrorResponse.php | 39 ++- Model/RegisterRequest.php | 63 +++- Model/ResetPasswordErrorResponse.php | 15 +- Model/ResetPasswordRequest.php | 11 +- Model/SearchResponse.php | 55 ++-- Model/StudioResponse.php | 257 +++++++++++++++ Model/SurveyResponse.php | 11 +- Model/TagResponse.php | 19 +- Model/UpdateProjectErrorResponse.php | 51 ++- Model/UpdateProjectFailureResponse.php | 15 +- Model/UpdateProjectRequest.php | 43 ++- Model/UpdateStudioErrorResponse.php | 149 +++++++++ Model/UpdateUserErrorResponse.php | 63 +++- Model/UpdateUserRequest.php | 71 ++-- Model/UpgradeTokenRequest.php | 12 +- Model/UploadErrorResponse.php | 12 +- OpenAPIServerBundle.php | 2 +- README.md | 7 +- Resources/config/routing.yaml | 15 + Resources/config/services.yaml | 9 + Tests/Api/AuthenticationApiInterfaceTest.php | 2 +- Tests/Api/MediaLibraryApiInterfaceTest.php | 2 +- Tests/Api/NotificationsApiInterfaceTest.php | 2 +- Tests/Api/ProjectsApiInterfaceTest.php | 16 +- Tests/Api/SearchApiInterfaceTest.php | 2 +- Tests/Api/StudioApiInterfaceTest.php | 125 +++++++ Tests/Api/UserApiInterfaceTest.php | 4 +- Tests/Api/UtilityApiInterfaceTest.php | 2 +- Tests/Controller/ControllerTest.php | 2 +- Tests/Model/BaseUserTest.php | 2 +- Tests/Model/BasicUserDataResponseTest.php | 2 +- Tests/Model/CreateStudioErrorResponseTest.php | 130 ++++++++ Tests/Model/DryRunTest.php | 2 +- Tests/Model/ExtendedUserDataResponseTest.php | 2 +- Tests/Model/ExtensionResponseTest.php | 2 +- Tests/Model/FeaturedProjectResponseTest.php | 2 +- Tests/Model/JWTResponseTest.php | 2 +- Tests/Model/LoginRequestTest.php | 2 +- Tests/Model/MediaCategoryResponseTest.php | 2 +- Tests/Model/MediaFileResponseTest.php | 2 +- Tests/Model/MediaPackageResponseTest.php | 2 +- Tests/Model/NotificationContentTest.php | 2 +- Tests/Model/NotificationResponseTest.php | 2 +- .../Model/NotificationsCountResponseTest.php | 2 +- Tests/Model/OAuthLoginRequestTest.php | 2 +- Tests/Model/ProjectReportRequestTest.php | 2 +- Tests/Model/ProjectResponseTest.php | 2 +- Tests/Model/ProjectsCategoryTest.php | 14 +- Tests/Model/RefreshRequestTest.php | 2 +- Tests/Model/RegisterErrorResponseTest.php | 2 +- Tests/Model/RegisterRequestTest.php | 2 +- .../Model/ResetPasswordErrorResponseTest.php | 2 +- Tests/Model/ResetPasswordRequestTest.php | 2 +- Tests/Model/SearchResponseTest.php | 2 +- Tests/Model/StudioResponseTest.php | 166 ++++++++++ Tests/Model/SurveyResponseTest.php | 2 +- Tests/Model/TagResponseTest.php | 2 +- .../Model/UpdateProjectErrorResponseTest.php | 2 +- .../UpdateProjectFailureResponseTest.php | 2 +- Tests/Model/UpdateProjectRequestTest.php | 2 +- Tests/Model/UpdateStudioErrorResponseTest.php | 130 ++++++++ Tests/Model/UpdateUserErrorResponseTest.php | 2 +- Tests/Model/UpdateUserRequestTest.php | 2 +- Tests/Model/UpgradeTokenRequestTest.php | 2 +- Tests/Model/UploadErrorResponseTest.php | 2 +- autoload.php | 4 +- docs/Api/StudioApiInterface.md | 136 ++++++++ docs/Model/CreateStudioErrorResponse.md | 12 + docs/Model/DryRun.md | 2 +- docs/Model/ProjectsCategory.md | 1 + docs/Model/RegisterRequest.md | 2 +- docs/Model/StudioResponse.md | 15 + docs/Model/UpdateStudioErrorResponse.md | 12 + docs/Model/UpdateUserRequest.md | 2 +- package.json | 2 +- 116 files changed, 2938 insertions(+), 482 deletions(-) create mode 100755 Api/StudioApiInterface.php create mode 100755 Controller/StudioController.php create mode 100755 Model/CreateStudioErrorResponse.php create mode 100755 Model/StudioResponse.php create mode 100755 Model/UpdateStudioErrorResponse.php create mode 100755 Tests/Api/StudioApiInterfaceTest.php create mode 100755 Tests/Model/CreateStudioErrorResponseTest.php create mode 100755 Tests/Model/StudioResponseTest.php create mode 100755 Tests/Model/UpdateStudioErrorResponseTest.php create mode 100755 docs/Api/StudioApiInterface.md create mode 100755 docs/Model/CreateStudioErrorResponse.md create mode 100755 docs/Model/StudioResponse.md create mode 100755 docs/Model/UpdateStudioErrorResponse.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fa163201..125c83ea 100755 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,7 @@ Api/MediaLibraryApiInterface.php Api/NotificationsApiInterface.php Api/ProjectsApiInterface.php Api/SearchApiInterface.php +Api/StudioApiInterface.php Api/UserApiInterface.php Api/UtilityApiInterface.php Controller/AuthenticationController.php @@ -15,12 +16,14 @@ Controller/MediaLibraryController.php Controller/NotificationsController.php Controller/ProjectsController.php Controller/SearchController.php +Controller/StudioController.php Controller/UserController.php Controller/UtilityController.php DependencyInjection/Compiler/OpenAPIServerApiPass.php DependencyInjection/OpenAPIServerExtension.php Model/BaseUser.php Model/BasicUserDataResponse.php +Model/CreateStudioErrorResponse.php Model/DryRun.php Model/ExtendedUserDataResponse.php Model/ExtensionResponse.php @@ -43,11 +46,13 @@ Model/RegisterRequest.php Model/ResetPasswordErrorResponse.php Model/ResetPasswordRequest.php Model/SearchResponse.php +Model/StudioResponse.php Model/SurveyResponse.php Model/TagResponse.php Model/UpdateProjectErrorResponse.php Model/UpdateProjectFailureResponse.php Model/UpdateProjectRequest.php +Model/UpdateStudioErrorResponse.php Model/UpdateUserErrorResponse.php Model/UpdateUserRequest.php Model/UpgradeTokenRequest.php @@ -68,12 +73,14 @@ Tests/Api/MediaLibraryApiInterfaceTest.php Tests/Api/NotificationsApiInterfaceTest.php Tests/Api/ProjectsApiInterfaceTest.php Tests/Api/SearchApiInterfaceTest.php +Tests/Api/StudioApiInterfaceTest.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/CreateStudioErrorResponseTest.php Tests/Model/DryRunTest.php Tests/Model/ExtendedUserDataResponseTest.php Tests/Model/ExtensionResponseTest.php @@ -96,11 +103,13 @@ Tests/Model/RegisterRequestTest.php Tests/Model/ResetPasswordErrorResponseTest.php Tests/Model/ResetPasswordRequestTest.php Tests/Model/SearchResponseTest.php +Tests/Model/StudioResponseTest.php Tests/Model/SurveyResponseTest.php Tests/Model/TagResponseTest.php Tests/Model/UpdateProjectErrorResponseTest.php Tests/Model/UpdateProjectFailureResponseTest.php Tests/Model/UpdateProjectRequestTest.php +Tests/Model/UpdateStudioErrorResponseTest.php Tests/Model/UpdateUserErrorResponseTest.php Tests/Model/UpdateUserRequestTest.php Tests/Model/UpgradeTokenRequestTest.php @@ -112,10 +121,12 @@ docs/Api/MediaLibraryApiInterface.md docs/Api/NotificationsApiInterface.md docs/Api/ProjectsApiInterface.md docs/Api/SearchApiInterface.md +docs/Api/StudioApiInterface.md docs/Api/UserApiInterface.md docs/Api/UtilityApiInterface.md docs/Model/BaseUser.md docs/Model/BasicUserDataResponse.md +docs/Model/CreateStudioErrorResponse.md docs/Model/DryRun.md docs/Model/ExtendedUserDataResponse.md docs/Model/ExtensionResponse.md @@ -138,11 +149,13 @@ docs/Model/RegisterRequest.md docs/Model/ResetPasswordErrorResponse.md docs/Model/ResetPasswordRequest.md docs/Model/SearchResponse.md +docs/Model/StudioResponse.md docs/Model/SurveyResponse.md docs/Model/TagResponse.md docs/Model/UpdateProjectErrorResponse.md docs/Model/UpdateProjectFailureResponse.md docs/Model/UpdateProjectRequest.md +docs/Model/UpdateStudioErrorResponse.md docs/Model/UpdateUserErrorResponse.md docs/Model/UpdateUserRequest.md docs/Model/UpgradeTokenRequest.md diff --git a/Api/ApiServer.php b/Api/ApiServer.php index 74af3355..dee41c19 100755 --- a/Api/ApiServer.php +++ b/Api/ApiServer.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/AuthenticationApiInterface.php b/Api/AuthenticationApiInterface.php index 7bf5a165..f8211ae1 100755 --- a/Api/AuthenticationApiInterface.php +++ b/Api/AuthenticationApiInterface.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/MediaLibraryApiInterface.php b/Api/MediaLibraryApiInterface.php index a7ded174..a3e44e00 100755 --- a/Api/MediaLibraryApiInterface.php +++ b/Api/MediaLibraryApiInterface.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/NotificationsApiInterface.php b/Api/NotificationsApiInterface.php index b1a6e88c..668d3e3a 100755 --- a/Api/NotificationsApiInterface.php +++ b/Api/NotificationsApiInterface.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/ProjectsApiInterface.php b/Api/ProjectsApiInterface.php index d909d45c..bdfed56c 100755 --- a/Api/ProjectsApiInterface.php +++ b/Api/ProjectsApiInterface.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/SearchApiInterface.php b/Api/SearchApiInterface.php index e46eefdd..564e7414 100755 --- a/Api/SearchApiInterface.php +++ b/Api/SearchApiInterface.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Api/StudioApiInterface.php b/Api/StudioApiInterface.php new file mode 100755 index 00000000..8ed85e2c --- /dev/null +++ b/Api/StudioApiInterface.php @@ -0,0 +1,103 @@ +headers->has('Accept') ? $request->headers->get('Accept') : '*/*'; + $responseFormat = $this->getOutputFormat($clientAccepts, $produces); + if (null === $responseFormat) { + return new Response('', 406); + } + + // Handle authentication + // Authentication 'BearerAuth' required + // HTTP bearer authentication required + $securityBearerAuth = $request->headers->get('authorization'); + + // Read out all input parameter values into variables + $accept_language = $request->headers->get('Accept-Language', 'en'); + $name = $request->request->get('name'); + $description = $request->request->get('description'); + $is_public = $request->request->get('is_public'); + $enable_comments = $request->request->get('enable_comments'); + $image_file = $request->files->get('image_file'); + + // Use the default value if no value was provided + + // Deserialize the input values that needs it + try { + $id = $this->deserialize($id, 'string', 'string'); + $accept_language = $this->deserialize($accept_language, 'string', 'string'); + $name = $this->deserialize($name, 'string', 'string'); + $description = $this->deserialize($description, 'string', 'string'); + $is_public = $this->deserialize($is_public, 'bool', 'string'); + $enable_comments = $this->deserialize($enable_comments, 'bool', 'string'); + } catch (SerializerRuntimeException $exception) { + return $this->createBadRequestResponse($exception->getMessage()); + } + + // Validate the input values + $asserts = []; + $asserts[] = new Assert\NotNull(); + $asserts[] = new Assert\Type('string'); + $response = $this->validate($id, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($accept_language, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($name, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($description, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('bool'); + $response = $this->validate($is_public, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('bool'); + $response = $this->validate($enable_comments, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\File(); + $response = $this->validate($image_file, $asserts); + if ($response instanceof Response) { + return $response; + } + + try { + $handler = $this->getApiHandler(); + + // Set authentication method 'BearerAuth' + $handler->setBearerAuth($securityBearerAuth); + + // Make the call to the business logic + $responseCode = 200; + $responseHeaders = []; + + $result = $handler->studioIdPut($id, $accept_language, $name, $description, $is_public, $enable_comments, $image_file, $responseCode, $responseHeaders); + + $message = match ($responseCode) { + 200 => 'Studio successfully updated.', + 400 => 'Bad request (Invalid, or missing parameters)', + 401 => 'Invalid JWT token | JWT token not found | JWT token expired', + 403 => 'Insufficient privileges, action not allowed.', + 404 => 'Not found', + 406 => 'Not acceptable - client must accept application/json as content type', + 422 => 'Unprocessable Entity (Specific error messages will be translated to the locale)', + default => '', + }; + + return new Response( + null !== $result ? $this->serialize($result, $responseFormat) : '', + $responseCode, + array_merge( + $responseHeaders, + [ + 'Content-Type' => $responseFormat, + 'X-OpenAPI-Message' => $message, + ] + ) + ); + } catch (\Throwable $fallthrough) { + return $this->createErrorResponse(new HttpException(500, 'An unsuspected error occurred.', $fallthrough)); + } + } + + /** + * Operation studioPost. + * + * Create a new Studio + * + * @param Request $request the Symfony request to handle + * + * @return Response the Symfony response + */ + public function studioPostAction(Request $request) + { + // Figure out what data format to return to the client + $produces = ['application/json']; + // Figure out what the client accepts + $clientAccepts = $request->headers->has('Accept') ? $request->headers->get('Accept') : '*/*'; + $responseFormat = $this->getOutputFormat($clientAccepts, $produces); + if (null === $responseFormat) { + return new Response('', 406); + } + + // Handle authentication + // Authentication 'BearerAuth' required + // HTTP bearer authentication required + $securityBearerAuth = $request->headers->get('authorization'); + + // Read out all input parameter values into variables + $accept_language = $request->headers->get('Accept-Language', 'en'); + $name = $request->request->get('name'); + $description = $request->request->get('description'); + $is_public = $request->request->get('is_public', true); + $enable_comments = $request->request->get('enable_comments', true); + $image_file = $request->files->get('image_file'); + + // Use the default value if no value was provided + + // Deserialize the input values that needs it + try { + $accept_language = $this->deserialize($accept_language, 'string', 'string'); + $name = $this->deserialize($name, 'string', 'string'); + $description = $this->deserialize($description, 'string', 'string'); + $is_public = $this->deserialize($is_public, 'bool', 'string'); + $enable_comments = $this->deserialize($enable_comments, 'bool', 'string'); + } catch (SerializerRuntimeException $exception) { + return $this->createBadRequestResponse($exception->getMessage()); + } + + // Validate the input values + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($accept_language, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($name, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('string'); + $response = $this->validate($description, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('bool'); + $response = $this->validate($is_public, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\Type('bool'); + $response = $this->validate($enable_comments, $asserts); + if ($response instanceof Response) { + return $response; + } + $asserts = []; + $asserts[] = new Assert\File(); + $response = $this->validate($image_file, $asserts); + if ($response instanceof Response) { + return $response; + } + + try { + $handler = $this->getApiHandler(); + + // Set authentication method 'BearerAuth' + $handler->setBearerAuth($securityBearerAuth); + + // Make the call to the business logic + $responseCode = 200; + $responseHeaders = []; + + $result = $handler->studioPost($accept_language, $name, $description, $is_public, $enable_comments, $image_file, $responseCode, $responseHeaders); + + $message = match ($responseCode) { + 201 => 'Studio successfully created.', + 400 => 'Bad request (Invalid, or missing parameters)', + 401 => 'Invalid JWT token | JWT token not found | JWT token expired', + 406 => 'Not acceptable - client must accept application/json as content type', + 422 => 'Unprocessable Entity (Specific error messages will be translated to the locale)', + default => '', + }; + + return new Response( + null !== $result ? $this->serialize($result, $responseFormat) : '', + $responseCode, + array_merge( + $responseHeaders, + [ + 'Content-Type' => $responseFormat, + 'X-OpenAPI-Message' => $message, + ] + ) + ); + } catch (\Throwable $fallthrough) { + return $this->createErrorResponse(new HttpException(500, 'An unsuspected error occurred.', $fallthrough)); + } + } + + /** + * Returns the handler for this API controller. + * + * @return StudioApiInterface + */ + public function getApiHandler() + { + return $this->apiServer->getApiHandler('studio'); + } +} diff --git a/Controller/UserController.php b/Controller/UserController.php index 155e7052..e3b8149c 100755 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Controller/UtilityController.php b/Controller/UtilityController.php index fa76cfe1..84adad49 100755 --- a/Controller/UtilityController.php +++ b/Controller/UtilityController.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/DependencyInjection/Compiler/OpenAPIServerApiPass.php b/DependencyInjection/Compiler/OpenAPIServerApiPass.php index eecd84cc..c14c9943 100755 --- a/DependencyInjection/Compiler/OpenAPIServerApiPass.php +++ b/DependencyInjection/Compiler/OpenAPIServerApiPass.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/DependencyInjection/OpenAPIServerExtension.php b/DependencyInjection/OpenAPIServerExtension.php index e6eea411..c8e2aa72 100755 --- a/DependencyInjection/OpenAPIServerExtension.php +++ b/DependencyInjection/OpenAPIServerExtension.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Model/BaseUser.php b/Model/BaseUser.php index 29926352..b2b587af 100755 --- a/Model/BaseUser.php +++ b/Model/BaseUser.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,44 +42,68 @@ class BaseUser { /** * Email of the user. + * + * @SerializedName("email") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('email')] protected ?string $email = null; /** * Name of the user | minLength: 3 | maxLength: 180. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('username')] protected ?string $username = null; /** * A secure password | minLength: 6 | maxLength: 4096. + * + * @SerializedName("password") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('password')] protected ?string $password = null; /** * The profile picture of the user in data URI scheme. + * + * @SerializedName("picture") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('picture')] protected ?string $picture = null; /** * An introduction of the user. + * + * @SerializedName("about") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('about')] protected ?string $about = null; /** * A short description about the project the user is currently working on. + * + * @SerializedName("currently_working_on") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] protected ?string $currently_working_on = null; /** diff --git a/Model/BasicUserDataResponse.php b/Model/BasicUserDataResponse.php index eac5c62b..f75dd627 100755 --- a/Model/BasicUserDataResponse.php +++ b/Model/BasicUserDataResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,65 +42,101 @@ class BasicUserDataResponse { /** * Unique ID of the user. + * + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id')] protected ?string $id = null; /** * Nickname of the user. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('username')] protected ?string $username = null; /** * The profile picture of the user in data URI scheme. + * + * @SerializedName("picture") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('picture')] protected ?string $picture = null; /** * An introduction of the user. + * + * @SerializedName("about") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('about')] protected ?string $about = null; /** * A short description about the project the user is currently working on. + * + * @SerializedName("currently_working_on") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] protected ?string $currently_working_on = null; /** * Amount of projects of the user. + * + * @SerializedName("projects") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('projects')] protected ?int $projects = null; /** * Amount of users that follow this user. + * + * @SerializedName("followers") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('followers')] protected ?int $followers = null; /** * Amount of users followed by this user. + * + * @SerializedName("following") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('following')] protected ?int $following = null; /** * Ranking score of this user. + * + * @SerializedName("ranking_score") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('ranking_score')] protected ?int $ranking_score = null; /** diff --git a/Model/CreateStudioErrorResponse.php b/Model/CreateStudioErrorResponse.php new file mode 100755 index 00000000..454aa73f --- /dev/null +++ b/Model/CreateStudioErrorResponse.php @@ -0,0 +1,149 @@ +name = array_key_exists('name', $data) ? $data['name'] : $this->name; + $this->description = array_key_exists('description', $data) ? $data['description'] : $this->description; + $this->image_file = array_key_exists('image_file', $data) ? $data['image_file'] : $this->image_file; + } + } + + /** + * Gets name. + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * Sets name. + * + * @return $this + */ + public function setName(?string $name = null): self + { + $this->name = $name; + + return $this; + } + + /** + * Gets description. + */ + public function getDescription(): ?string + { + return $this->description; + } + + /** + * Sets description. + * + * @return $this + */ + public function setDescription(?string $description = null): self + { + $this->description = $description; + + return $this; + } + + /** + * Gets image_file. + */ + public function getImageFile(): ?string + { + return $this->image_file; + } + + /** + * Sets image_file. + * + * @return $this + */ + public function setImageFile(?string $image_file = null): self + { + $this->image_file = $image_file; + + return $this; + } +} diff --git a/Model/DryRun.php b/Model/DryRun.php index 2dcfe7c5..3cdfece0 100755 --- a/Model/DryRun.php +++ b/Model/DryRun.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -40,10 +41,14 @@ class DryRun { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. + * + * @SerializedName("dry_run") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('dry-run')] protected ?bool $dry_run = false; /** @@ -69,7 +74,7 @@ public function isDryRun(): ?bool /** * Sets dry_run. * - * @param bool|null $dry_run Indicates wether a request should only be verified or executed + * @param bool|null $dry_run Indicates if a request should only be verified or executed * * @return $this */ diff --git a/Model/ExtendedUserDataResponse.php b/Model/ExtendedUserDataResponse.php index 710d0cf4..13a234c1 100755 --- a/Model/ExtendedUserDataResponse.php +++ b/Model/ExtendedUserDataResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,72 +42,112 @@ class ExtendedUserDataResponse { /** * Unique ID of the user. + * + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id')] protected ?string $id = null; /** * Nickname of the user. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('username')] protected ?string $username = null; /** * The profile picture of the user in data URI scheme. + * + * @SerializedName("picture") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('picture')] protected ?string $picture = null; /** * An introduction of the user. + * + * @SerializedName("about") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('about')] protected ?string $about = null; /** * A short description about the project the user is currently working on. + * + * @SerializedName("currently_working_on") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] protected ?string $currently_working_on = null; /** * Amount of projects of the user. + * + * @SerializedName("projects") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('projects')] protected ?int $projects = null; /** * Amount of users that follow this user. + * + * @SerializedName("followers") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('followers')] protected ?int $followers = null; /** * Amount of users followed by this user. + * + * @SerializedName("following") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('following')] protected ?int $following = null; /** * Ranking score of this user. + * + * @SerializedName("ranking_score") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('ranking_score')] protected ?int $ranking_score = null; /** * EMail of the user. + * + * @SerializedName("email") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('email')] protected ?string $email = null; /** diff --git a/Model/ExtensionResponse.php b/Model/ExtensionResponse.php index bf9619d5..a9f70d11 100755 --- a/Model/ExtensionResponse.php +++ b/Model/ExtensionResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,16 +42,24 @@ class ExtensionResponse { /** * The internal title of the extension. + * + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id')] protected ?string $id = null; /** * The translated text of the project extension. + * + * @SerializedName("text") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('text')] protected ?string $text = null; /** diff --git a/Model/FeaturedProjectResponse.php b/Model/FeaturedProjectResponse.php index dd3d4e89..93da56cf 100755 --- a/Model/FeaturedProjectResponse.php +++ b/Model/FeaturedProjectResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,32 +40,67 @@ */ class FeaturedProjectResponse { - #[Assert\Type('string')] - #[SerializedName('id')] + /** + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $id = null; - #[Assert\Type('string')] - #[SerializedName('project_id')] + /** + * @SerializedName("project_id") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $project_id = null; - #[Assert\Type('string')] - #[SerializedName('project_url')] + /** + * @SerializedName("project_url") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $project_url = null; - #[Assert\Type('string')] - #[SerializedName('url')] + /** + * @SerializedName("url") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $url = null; - #[Assert\Type('string')] - #[SerializedName('name')] + /** + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $name = null; - #[Assert\Type('string')] - #[SerializedName('author')] + /** + * @SerializedName("author") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $author = null; - #[Assert\Type('string')] - #[SerializedName('featured_image')] + /** + * @SerializedName("featured_image") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $featured_image = null; /** diff --git a/Model/JWTResponse.php b/Model/JWTResponse.php index f5e70e54..9e48ad26 100755 --- a/Model/JWTResponse.php +++ b/Model/JWTResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,12 +40,22 @@ */ class JWTResponse { - #[Assert\Type('string')] - #[SerializedName('token')] + /** + * @SerializedName("token") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $token = null; - #[Assert\Type('string')] - #[SerializedName('refresh_token')] + /** + * @SerializedName("refresh_token") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $refresh_token = null; /** diff --git a/Model/LoginRequest.php b/Model/LoginRequest.php index 00fabc28..d63902af 100755 --- a/Model/LoginRequest.php +++ b/Model/LoginRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,20 +42,38 @@ class LoginRequest { /** * Name of the user. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") + * + * @Assert\Length( + * max=180 + * ) + * @Assert\Length( + * min=3 + * ) */ - #[Assert\Type('string')] - #[Assert\Length(max: 180)] - #[Assert\Length(min: 3)] - #[SerializedName('username')] protected ?string $username = null; /** * A secure password. + * + * @SerializedName("password") + * + * @Assert\Type("string") + * + * @Type("string") + * + * @Assert\Length( + * max=4096 + * ) + * @Assert\Length( + * min=6 + * ) */ - #[Assert\Type('string')] - #[Assert\Length(max: 4096)] - #[Assert\Length(min: 6)] - #[SerializedName('password')] protected ?string $password = null; /** diff --git a/Model/MediaCategoryResponse.php b/Model/MediaCategoryResponse.php index 4018872f..f152b805 100755 --- a/Model/MediaCategoryResponse.php +++ b/Model/MediaCategoryResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,24 +42,37 @@ class MediaCategoryResponse { /** * ID of the category. + * + * @SerializedName("id") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('id')] protected ?int $id = null; /** * Name of the category. + * + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('name')] protected ?string $name = null; /** * Shows how important a category is (0 is the least priority). + * + * @SerializedName("priority") + * + * @Assert\Type("int") + * + * @Type("int") + * + * @Assert\GreaterThanOrEqual(0) */ - #[Assert\Type('int')] - #[Assert\GreaterThanOrEqual(0)] - #[SerializedName('priority')] protected ?int $priority = null; /** diff --git a/Model/MediaFileResponse.php b/Model/MediaFileResponse.php index c07375ae..b216c78d 100755 --- a/Model/MediaFileResponse.php +++ b/Model/MediaFileResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -40,69 +40,110 @@ */ class MediaFileResponse { - #[Assert\Type('int')] - #[SerializedName('id')] + /** + * @SerializedName("id") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $id = null; - #[Assert\Type('string')] - #[SerializedName('name')] + /** + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $name = null; /** * @var string[]|null + * + * @SerializedName("flavors") + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] - #[SerializedName('flavors')] protected ?array $flavors = null; /** * @var string[]|null + * + * @SerializedName("packages") + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] - #[SerializedName('packages')] protected ?array $packages = null; - #[Assert\Type('string')] - #[SerializedName('category')] + /** + * @SerializedName("category") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $category = null; - #[Assert\Type('string')] - #[SerializedName('author')] + /** + * @SerializedName("author") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $author = null; - #[Assert\Type('string')] - #[SerializedName('extension')] + /** + * @SerializedName("extension") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $extension = null; - #[Assert\Type('string')] - #[SerializedName('download_url')] + /** + * @SerializedName("download_url") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $download_url = null; /** * Size of the file in bytes. + * + * @SerializedName("size") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('size')] protected ?int $size = null; /** * Type of the media file. + * + * @SerializedName("file_type") + * + * @Assert\Choice({ "project", "image", "sound", "video", "other" }) + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Choice(['project', 'image', 'sound', 'video', 'other'])] - #[Assert\Type('string')] - #[SerializedName('file_type')] protected ?string $file_type = null; /** diff --git a/Model/MediaPackageResponse.php b/Model/MediaPackageResponse.php index c7fca79b..a1e066ec 100755 --- a/Model/MediaPackageResponse.php +++ b/Model/MediaPackageResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,36 +42,49 @@ class MediaPackageResponse { /** * ID of the package. + * + * @SerializedName("id") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('id')] protected ?int $id = null; /** * Name of the package. + * + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('name')] protected ?string $name = null; /** * Absolute path to the package. + * + * @SerializedName("url") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('url')] protected ?string $url = null; /** * @var array[]|null + * + * @SerializedName("categories") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\MediaCategoryResponse") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\MediaCategoryResponse', - ], - ], - ])] - #[SerializedName('categories')] protected ?array $categories = null; /** diff --git a/Model/NotificationContent.php b/Model/NotificationContent.php index 9a63b8e5..f9fd8973 100755 --- a/Model/NotificationContent.php +++ b/Model/NotificationContent.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,68 +42,107 @@ class NotificationContent { /** * Id of the user who caused the notification. + * + * @SerializedName("from") + * + * @Assert\Type("string") + * + * @Type("string") + * + * @Assert\Regex("/^[a-zA-Z0-9\\-]+$/") */ - #[Assert\Type('string')] - #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] - #[SerializedName('from')] protected ?string $from = null; /** * Username of the user who caused the notification. + * + * @SerializedName("from_name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('from_name')] protected ?string $from_name = null; /** * Id of the program for which the notification is about. + * + * @SerializedName("program") + * + * @Assert\Type("string") + * + * @Type("string") + * + * @Assert\Regex("/^[a-zA-Z0-9\\-]+$/") */ - #[Assert\Type('string')] - #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] - #[SerializedName('program')] protected ?string $program = null; /** * Name of the program for which the notification is about. + * + * @SerializedName("program_name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('program_name')] protected ?string $program_name = null; /** * Avatar of the user who caused the notification. + * + * @SerializedName("avatar") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('avatar')] protected ?string $avatar = null; /** * Id of the remixed program. + * + * @SerializedName("remixed_program") + * + * @Assert\Type("string") + * + * @Type("string") + * + * @Assert\Regex("/^[a-zA-Z0-9\\-]+$/") */ - #[Assert\Type('string')] - #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] - #[SerializedName('remixed_program')] protected ?string $remixed_program = null; /** * Name of the remixed program. + * + * @SerializedName("remixed_program_name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('remixed_program_name')] protected ?string $remixed_program_name = null; /** * Notification message. + * + * @SerializedName("message") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('message')] protected ?string $message = null; /** * Prize for anniversary notifications. + * + * @SerializedName("prize") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('prize')] protected ?string $prize = null; /** diff --git a/Model/NotificationResponse.php b/Model/NotificationResponse.php index c707703f..e6bc4bd2 100755 --- a/Model/NotificationResponse.php +++ b/Model/NotificationResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -42,36 +42,49 @@ class NotificationResponse { /** * Id of the notification. + * + * @SerializedName("id") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[SerializedName('id')] - #[Assert\Type('int')] protected ?int $id = null; /** * Notification Type. + * + * @SerializedName("type") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[SerializedName('type')] - #[Assert\Type('string')] protected ?string $type = null; /** * Seen status of the notification. + * + * @SerializedName("seen") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('seen')] protected ?bool $seen = null; /** * @var NotificationContent[]|null + * + * @SerializedName("content") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\NotificationContent") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\NotificationContent', - ], - ], - ])] - #[SerializedName('content')] protected ?array $content = null; /** diff --git a/Model/NotificationsCountResponse.php b/Model/NotificationsCountResponse.php index 4e8cb099..2698db85 100755 --- a/Model/NotificationsCountResponse.php +++ b/Model/NotificationsCountResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,24 +40,49 @@ */ class NotificationsCountResponse { - #[Assert\Type('int')] - #[SerializedName('total')] + /** + * @SerializedName("total") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $total = null; - #[Assert\Type('int')] - #[SerializedName('like')] + /** + * @SerializedName("like") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $like = null; - #[Assert\Type('int')] - #[SerializedName('follower')] + /** + * @SerializedName("follower") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $follower = null; - #[Assert\Type('int')] - #[SerializedName('comment')] + /** + * @SerializedName("comment") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $comment = null; - #[Assert\Type('int')] - #[SerializedName('remix')] + /** + * @SerializedName("remix") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $remix = null; /** diff --git a/Model/OAuthLoginRequest.php b/Model/OAuthLoginRequest.php index 61b48a73..e4252e82 100755 --- a/Model/OAuthLoginRequest.php +++ b/Model/OAuthLoginRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,16 +42,24 @@ class OAuthLoginRequest { /** * User ID token. + * + * @SerializedName("id_token") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id_token')] protected ?string $id_token = null; /** * OAuth provider. + * + * @SerializedName("resource_owner") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('resource_owner')] protected ?string $resource_owner = null; /** diff --git a/Model/ProjectReportRequest.php b/Model/ProjectReportRequest.php index 4f252e9f..179f274a 100755 --- a/Model/ProjectReportRequest.php +++ b/Model/ProjectReportRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,9 +40,15 @@ */ class ProjectReportRequest { - #[Assert\Choice(['Sexual content', 'Graphic violence', 'Hateful or abusive content', 'Improper content rating', 'Illegal prescription or other drug', 'Copycat or impersonation', 'Other objection'])] - #[Assert\Type('string')] - #[SerializedName('category')] + /** + * @SerializedName("category") + * + * @Assert\Choice({ "Sexual content", "Graphic violence", "Hateful or abusive content", "Improper content rating", "Illegal prescription or other drug", "Copycat or impersonation", "Other objection" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $category = null; /** diff --git a/Model/ProjectResponse.php b/Model/ProjectResponse.php index 99831c84..7315e4af 100755 --- a/Model/ProjectResponse.php +++ b/Model/ProjectResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,155 +42,243 @@ class ProjectResponse { /** * The unique identifier of the project. + * + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id')] protected ?string $id = null; /** * The name of the project. minLength: 1 | maxLength: 255. + * + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('name')] protected ?string $name = null; /** * The name of the projects' author. + * + * @SerializedName("author") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('author')] protected ?string $author = null; /** * A description of the project. + * + * @SerializedName("description") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('description')] protected ?string $description = null; /** * Credits and notes for the project. E.g., credits for using ideas, scripts or artwork from other people. + * + * @SerializedName("credits") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('credits')] protected ?string $credits = null; /** * The catrobat version that was used to create this project. + * + * @SerializedName("version") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('version')] protected ?string $version = null; /** * The projects' count of views. + * + * @SerializedName("views") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('views')] protected ?int $views = null; /** * The projects' count of downloads. Deprecated. Use downloads. + * + * @SerializedName("download") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('download')] protected ?int $download = null; /** * The projects' count of downloads. + * + * @SerializedName("downloads") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('downloads')] protected ?int $downloads = null; /** * The projects' count of reactions. + * + * @SerializedName("reactions") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('reactions')] protected ?int $reactions = null; /** * The projects' count of comments. + * + * @SerializedName("comments") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('comments')] protected ?int $comments = null; /** * Whether a project is publicly visible (false) or only via direct link (true). + * + * @SerializedName("private") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('private')] protected ?bool $private = null; - #[Assert\Type('string')] - #[SerializedName('flavor')] + /** + * @SerializedName("flavor") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $flavor = null; /** * Tags allow projects to be categorized by their creators. * * @var string[]|null + * + * @SerializedName("tags") + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] - #[SerializedName('tags')] protected ?array $tags = null; /** * The time of the upload. + * + * @SerializedName("uploaded") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('uploaded')] protected ?int $uploaded = null; /** * A localised text interpretation of the uploaded timestamp. + * + * @SerializedName("uploaded_string") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('uploaded_string')] protected ?string $uploaded_string = null; - #[Assert\Type('string')] - #[SerializedName('screenshot_large')] + /** + * @SerializedName("screenshot_large") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $screenshot_large = null; - #[Assert\Type('string')] - #[SerializedName('screenshot_small')] + /** + * @SerializedName("screenshot_small") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $screenshot_small = null; /** * The url to the project on our official share community platform. + * + * @SerializedName("project_url") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('project_url')] protected ?string $project_url = null; /** * The url to GET the catrobat file of this project. + * + * @SerializedName("download_url") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('download_url')] protected ?string $download_url = null; /** * The filesize of the catrobat file in megabytes. + * + * @SerializedName("filesize") + * + * @Assert\Type("float") + * + * @Type("float") */ - #[Assert\Type('float')] - #[SerializedName('filesize')] protected ?float $filesize = null; /** * Indicates whether a project is suitable for kids or not (0 = safe for kids, 1 = not safe for kids, 2 = not safe for kids set by moderator). + * + * @SerializedName("not_for_kids") + * + * @Assert\Type("int") + * + * @Type("int") */ - #[Assert\Type('int')] - #[SerializedName('not_for_kids')] protected ?int $not_for_kids = null; /** diff --git a/Model/ProjectsCategory.php b/Model/ProjectsCategory.php index 1810fe37..99c8ad0e 100755 --- a/Model/ProjectsCategory.php +++ b/Model/ProjectsCategory.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -42,31 +42,56 @@ class ProjectsCategory { /** * The name of the categories in english. + * + * @SerializedName("type") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('type')] protected ?string $type = null; /** * Translated name according to the language header. + * + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('name')] protected ?string $name = null; + /** + * Array of projects (deprecated - use projects_list). + * + * @var ProjectResponse[]|null + * + * @SerializedName("projectsList") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * + * @Type("array") + */ + protected ?array $projects_list = null; + /** * Array of projects. * * @var ProjectResponse[]|null + * + * @SerializedName("projects_list") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\ProjectResponse', - ], - ], - ])] - #[SerializedName('projectsList')] protected ?array $projects_list = null; /** @@ -80,6 +105,7 @@ public function __construct(?array $data = null) $this->type = array_key_exists('type', $data) ? $data['type'] : $this->type; $this->name = array_key_exists('name', $data) ? $data['name'] : $this->name; $this->projects_list = array_key_exists('projects_list', $data) ? $data['projects_list'] : $this->projects_list; + $this->projects_list = array_key_exists('projects_list', $data) ? $data['projects_list'] : $this->projects_list; } } @@ -137,6 +163,30 @@ public function getProjectsList(): ?array return $this->projects_list; } + /** + * Sets projects_list. + * + * @param ProjectResponse[]|null $projects_list Array of projects (deprecated - use projects_list) + * + * @return $this + */ + public function setProjectsList(?array $projects_list = null): self + { + $this->projects_list = $projects_list; + + return $this; + } + + /** + * Gets projects_list. + * + * @return ProjectResponse[]|null + */ + public function getProjectsList(): ?array + { + return $this->projects_list; + } + /** * Sets projects_list. * diff --git a/Model/RefreshRequest.php b/Model/RefreshRequest.php index aa9c89e7..f48628a4 100755 --- a/Model/RefreshRequest.php +++ b/Model/RefreshRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,8 +40,13 @@ */ class RefreshRequest { - #[Assert\Type('string')] - #[SerializedName('refresh_token')] + /** + * @SerializedName("refresh_token") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $refresh_token = null; /** diff --git a/Model/RegisterErrorResponse.php b/Model/RegisterErrorResponse.php index 96b3a927..003f49f1 100755 --- a/Model/RegisterErrorResponse.php +++ b/Model/RegisterErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,19 +40,37 @@ */ class RegisterErrorResponse { - #[Assert\Choice(['Email already in use', 'Email invalid', 'Email missing'])] - #[Assert\Type('string')] - #[SerializedName('email')] + /** + * @SerializedName("email") + * + * @Assert\Choice({ "Email already in use", "Email invalid", "Email missing" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $email = null; - #[Assert\Choice(['Username too short', 'Username too long', 'Username already in use', 'Username missing', 'Username must not contain an email address'])] - #[Assert\Type('string')] - #[SerializedName('username')] + /** + * @SerializedName("username") + * + * @Assert\Choice({ "Username too short", "Username too long", "Username already in use", "Username missing", "Username must not contain an email address" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $username = null; - #[Assert\Choice(['Password too short', 'Password too long', 'Password contains invalid chars', 'Password missing'])] - #[Assert\Type('string')] - #[SerializedName('password')] + /** + * @SerializedName("password") + * + * @Assert\Choice({ "Password too short", "Password too long", "Password contains invalid chars", "Password missing" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $password = null; /** diff --git a/Model/RegisterRequest.php b/Model/RegisterRequest.php index cd820188..ff3975f3 100755 --- a/Model/RegisterRequest.php +++ b/Model/RegisterRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -40,52 +41,80 @@ class RegisterRequest { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. + * + * @SerializedName("dry_run") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('dry-run')] protected ?bool $dry_run = false; /** * Email of the user. + * + * @SerializedName("email") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('email')] protected ?string $email = null; /** * Name of the user | minLength: 3 | maxLength: 180. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('username')] protected ?string $username = null; /** * A secure password | minLength: 6 | maxLength: 4096. + * + * @SerializedName("password") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('password')] protected ?string $password = null; /** * The profile picture of the user in data URI scheme. + * + * @SerializedName("picture") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('picture')] protected ?string $picture = null; /** * An introduction of the user. + * + * @SerializedName("about") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('about')] protected ?string $about = null; /** * A short description about the project the user is currently working on. + * + * @SerializedName("currently_working_on") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] protected ?string $currently_working_on = null; /** @@ -117,7 +146,7 @@ public function isDryRun(): ?bool /** * Sets dry_run. * - * @param bool|null $dry_run Indicates wether a request should only be verified or executed + * @param bool|null $dry_run Indicates if a request should only be verified or executed * * @return $this */ diff --git a/Model/ResetPasswordErrorResponse.php b/Model/ResetPasswordErrorResponse.php index 3a4e80b3..1dacc3f8 100755 --- a/Model/ResetPasswordErrorResponse.php +++ b/Model/ResetPasswordErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,9 +40,15 @@ */ class ResetPasswordErrorResponse { - #[Assert\Choice(['Email invalid', 'Email missing'])] - #[Assert\Type('string')] - #[SerializedName('email')] + /** + * @SerializedName("email") + * + * @Assert\Choice({ "Email invalid", "Email missing" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $email = null; /** diff --git a/Model/ResetPasswordRequest.php b/Model/ResetPasswordRequest.php index 2feeceff..19bce375 100755 --- a/Model/ResetPasswordRequest.php +++ b/Model/ResetPasswordRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,9 +42,13 @@ class ResetPasswordRequest { /** * Email of the user. + * + * @SerializedName("email") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('email')] protected ?string $email = null; /** diff --git a/Model/SearchResponse.php b/Model/SearchResponse.php index 31e9f1b7..cb5f4e36 100755 --- a/Model/SearchResponse.php +++ b/Model/SearchResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -43,38 +44,50 @@ class SearchResponse * Array of projects. * * @var ProjectResponse[]|null + * + * @SerializedName("projects") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\ProjectResponse', - ], - ], - ])] - #[SerializedName('projects')] protected ?array $projects = null; - #[Assert\Type('int')] - #[SerializedName('projects_total')] + /** + * @SerializedName("projects_total") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $projects_total = null; /** * Array of users. * * @var BasicUserDataResponse[]|null + * + * @SerializedName("users") + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\BasicUserDataResponse") + * }) + * + * @Type("array") */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\BasicUserDataResponse', - ], - ], - ])] - #[SerializedName('users')] protected ?array $users = null; - #[Assert\Type('int')] - #[SerializedName('users_total')] + /** + * @SerializedName("users_total") + * + * @Assert\Type("int") + * + * @Type("int") + */ protected ?int $users_total = null; /** diff --git a/Model/StudioResponse.php b/Model/StudioResponse.php new file mode 100755 index 00000000..5da53930 --- /dev/null +++ b/Model/StudioResponse.php @@ -0,0 +1,257 @@ +id = array_key_exists('id', $data) ? $data['id'] : $this->id; + $this->name = array_key_exists('name', $data) ? $data['name'] : $this->name; + $this->description = array_key_exists('description', $data) ? $data['description'] : $this->description; + $this->is_public = array_key_exists('is_public', $data) ? $data['is_public'] : $this->is_public; + $this->enable_comments = array_key_exists('enable_comments', $data) ? $data['enable_comments'] : $this->enable_comments; + $this->image_path = array_key_exists('image_path', $data) ? $data['image_path'] : $this->image_path; + } + } + + /** + * Gets id. + */ + public function getId(): ?string + { + return $this->id; + } + + /** + * Sets id. + * + * @param string|null $id ID of the studio + * + * @return $this + */ + public function setId(?string $id = null): self + { + $this->id = $id; + + return $this; + } + + /** + * Gets name. + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * Sets name. + * + * @param string|null $name The name of the studio + * + * @return $this + */ + public function setName(?string $name = null): self + { + $this->name = $name; + + return $this; + } + + /** + * Gets description. + */ + public function getDescription(): ?string + { + return $this->description; + } + + /** + * Sets description. + * + * @param string|null $description A small description about the Studio + * + * @return $this + */ + public function setDescription(?string $description = null): self + { + $this->description = $description; + + return $this; + } + + /** + * Gets is_public. + */ + public function isIsPublic(): ?bool + { + return $this->is_public; + } + + /** + * Sets is_public. + * + * @param bool|null $is_public This flag sets the studios' visibility to public or private + * + * @return $this + */ + public function setIsPublic(?bool $is_public = null): self + { + $this->is_public = $is_public; + + return $this; + } + + /** + * Gets enable_comments. + */ + public function isEnableComments(): ?bool + { + return $this->enable_comments; + } + + /** + * Sets enable_comments. + * + * @param bool|null $enable_comments This flag enables or disabled the possibility to add comments to the studio + * + * @return $this + */ + public function setEnableComments(?bool $enable_comments = null): self + { + $this->enable_comments = $enable_comments; + + return $this; + } + + /** + * Gets image_path. + */ + public function getImagePath(): ?string + { + return $this->image_path; + } + + /** + * Sets image_path. + * + * @param string|null $image_path Cover image + * + * @return $this + */ + public function setImagePath(?string $image_path = null): self + { + $this->image_path = $image_path; + + return $this; + } +} diff --git a/Model/SurveyResponse.php b/Model/SurveyResponse.php index 8dd5f1f6..a2a94920 100755 --- a/Model/SurveyResponse.php +++ b/Model/SurveyResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,9 +42,13 @@ class SurveyResponse { /** * Url to a survey for the given language. + * + * @SerializedName("url") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('url')] protected ?string $url = null; /** diff --git a/Model/TagResponse.php b/Model/TagResponse.php index f96dad20..3aadacbe 100755 --- a/Model/TagResponse.php +++ b/Model/TagResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,16 +42,24 @@ class TagResponse { /** * The internal title of the title. + * + * @SerializedName("id") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('id')] protected ?string $id = null; /** * The translated text of the project tag. + * + * @SerializedName("text") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('text')] protected ?string $text = null; /** diff --git a/Model/UpdateProjectErrorResponse.php b/Model/UpdateProjectErrorResponse.php index 24750cdc..fa987741 100755 --- a/Model/UpdateProjectErrorResponse.php +++ b/Model/UpdateProjectErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,24 +40,48 @@ */ class UpdateProjectErrorResponse { - #[Assert\Choice(['Name empty', 'Name too long'])] - #[Assert\Type('string')] - #[SerializedName('name')] + /** + * @SerializedName("name") + * + * @Assert\Choice({ "Name empty", "Name too long" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $name = null; - #[Assert\Choice(['Description too long'])] - #[Assert\Type('string')] - #[SerializedName('description')] + /** + * @SerializedName("description") + * + * @Assert\Choice({ "Description too long" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $description = null; - #[Assert\Choice(['Credits too long'])] - #[Assert\Type('string')] - #[SerializedName('credits')] + /** + * @SerializedName("credits") + * + * @Assert\Choice({ "Credits too long" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $credits = null; - #[Assert\Choice(['Project screenshot invalid or not supported'])] - #[Assert\Type('string')] - #[SerializedName('screenshot')] + /** + * @SerializedName("screenshot") + * + * @Assert\Choice({ "Project screenshot invalid or not supported" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $screenshot = null; /** diff --git a/Model/UpdateProjectFailureResponse.php b/Model/UpdateProjectFailureResponse.php index 1c96c2bc..9cd6882c 100755 --- a/Model/UpdateProjectFailureResponse.php +++ b/Model/UpdateProjectFailureResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,9 +40,15 @@ */ class UpdateProjectFailureResponse { - #[Assert\Choice(['Failed saving details of the project.', 'Failed reading, converting or storing the screenshot. Please check your input.'])] - #[Assert\Type('string')] - #[SerializedName('error')] + /** + * @SerializedName("error") + * + * @Assert\Choice({ "Failed saving details of the project.", "Failed reading, converting or storing the screenshot. Please check your input." }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $error = null; /** diff --git a/Model/UpdateProjectRequest.php b/Model/UpdateProjectRequest.php index b7bfaa57..01b18f61 100755 --- a/Model/UpdateProjectRequest.php +++ b/Model/UpdateProjectRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -41,37 +42,57 @@ class UpdateProjectRequest { /** * The name of the project. minLength: 1 | maxLength: 255. + * + * @SerializedName("name") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('name')] protected ?string $name = null; /** * A description of the project. + * + * @SerializedName("description") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('description')] protected ?string $description = null; /** * Credits and notes for the project. E.g., credits for using ideas, scripts or artwork from other people. + * + * @SerializedName("credits") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('credits')] protected ?string $credits = null; /** * Whether a project is publicly visible (false) or only via direct link (true). + * + * @SerializedName("private") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('private')] protected ?bool $private = null; /** * An image representing the project in data URI scheme. + * + * @SerializedName("screenshot") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('screenshot')] protected ?string $screenshot = null; /** diff --git a/Model/UpdateStudioErrorResponse.php b/Model/UpdateStudioErrorResponse.php new file mode 100755 index 00000000..b0d22991 --- /dev/null +++ b/Model/UpdateStudioErrorResponse.php @@ -0,0 +1,149 @@ +name = array_key_exists('name', $data) ? $data['name'] : $this->name; + $this->description = array_key_exists('description', $data) ? $data['description'] : $this->description; + $this->image_file = array_key_exists('image_file', $data) ? $data['image_file'] : $this->image_file; + } + } + + /** + * Gets name. + */ + public function getName(): ?string + { + return $this->name; + } + + /** + * Sets name. + * + * @return $this + */ + public function setName(?string $name = null): self + { + $this->name = $name; + + return $this; + } + + /** + * Gets description. + */ + public function getDescription(): ?string + { + return $this->description; + } + + /** + * Sets description. + * + * @return $this + */ + public function setDescription(?string $description = null): self + { + $this->description = $description; + + return $this; + } + + /** + * Gets image_file. + */ + public function getImageFile(): ?string + { + return $this->image_file; + } + + /** + * Sets image_file. + * + * @return $this + */ + public function setImageFile(?string $image_file = null): self + { + $this->image_file = $image_file; + + return $this; + } +} diff --git a/Model/UpdateUserErrorResponse.php b/Model/UpdateUserErrorResponse.php index e0673202..6ec88659 100755 --- a/Model/UpdateUserErrorResponse.php +++ b/Model/UpdateUserErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,29 +40,59 @@ */ class UpdateUserErrorResponse { - #[Assert\Choice(['Email already in use', 'Email invalid'])] - #[Assert\Type('string')] - #[SerializedName('email')] + /** + * @SerializedName("email") + * + * @Assert\Choice({ "Email already in use", "Email invalid" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $email = null; - #[Assert\Choice(['Username too short', 'Username too long', 'Username already in use', 'Username must not contain an email address'])] - #[Assert\Type('string')] - #[SerializedName('username')] + /** + * @SerializedName("username") + * + * @Assert\Choice({ "Username too short", "Username too long", "Username already in use", "Username must not contain an email address" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $username = null; - #[Assert\Choice(['Password too short', 'Password too long', 'Password contains invalid chars'])] - #[Assert\Type('string')] - #[SerializedName('password')] + /** + * @SerializedName("password") + * + * @Assert\Choice({ "Password too short", "Password too long", "Password contains invalid chars" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $password = null; - #[Assert\Choice(['Current password is missing', 'Current password is wrong'])] - #[Assert\Type('string')] - #[SerializedName('currentPassword')] + /** + * @SerializedName("current_password") + * + * @Assert\Choice({ "Current password is missing", "Current password is wrong" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $current_password = null; - #[Assert\Choice(['Profile picture invalid or not supported'])] - #[Assert\Type('string')] - #[SerializedName('picture')] + /** + * @SerializedName("picture") + * + * @Assert\Choice({ "Profile picture invalid or not supported" }) + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $picture = null; /** diff --git a/Model/UpdateUserRequest.php b/Model/UpdateUserRequest.php index f468b6e3..b6437684 100755 --- a/Model/UpdateUserRequest.php +++ b/Model/UpdateUserRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -40,59 +41,91 @@ class UpdateUserRequest { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. + * + * @SerializedName("dry_run") + * + * @Assert\Type("bool") + * + * @Type("bool") */ - #[Assert\Type('bool')] - #[SerializedName('dry-run')] protected ?bool $dry_run = false; /** * Email of the user. + * + * @SerializedName("email") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('email')] protected ?string $email = null; /** * Name of the user | minLength: 3 | maxLength: 180. + * + * @SerializedName("username") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('username')] protected ?string $username = null; /** * A secure password | minLength: 6 | maxLength: 4096. + * + * @SerializedName("password") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('password')] protected ?string $password = null; /** * The profile picture of the user in data URI scheme. + * + * @SerializedName("picture") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('picture')] protected ?string $picture = null; /** * An introduction of the user. + * + * @SerializedName("about") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('about')] protected ?string $about = null; /** * A short description about the project the user is currently working on. + * + * @SerializedName("currently_working_on") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] protected ?string $currently_working_on = null; /** * The current password of the user. Required for changing the password. + * + * @SerializedName("current_password") + * + * @Assert\Type("string") + * + * @Type("string") */ - #[Assert\Type('string')] - #[SerializedName('currentPassword')] protected ?string $current_password = null; /** @@ -125,7 +158,7 @@ public function isDryRun(): ?bool /** * Sets dry_run. * - * @param bool|null $dry_run Indicates wether a request should only be verified or executed + * @param bool|null $dry_run Indicates if a request should only be verified or executed * * @return $this */ diff --git a/Model/UpgradeTokenRequest.php b/Model/UpgradeTokenRequest.php index cc954a04..871da876 100755 --- a/Model/UpgradeTokenRequest.php +++ b/Model/UpgradeTokenRequest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,8 +40,13 @@ */ class UpgradeTokenRequest { - #[Assert\Type('string')] - #[SerializedName('upload_token')] + /** + * @SerializedName("upload_token") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $upload_token = null; /** diff --git a/Model/UploadErrorResponse.php b/Model/UploadErrorResponse.php index d844f6f0..0768aea9 100755 --- a/Model/UploadErrorResponse.php +++ b/Model/UploadErrorResponse.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -30,6 +30,7 @@ namespace OpenAPI\Server\Model; use JMS\Serializer\Annotation\SerializedName; +use JMS\Serializer\Annotation\Type; use Symfony\Component\Validator\Constraints as Assert; /** @@ -39,8 +40,13 @@ */ class UploadErrorResponse { - #[Assert\Type('string')] - #[SerializedName('error')] + /** + * @SerializedName("error") + * + * @Assert\Type("string") + * + * @Type("string") + */ protected ?string $error = null; /** diff --git a/OpenAPIServerBundle.php b/OpenAPIServerBundle.php index e7f30e34..a86bd4c4 100755 --- a/OpenAPIServerBundle.php +++ b/OpenAPIServerBundle.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/README.md b/README.md index b07dda48..a4291f96 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ API for the Catrobat Share Platform This [Symfony](https://symfony.com/) bundle is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v1.4.3 +- API version: v1.6.0 - Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PhpSymfonyServerCodegen For more information, please visit [https://share.catrob.at](https://share.catrob.at) @@ -141,6 +141,8 @@ Class | Method | HTTP request | Description *ProjectsApiInterface* | [**projectsUserGet**](docs/Api/ProjectsApiInterface.md#projectsuserget) | **GET** /projects/user | Get the projects of the logged in user *ProjectsApiInterface* | [**projectsUserIdGet**](docs/Api/ProjectsApiInterface.md#projectsuseridget) | **GET** /projects/user/{id} | Get the public projects of a given user *SearchApiInterface* | [**searchGet**](docs/Api/SearchApiInterface.md#searchget) | **GET** /search | Search for projects, users,.. +*StudioApiInterface* | [**studioIdPut**](docs/Api/StudioApiInterface.md#studioidput) | **PUT** /studio/{id} | Update a Studio +*StudioApiInterface* | [**studioPost**](docs/Api/StudioApiInterface.md#studiopost) | **POST** /studio | Create a new Studio *UserApiInterface* | [**userDelete**](docs/Api/UserApiInterface.md#userdelete) | **DELETE** /user | Delete user account *UserApiInterface* | [**userGet**](docs/Api/UserApiInterface.md#userget) | **GET** /user | Get your private user data *UserApiInterface* | [**userIdGet**](docs/Api/UserApiInterface.md#useridget) | **GET** /user/{id} | Get public user data @@ -157,6 +159,7 @@ Class | Method | HTTP request | Description - [BaseUser](docs/Model/BaseUser.md) - [BasicUserDataResponse](docs/Model/BasicUserDataResponse.md) + - [CreateStudioErrorResponse](docs/Model/CreateStudioErrorResponse.md) - [DryRun](docs/Model/DryRun.md) - [ExtendedUserDataResponse](docs/Model/ExtendedUserDataResponse.md) - [ExtensionResponse](docs/Model/ExtensionResponse.md) @@ -179,11 +182,13 @@ Class | Method | HTTP request | Description - [ResetPasswordErrorResponse](docs/Model/ResetPasswordErrorResponse.md) - [ResetPasswordRequest](docs/Model/ResetPasswordRequest.md) - [SearchResponse](docs/Model/SearchResponse.md) + - [StudioResponse](docs/Model/StudioResponse.md) - [SurveyResponse](docs/Model/SurveyResponse.md) - [TagResponse](docs/Model/TagResponse.md) - [UpdateProjectErrorResponse](docs/Model/UpdateProjectErrorResponse.md) - [UpdateProjectFailureResponse](docs/Model/UpdateProjectFailureResponse.md) - [UpdateProjectRequest](docs/Model/UpdateProjectRequest.md) + - [UpdateStudioErrorResponse](docs/Model/UpdateStudioErrorResponse.md) - [UpdateUserErrorResponse](docs/Model/UpdateUserErrorResponse.md) - [UpdateUserRequest](docs/Model/UpdateUserRequest.md) - [UpgradeTokenRequest](docs/Model/UpgradeTokenRequest.md) diff --git a/Resources/config/routing.yaml b/Resources/config/routing.yaml index c9faf67a..f614e634 100755 --- a/Resources/config/routing.yaml +++ b/Resources/config/routing.yaml @@ -207,6 +207,21 @@ open_api_server_search_searchget: defaults: _controller: open_api_server.controller.search::searchGetAction +# studio +open_api_server_studio_studioidput: + path: /studio/{id} + methods: [PUT] + defaults: + _controller: open_api_server.controller.studio::studioIdPutAction + requirements: + id: '[a-z0-9]+' + +open_api_server_studio_studiopost: + path: /studio + methods: [POST] + defaults: + _controller: open_api_server.controller.studio::studioPostAction + # user open_api_server_user_userdelete: path: /user diff --git a/Resources/config/services.yaml b/Resources/config/services.yaml index 04e265e9..4af2f613 100755 --- a/Resources/config/services.yaml +++ b/Resources/config/services.yaml @@ -66,6 +66,15 @@ services: - [setContainer, ['@service_container']] tags: ['controller.service_arguments'] + open_api_server.controller.studio: + class: OpenAPI\Server\Controller\StudioController + calls: + - [setSerializer, ['@open_api_server.service.serializer']] + - [setValidator, ['@open_api_server.service.validator']] + - [setApiServer, ['@open_api_server.api.api_server']] + - [setContainer, ['@service_container']] + tags: ['controller.service_arguments'] + open_api_server.controller.user: class: OpenAPI\Server\Controller\UserController calls: diff --git a/Tests/Api/AuthenticationApiInterfaceTest.php b/Tests/Api/AuthenticationApiInterfaceTest.php index f1296860..37544be7 100755 --- a/Tests/Api/AuthenticationApiInterfaceTest.php +++ b/Tests/Api/AuthenticationApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Api/MediaLibraryApiInterfaceTest.php b/Tests/Api/MediaLibraryApiInterfaceTest.php index 0e61529d..04021c1f 100755 --- a/Tests/Api/MediaLibraryApiInterfaceTest.php +++ b/Tests/Api/MediaLibraryApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Api/NotificationsApiInterfaceTest.php b/Tests/Api/NotificationsApiInterfaceTest.php index ec9bb728..f8eb4fac 100755 --- a/Tests/Api/NotificationsApiInterfaceTest.php +++ b/Tests/Api/NotificationsApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Api/ProjectsApiInterfaceTest.php b/Tests/Api/ProjectsApiInterfaceTest.php index 1a78d968..6b798644 100755 --- a/Tests/Api/ProjectsApiInterfaceTest.php +++ b/Tests/Api/ProjectsApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -91,7 +91,7 @@ public function testProjectIdCatrobatGet(): void $path = '/project/{id}/catrobat'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('GET', $path); @@ -109,7 +109,7 @@ public function testProjectIdDelete(): void $path = '/project/{id}'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('DELETE', $path); @@ -127,7 +127,7 @@ public function testProjectIdGet(): void $path = '/project/{id}'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('GET', $path); @@ -145,7 +145,7 @@ public function testProjectIdPut(): void $path = '/project/{id}'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('PUT', $path, [], [], ['CONTENT_TYPE' => 'application/json']); @@ -163,7 +163,7 @@ public function testProjectIdRecommendationsGet(): void $path = '/project/{id}/recommendations'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('GET', $path); @@ -181,7 +181,7 @@ public function testProjectIdReportPost(): void $path = '/project/{id}/report'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('POST', $path, [], [], ['CONTENT_TYPE' => 'application/json']); @@ -319,7 +319,7 @@ public function testProjectsUserIdGet(): void $path = '/projects/user/{id}'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('GET', $path); diff --git a/Tests/Api/SearchApiInterfaceTest.php b/Tests/Api/SearchApiInterfaceTest.php index fc0ca4c6..6839b51c 100755 --- a/Tests/Api/SearchApiInterfaceTest.php +++ b/Tests/Api/SearchApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Api/StudioApiInterfaceTest.php b/Tests/Api/StudioApiInterfaceTest.php new file mode 100755 index 00000000..f5cf2ba0 --- /dev/null +++ b/Tests/Api/StudioApiInterfaceTest.php @@ -0,0 +1,125 @@ +genTestData('[a-z0-9]+'); + $path = str_replace($pattern, $data, $path); + + $crawler = $client->request('PUT', $path); + $this->markTestSkipped('Test for studioIdPut not implemented'); + } + + /** + * Test case for studioPost. + * + * Create a new Studio. + */ + public function testStudioPost(): void + { + $client = self::$client; + + $path = '/studio'; + + $crawler = $client->request('POST', $path); + $this->markTestSkipped('Test for studioPost not implemented'); + } + + protected function genTestData(string $regexp) + { + $grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp'); + $compiler = \Hoa\Compiler\Llk\Llk::load($grammar); + $ast = $compiler->parse($regexp); + $generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random()); + + return $generator->visit($ast); + } +} diff --git a/Tests/Api/UserApiInterfaceTest.php b/Tests/Api/UserApiInterfaceTest.php index 23f00c3d..ad4b5559 100755 --- a/Tests/Api/UserApiInterfaceTest.php +++ b/Tests/Api/UserApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -121,7 +121,7 @@ public function testUserIdGet(): void $path = '/user/{id}'; $pattern = '{id}'; - $data = $this->genTestData('^[a-zA-Z0-9\\-]+$'); + $data = $this->genTestData('^[a-zA-Z0-9\-]+$'); $path = str_replace($pattern, $data, $path); $crawler = $client->request('GET', $path); diff --git a/Tests/Api/UtilityApiInterfaceTest.php b/Tests/Api/UtilityApiInterfaceTest.php index f48b0f3a..aceab648 100755 --- a/Tests/Api/UtilityApiInterfaceTest.php +++ b/Tests/Api/UtilityApiInterfaceTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Controller/ControllerTest.php b/Tests/Controller/ControllerTest.php index c01c5444..7b987d84 100755 --- a/Tests/Controller/ControllerTest.php +++ b/Tests/Controller/ControllerTest.php @@ -15,7 +15,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/BaseUserTest.php b/Tests/Model/BaseUserTest.php index 0087273c..d8059e52 100755 --- a/Tests/Model/BaseUserTest.php +++ b/Tests/Model/BaseUserTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/BasicUserDataResponseTest.php b/Tests/Model/BasicUserDataResponseTest.php index d99cd38b..096381ba 100755 --- a/Tests/Model/BasicUserDataResponseTest.php +++ b/Tests/Model/BasicUserDataResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/CreateStudioErrorResponseTest.php b/Tests/Model/CreateStudioErrorResponseTest.php new file mode 100755 index 00000000..9dd2e349 --- /dev/null +++ b/Tests/Model/CreateStudioErrorResponseTest.php @@ -0,0 +1,130 @@ +object = $this->getMockBuilder(CreateStudioErrorResponse::class)->getMockForAbstractClass(); + } + + /** + * Clean up after running each test case. + */ + public function tearDown(): void + { + } + + /** + * Clean up after running all test cases. + */ + public static function tearDownAfterClass(): void + { + } + + /** + * @group integration + * + * @small + */ + public function testTestClassExists(): void + { + $this->assertTrue(class_exists(CreateStudioErrorResponse::class)); + $this->assertInstanceOf(CreateStudioErrorResponse::class, $this->object); + } + + /** + * Test attribute "name". + * + * @group unit + * + * @small + */ + public function testPropertyName(): void + { + $this->markTestSkipped('Test for property name not implemented'); + } + + /** + * Test attribute "description". + * + * @group unit + * + * @small + */ + public function testPropertyDescription(): void + { + $this->markTestSkipped('Test for property description not implemented'); + } + + /** + * Test attribute "image_file". + * + * @group unit + * + * @small + */ + public function testPropertyImageFile(): void + { + $this->markTestSkipped('Test for property image_file not implemented'); + } +} diff --git a/Tests/Model/DryRunTest.php b/Tests/Model/DryRunTest.php index a9690885..ba2d45e8 100755 --- a/Tests/Model/DryRunTest.php +++ b/Tests/Model/DryRunTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ExtendedUserDataResponseTest.php b/Tests/Model/ExtendedUserDataResponseTest.php index 687b0762..c89847df 100755 --- a/Tests/Model/ExtendedUserDataResponseTest.php +++ b/Tests/Model/ExtendedUserDataResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ExtensionResponseTest.php b/Tests/Model/ExtensionResponseTest.php index 9233cd7c..84f2a4af 100755 --- a/Tests/Model/ExtensionResponseTest.php +++ b/Tests/Model/ExtensionResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/FeaturedProjectResponseTest.php b/Tests/Model/FeaturedProjectResponseTest.php index 4bd95080..e02000ae 100755 --- a/Tests/Model/FeaturedProjectResponseTest.php +++ b/Tests/Model/FeaturedProjectResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/JWTResponseTest.php b/Tests/Model/JWTResponseTest.php index 7c844db2..b62d09bc 100755 --- a/Tests/Model/JWTResponseTest.php +++ b/Tests/Model/JWTResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/LoginRequestTest.php b/Tests/Model/LoginRequestTest.php index de7f4f94..6174ef7f 100755 --- a/Tests/Model/LoginRequestTest.php +++ b/Tests/Model/LoginRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/MediaCategoryResponseTest.php b/Tests/Model/MediaCategoryResponseTest.php index 77f1bd4c..3cce34a5 100755 --- a/Tests/Model/MediaCategoryResponseTest.php +++ b/Tests/Model/MediaCategoryResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/MediaFileResponseTest.php b/Tests/Model/MediaFileResponseTest.php index 43e1057a..57398e76 100755 --- a/Tests/Model/MediaFileResponseTest.php +++ b/Tests/Model/MediaFileResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/MediaPackageResponseTest.php b/Tests/Model/MediaPackageResponseTest.php index c4be61d4..7fe02ee8 100755 --- a/Tests/Model/MediaPackageResponseTest.php +++ b/Tests/Model/MediaPackageResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/NotificationContentTest.php b/Tests/Model/NotificationContentTest.php index 851ef4b5..821a49c6 100755 --- a/Tests/Model/NotificationContentTest.php +++ b/Tests/Model/NotificationContentTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/NotificationResponseTest.php b/Tests/Model/NotificationResponseTest.php index 25608b3c..d901e66f 100755 --- a/Tests/Model/NotificationResponseTest.php +++ b/Tests/Model/NotificationResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/NotificationsCountResponseTest.php b/Tests/Model/NotificationsCountResponseTest.php index bdec1bad..cafa63fa 100755 --- a/Tests/Model/NotificationsCountResponseTest.php +++ b/Tests/Model/NotificationsCountResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/OAuthLoginRequestTest.php b/Tests/Model/OAuthLoginRequestTest.php index af69ed7a..cf82c1ae 100755 --- a/Tests/Model/OAuthLoginRequestTest.php +++ b/Tests/Model/OAuthLoginRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ProjectReportRequestTest.php b/Tests/Model/ProjectReportRequestTest.php index 54167d0f..7e122f2c 100755 --- a/Tests/Model/ProjectReportRequestTest.php +++ b/Tests/Model/ProjectReportRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ProjectResponseTest.php b/Tests/Model/ProjectResponseTest.php index 6e84a468..ec569560 100755 --- a/Tests/Model/ProjectResponseTest.php +++ b/Tests/Model/ProjectResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ProjectsCategoryTest.php b/Tests/Model/ProjectsCategoryTest.php index 3cb606a3..9519f20d 100755 --- a/Tests/Model/ProjectsCategoryTest.php +++ b/Tests/Model/ProjectsCategoryTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -127,4 +127,16 @@ public function testPropertyProjectsList(): void { $this->markTestSkipped('Test for property projects_list not implemented'); } + + /** + * Test attribute "projects_list". + * + * @group unit + * + * @small + */ + public function testPropertyProjectsList(): void + { + $this->markTestSkipped('Test for property projects_list not implemented'); + } } diff --git a/Tests/Model/RefreshRequestTest.php b/Tests/Model/RefreshRequestTest.php index 149a9f36..043ce4f1 100755 --- a/Tests/Model/RefreshRequestTest.php +++ b/Tests/Model/RefreshRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/RegisterErrorResponseTest.php b/Tests/Model/RegisterErrorResponseTest.php index 277b4a49..6268c106 100755 --- a/Tests/Model/RegisterErrorResponseTest.php +++ b/Tests/Model/RegisterErrorResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/RegisterRequestTest.php b/Tests/Model/RegisterRequestTest.php index 1ec07d06..9e5e9971 100755 --- a/Tests/Model/RegisterRequestTest.php +++ b/Tests/Model/RegisterRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ResetPasswordErrorResponseTest.php b/Tests/Model/ResetPasswordErrorResponseTest.php index 28ce007f..218908ad 100755 --- a/Tests/Model/ResetPasswordErrorResponseTest.php +++ b/Tests/Model/ResetPasswordErrorResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/ResetPasswordRequestTest.php b/Tests/Model/ResetPasswordRequestTest.php index e9a5b4b8..9e292fdf 100755 --- a/Tests/Model/ResetPasswordRequestTest.php +++ b/Tests/Model/ResetPasswordRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/SearchResponseTest.php b/Tests/Model/SearchResponseTest.php index 2513db83..94ea1dcb 100755 --- a/Tests/Model/SearchResponseTest.php +++ b/Tests/Model/SearchResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/StudioResponseTest.php b/Tests/Model/StudioResponseTest.php new file mode 100755 index 00000000..ef59057e --- /dev/null +++ b/Tests/Model/StudioResponseTest.php @@ -0,0 +1,166 @@ +object = $this->getMockBuilder(StudioResponse::class)->getMockForAbstractClass(); + } + + /** + * Clean up after running each test case. + */ + public function tearDown(): void + { + } + + /** + * Clean up after running all test cases. + */ + public static function tearDownAfterClass(): void + { + } + + /** + * @group integration + * + * @small + */ + public function testTestClassExists(): void + { + $this->assertTrue(class_exists(StudioResponse::class)); + $this->assertInstanceOf(StudioResponse::class, $this->object); + } + + /** + * Test attribute "id". + * + * @group unit + * + * @small + */ + public function testPropertyId(): void + { + $this->markTestSkipped('Test for property id not implemented'); + } + + /** + * Test attribute "name". + * + * @group unit + * + * @small + */ + public function testPropertyName(): void + { + $this->markTestSkipped('Test for property name not implemented'); + } + + /** + * Test attribute "description". + * + * @group unit + * + * @small + */ + public function testPropertyDescription(): void + { + $this->markTestSkipped('Test for property description not implemented'); + } + + /** + * Test attribute "is_public". + * + * @group unit + * + * @small + */ + public function testPropertyIsPublic(): void + { + $this->markTestSkipped('Test for property is_public not implemented'); + } + + /** + * Test attribute "enable_comments". + * + * @group unit + * + * @small + */ + public function testPropertyEnableComments(): void + { + $this->markTestSkipped('Test for property enable_comments not implemented'); + } + + /** + * Test attribute "image_path". + * + * @group unit + * + * @small + */ + public function testPropertyImagePath(): void + { + $this->markTestSkipped('Test for property image_path not implemented'); + } +} diff --git a/Tests/Model/SurveyResponseTest.php b/Tests/Model/SurveyResponseTest.php index 7018351b..e3d10afc 100755 --- a/Tests/Model/SurveyResponseTest.php +++ b/Tests/Model/SurveyResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/TagResponseTest.php b/Tests/Model/TagResponseTest.php index 9e7937ff..4697acf9 100755 --- a/Tests/Model/TagResponseTest.php +++ b/Tests/Model/TagResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpdateProjectErrorResponseTest.php b/Tests/Model/UpdateProjectErrorResponseTest.php index 47212319..04e35c0c 100755 --- a/Tests/Model/UpdateProjectErrorResponseTest.php +++ b/Tests/Model/UpdateProjectErrorResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpdateProjectFailureResponseTest.php b/Tests/Model/UpdateProjectFailureResponseTest.php index c7e69d9f..2c4132a8 100755 --- a/Tests/Model/UpdateProjectFailureResponseTest.php +++ b/Tests/Model/UpdateProjectFailureResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpdateProjectRequestTest.php b/Tests/Model/UpdateProjectRequestTest.php index 54ce243f..2599c84c 100755 --- a/Tests/Model/UpdateProjectRequestTest.php +++ b/Tests/Model/UpdateProjectRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpdateStudioErrorResponseTest.php b/Tests/Model/UpdateStudioErrorResponseTest.php new file mode 100755 index 00000000..9bd4fe64 --- /dev/null +++ b/Tests/Model/UpdateStudioErrorResponseTest.php @@ -0,0 +1,130 @@ +object = $this->getMockBuilder(UpdateStudioErrorResponse::class)->getMockForAbstractClass(); + } + + /** + * Clean up after running each test case. + */ + public function tearDown(): void + { + } + + /** + * Clean up after running all test cases. + */ + public static function tearDownAfterClass(): void + { + } + + /** + * @group integration + * + * @small + */ + public function testTestClassExists(): void + { + $this->assertTrue(class_exists(UpdateStudioErrorResponse::class)); + $this->assertInstanceOf(UpdateStudioErrorResponse::class, $this->object); + } + + /** + * Test attribute "name". + * + * @group unit + * + * @small + */ + public function testPropertyName(): void + { + $this->markTestSkipped('Test for property name not implemented'); + } + + /** + * Test attribute "description". + * + * @group unit + * + * @small + */ + public function testPropertyDescription(): void + { + $this->markTestSkipped('Test for property description not implemented'); + } + + /** + * Test attribute "image_file". + * + * @group unit + * + * @small + */ + public function testPropertyImageFile(): void + { + $this->markTestSkipped('Test for property image_file not implemented'); + } +} diff --git a/Tests/Model/UpdateUserErrorResponseTest.php b/Tests/Model/UpdateUserErrorResponseTest.php index 4a2badd9..ebb8a06f 100755 --- a/Tests/Model/UpdateUserErrorResponseTest.php +++ b/Tests/Model/UpdateUserErrorResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpdateUserRequestTest.php b/Tests/Model/UpdateUserRequestTest.php index 8a8f9a63..9e90b4dd 100755 --- a/Tests/Model/UpdateUserRequestTest.php +++ b/Tests/Model/UpdateUserRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UpgradeTokenRequestTest.php b/Tests/Model/UpgradeTokenRequestTest.php index 0a0ca53c..3d51ce21 100755 --- a/Tests/Model/UpgradeTokenRequestTest.php +++ b/Tests/Model/UpgradeTokenRequestTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/Tests/Model/UploadErrorResponseTest.php b/Tests/Model/UploadErrorResponseTest.php index 35a1053f..3325cdef 100755 --- a/Tests/Model/UploadErrorResponseTest.php +++ b/Tests/Model/UploadErrorResponseTest.php @@ -16,7 +16,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/autoload.php b/autoload.php index 1ad0f779..f39818be 100755 --- a/autoload.php +++ b/autoload.php @@ -5,7 +5,7 @@ * * API for the Catrobat Share Platform * - * The version of the OpenAPI document: v1.4.3 + * The version of the OpenAPI document: v1.6.0 * Contact: webmaster@catrobat.org * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -25,7 +25,7 @@ */ spl_autoload_register(function ($class) { // project-specific namespace prefix - $prefix = 'OpenAPI\\Server\\'; + $prefix = 'OpenAPI\Server\\'; // base directory for the namespace prefix $base_dir = __DIR__.'/'; diff --git a/docs/Api/StudioApiInterface.md b/docs/Api/StudioApiInterface.md new file mode 100755 index 00000000..fd2d0246 --- /dev/null +++ b/docs/Api/StudioApiInterface.md @@ -0,0 +1,136 @@ +# OpenAPI\Server\Api\StudioApiInterface + +All URIs are relative to *https://share.catrob.at/api* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**studioIdPut**](StudioApiInterface.md#studioIdPut) | **PUT** /studio/{id} | Update a Studio +[**studioPost**](StudioApiInterface.md#studioPost) | **POST** /studio | Create a new Studio + + +## Service Declaration +```yaml +# config/services.yaml +services: + # ... + Acme\MyBundle\Api\StudioApi: + tags: + - { name: "open_api_server.api", api: "studio" } + # ... +``` + +## **studioIdPut** +> OpenAPI\Server\Model\StudioResponse studioIdPut($id, $accept_language, $name, $description, $is_public, $enable_comments, $image_file) + +Update a Studio + +### Example Implementation +```php + OpenAPI\Server\Model\StudioResponse studioPost($accept_language, $name, $description, $is_public, $enable_comments, $image_file) + +Create a new Studio + +### Example Implementation +```php +