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..14370732 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; /** @@ -44,6 +45,7 @@ class BaseUser */ #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** @@ -51,6 +53,7 @@ class BaseUser */ #[Assert\Type('string')] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -58,6 +61,7 @@ class BaseUser */ #[Assert\Type('string')] #[SerializedName('password')] + #[Type('string')] protected ?string $password = null; /** @@ -65,6 +69,7 @@ class BaseUser */ #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** @@ -72,13 +77,15 @@ class BaseUser */ #[Assert\Type('string')] #[SerializedName('about')] + #[Type('string')] protected ?string $about = null; /** * A short description about the project the user is currently working on. */ #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] + #[SerializedName('currently_working_on')] + #[Type('string')] protected ?string $currently_working_on = null; /** diff --git a/Model/BasicUserDataResponse.php b/Model/BasicUserDataResponse.php index eac5c62b..c5375316 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; /** @@ -44,6 +45,7 @@ class BasicUserDataResponse */ #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; /** @@ -51,6 +53,7 @@ class BasicUserDataResponse */ #[Assert\Type('string')] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -58,6 +61,7 @@ class BasicUserDataResponse */ #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** @@ -65,13 +69,15 @@ class BasicUserDataResponse */ #[Assert\Type('string')] #[SerializedName('about')] + #[Type('string')] protected ?string $about = null; /** * A short description about the project the user is currently working on. */ #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] + #[SerializedName('currently_working_on')] + #[Type('string')] protected ?string $currently_working_on = null; /** @@ -79,6 +85,7 @@ class BasicUserDataResponse */ #[Assert\Type('int')] #[SerializedName('projects')] + #[Type('int')] protected ?int $projects = null; /** @@ -86,6 +93,7 @@ class BasicUserDataResponse */ #[Assert\Type('int')] #[SerializedName('followers')] + #[Type('int')] protected ?int $followers = null; /** @@ -93,6 +101,7 @@ class BasicUserDataResponse */ #[Assert\Type('int')] #[SerializedName('following')] + #[Type('int')] protected ?int $following = null; /** @@ -100,6 +109,7 @@ class BasicUserDataResponse */ #[Assert\Type('int')] #[SerializedName('ranking_score')] + #[Type('int')] protected ?int $ranking_score = null; /** diff --git a/Model/CreateStudioErrorResponse.php b/Model/CreateStudioErrorResponse.php new file mode 100755 index 00000000..31458d45 --- /dev/null +++ b/Model/CreateStudioErrorResponse.php @@ -0,0 +1,134 @@ +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..75980d73 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,11 @@ class DryRun { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. */ #[Assert\Type('bool')] - #[SerializedName('dry-run')] + #[SerializedName('dry_run')] + #[Type('bool')] protected ?bool $dry_run = false; /** @@ -69,7 +71,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..1f901eb8 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; /** @@ -44,6 +45,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; /** @@ -51,6 +53,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('string')] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -58,6 +61,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** @@ -65,13 +69,15 @@ class ExtendedUserDataResponse */ #[Assert\Type('string')] #[SerializedName('about')] + #[Type('string')] protected ?string $about = null; /** * A short description about the project the user is currently working on. */ #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] + #[SerializedName('currently_working_on')] + #[Type('string')] protected ?string $currently_working_on = null; /** @@ -79,6 +85,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('int')] #[SerializedName('projects')] + #[Type('int')] protected ?int $projects = null; /** @@ -86,6 +93,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('int')] #[SerializedName('followers')] + #[Type('int')] protected ?int $followers = null; /** @@ -93,6 +101,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('int')] #[SerializedName('following')] + #[Type('int')] protected ?int $following = null; /** @@ -100,6 +109,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('int')] #[SerializedName('ranking_score')] + #[Type('int')] protected ?int $ranking_score = null; /** @@ -107,6 +117,7 @@ class ExtendedUserDataResponse */ #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** diff --git a/Model/ExtensionResponse.php b/Model/ExtensionResponse.php index bf9619d5..dcfc1ba9 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; /** @@ -44,6 +45,7 @@ class ExtensionResponse */ #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; /** @@ -51,6 +53,7 @@ class ExtensionResponse */ #[Assert\Type('string')] #[SerializedName('text')] + #[Type('string')] protected ?string $text = null; /** diff --git a/Model/FeaturedProjectResponse.php b/Model/FeaturedProjectResponse.php index dd3d4e89..e5201395 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; /** @@ -41,30 +42,37 @@ class FeaturedProjectResponse { #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; #[Assert\Type('string')] #[SerializedName('project_id')] + #[Type('string')] protected ?string $project_id = null; #[Assert\Type('string')] #[SerializedName('project_url')] + #[Type('string')] protected ?string $project_url = null; #[Assert\Type('string')] #[SerializedName('url')] + #[Type('string')] protected ?string $url = null; #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; #[Assert\Type('string')] #[SerializedName('author')] + #[Type('string')] protected ?string $author = null; #[Assert\Type('string')] #[SerializedName('featured_image')] + #[Type('string')] protected ?string $featured_image = null; /** diff --git a/Model/JWTResponse.php b/Model/JWTResponse.php index f5e70e54..9eca6cf9 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; /** @@ -41,10 +42,12 @@ class JWTResponse { #[Assert\Type('string')] #[SerializedName('token')] + #[Type('string')] protected ?string $token = null; #[Assert\Type('string')] #[SerializedName('refresh_token')] + #[Type('string')] protected ?string $refresh_token = null; /** diff --git a/Model/LoginRequest.php b/Model/LoginRequest.php index 00fabc28..015aad12 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; /** @@ -46,6 +47,7 @@ class LoginRequest #[Assert\Length(max: 180)] #[Assert\Length(min: 3)] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -55,6 +57,7 @@ class LoginRequest #[Assert\Length(max: 4096)] #[Assert\Length(min: 6)] #[SerializedName('password')] + #[Type('string')] protected ?string $password = null; /** diff --git a/Model/MediaCategoryResponse.php b/Model/MediaCategoryResponse.php index 4018872f..897c1ba4 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; /** @@ -44,6 +45,7 @@ class MediaCategoryResponse */ #[Assert\Type('int')] #[SerializedName('id')] + #[Type('int')] protected ?int $id = null; /** @@ -51,6 +53,7 @@ class MediaCategoryResponse */ #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** @@ -59,6 +62,7 @@ class MediaCategoryResponse #[Assert\Type('int')] #[Assert\GreaterThanOrEqual(0)] #[SerializedName('priority')] + #[Type('int')] protected ?int $priority = null; /** diff --git a/Model/MediaFileResponse.php b/Model/MediaFileResponse.php index c07375ae..7d631ada 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 */ @@ -42,52 +42,60 @@ class MediaFileResponse { #[Assert\Type('int')] #[SerializedName('id')] + #[Type('int')] protected ?int $id = null; #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** * @var string[]|null + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * @Assert\Type("string") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] #[SerializedName('flavors')] + #[Type('array')] protected ?array $flavors = null; /** * @var string[]|null + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * @Assert\Type("string") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] #[SerializedName('packages')] + #[Type('array')] protected ?array $packages = null; #[Assert\Type('string')] #[SerializedName('category')] + #[Type('string')] protected ?string $category = null; #[Assert\Type('string')] #[SerializedName('author')] + #[Type('string')] protected ?string $author = null; #[Assert\Type('string')] #[SerializedName('extension')] + #[Type('string')] protected ?string $extension = null; #[Assert\Type('string')] #[SerializedName('download_url')] + #[Type('string')] protected ?string $download_url = null; /** @@ -95,6 +103,7 @@ class MediaFileResponse */ #[Assert\Type('int')] #[SerializedName('size')] + #[Type('int')] protected ?int $size = null; /** @@ -103,6 +112,7 @@ class MediaFileResponse #[Assert\Choice(['project', 'image', 'sound', 'video', 'other'])] #[Assert\Type('string')] #[SerializedName('file_type')] + #[Type('string')] protected ?string $file_type = null; /** diff --git a/Model/MediaPackageResponse.php b/Model/MediaPackageResponse.php index c7fca79b..55245370 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; /** @@ -44,6 +45,7 @@ class MediaPackageResponse */ #[Assert\Type('int')] #[SerializedName('id')] + #[Type('int')] protected ?int $id = null; /** @@ -51,6 +53,7 @@ class MediaPackageResponse */ #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** @@ -58,19 +61,21 @@ class MediaPackageResponse */ #[Assert\Type('string')] #[SerializedName('url')] + #[Type('string')] protected ?string $url = null; /** * @var array[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\MediaCategoryResponse") + * }) + * @Assert\Type("OpenAPI\Server\Model\MediaCategoryResponse") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\MediaCategoryResponse', - ], - ], - ])] #[SerializedName('categories')] + #[Type('array')] protected ?array $categories = null; /** diff --git a/Model/NotificationContent.php b/Model/NotificationContent.php index 9a63b8e5..6b45e40b 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; /** @@ -45,6 +46,7 @@ class NotificationContent #[Assert\Type('string')] #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] #[SerializedName('from')] + #[Type('string')] protected ?string $from = null; /** @@ -52,6 +54,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('from_name')] + #[Type('string')] protected ?string $from_name = null; /** @@ -60,6 +63,7 @@ class NotificationContent #[Assert\Type('string')] #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] #[SerializedName('program')] + #[Type('string')] protected ?string $program = null; /** @@ -67,6 +71,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('program_name')] + #[Type('string')] protected ?string $program_name = null; /** @@ -74,6 +79,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('avatar')] + #[Type('string')] protected ?string $avatar = null; /** @@ -82,6 +88,7 @@ class NotificationContent #[Assert\Type('string')] #[Assert\Regex('/^[a-zA-Z0-9\\\-]+$/')] #[SerializedName('remixed_program')] + #[Type('string')] protected ?string $remixed_program = null; /** @@ -89,6 +96,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('remixed_program_name')] + #[Type('string')] protected ?string $remixed_program_name = null; /** @@ -96,6 +104,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('message')] + #[Type('string')] protected ?string $message = null; /** @@ -103,6 +112,7 @@ class NotificationContent */ #[Assert\Type('string')] #[SerializedName('prize')] + #[Type('string')] protected ?string $prize = null; /** diff --git a/Model/NotificationResponse.php b/Model/NotificationResponse.php index c707703f..739b9b06 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 */ @@ -43,15 +43,17 @@ class NotificationResponse /** * Id of the notification. */ - #[SerializedName('id')] #[Assert\Type('int')] + #[SerializedName('id')] + #[Type('int')] protected ?int $id = null; /** * Notification Type. */ - #[SerializedName('type')] #[Assert\Type('string')] + #[SerializedName('type')] + #[Type('string')] protected ?string $type = null; /** @@ -59,19 +61,21 @@ class NotificationResponse */ #[Assert\Type('bool')] #[SerializedName('seen')] + #[Type('bool')] protected ?bool $seen = null; /** * @var NotificationContent[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\NotificationContent") + * }) + * @Assert\Type("OpenAPI\Server\Model\NotificationContent") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\NotificationContent', - ], - ], - ])] #[SerializedName('content')] + #[Type('array')] protected ?array $content = null; /** diff --git a/Model/NotificationsCountResponse.php b/Model/NotificationsCountResponse.php index 4e8cb099..23e9f7e5 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; /** @@ -41,22 +42,27 @@ class NotificationsCountResponse { #[Assert\Type('int')] #[SerializedName('total')] + #[Type('int')] protected ?int $total = null; #[Assert\Type('int')] #[SerializedName('like')] + #[Type('int')] protected ?int $like = null; #[Assert\Type('int')] #[SerializedName('follower')] + #[Type('int')] protected ?int $follower = null; #[Assert\Type('int')] #[SerializedName('comment')] + #[Type('int')] protected ?int $comment = null; #[Assert\Type('int')] #[SerializedName('remix')] + #[Type('int')] protected ?int $remix = null; /** diff --git a/Model/OAuthLoginRequest.php b/Model/OAuthLoginRequest.php index 61b48a73..c0aa581e 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; /** @@ -44,6 +45,7 @@ class OAuthLoginRequest */ #[Assert\Type('string')] #[SerializedName('id_token')] + #[Type('string')] protected ?string $id_token = null; /** @@ -51,6 +53,7 @@ class OAuthLoginRequest */ #[Assert\Type('string')] #[SerializedName('resource_owner')] + #[Type('string')] protected ?string $resource_owner = null; /** diff --git a/Model/ProjectReportRequest.php b/Model/ProjectReportRequest.php index 4f252e9f..50a22bbf 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; /** @@ -42,6 +43,7 @@ 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')] + #[Type('string')] protected ?string $category = null; /** diff --git a/Model/ProjectResponse.php b/Model/ProjectResponse.php index 99831c84..b52df4cf 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; /** @@ -44,6 +45,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; /** @@ -51,6 +53,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** @@ -58,6 +61,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('author')] + #[Type('string')] protected ?string $author = null; /** @@ -65,6 +69,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('description')] + #[Type('string')] protected ?string $description = null; /** @@ -72,6 +77,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('credits')] + #[Type('string')] protected ?string $credits = null; /** @@ -79,6 +85,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('version')] + #[Type('string')] protected ?string $version = null; /** @@ -86,6 +93,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('views')] + #[Type('int')] protected ?int $views = null; /** @@ -93,6 +101,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('download')] + #[Type('int')] protected ?int $download = null; /** @@ -100,6 +109,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('downloads')] + #[Type('int')] protected ?int $downloads = null; /** @@ -107,6 +117,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('reactions')] + #[Type('int')] protected ?int $reactions = null; /** @@ -114,6 +125,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('comments')] + #[Type('int')] protected ?int $comments = null; /** @@ -121,25 +133,28 @@ class ProjectResponse */ #[Assert\Type('bool')] #[SerializedName('private')] + #[Type('bool')] protected ?bool $private = null; #[Assert\Type('string')] #[SerializedName('flavor')] + #[Type('string')] protected ?string $flavor = null; /** * Tags allow projects to be categorized by their creators. * * @var string[]|null + * + * @Assert\All({ + * + * @Assert\Type("string") + * }) + * @Assert\Type("string") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'string', - ], - ], - ])] #[SerializedName('tags')] + #[Type('array')] protected ?array $tags = null; /** @@ -147,6 +162,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('uploaded')] + #[Type('int')] protected ?int $uploaded = null; /** @@ -154,14 +170,17 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('uploaded_string')] + #[Type('string')] protected ?string $uploaded_string = null; #[Assert\Type('string')] #[SerializedName('screenshot_large')] + #[Type('string')] protected ?string $screenshot_large = null; #[Assert\Type('string')] #[SerializedName('screenshot_small')] + #[Type('string')] protected ?string $screenshot_small = null; /** @@ -169,6 +188,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('project_url')] + #[Type('string')] protected ?string $project_url = null; /** @@ -176,6 +196,7 @@ class ProjectResponse */ #[Assert\Type('string')] #[SerializedName('download_url')] + #[Type('string')] protected ?string $download_url = null; /** @@ -183,6 +204,7 @@ class ProjectResponse */ #[Assert\Type('float')] #[SerializedName('filesize')] + #[Type('float')] protected ?float $filesize = null; /** @@ -190,6 +212,7 @@ class ProjectResponse */ #[Assert\Type('int')] #[SerializedName('not_for_kids')] + #[Type('int')] protected ?int $not_for_kids = null; /** diff --git a/Model/ProjectsCategory.php b/Model/ProjectsCategory.php index 1810fe37..63c8ba68 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 */ @@ -45,6 +45,7 @@ class ProjectsCategory */ #[Assert\Type('string')] #[SerializedName('type')] + #[Type('string')] protected ?string $type = null; /** @@ -52,21 +53,39 @@ class ProjectsCategory */ #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** - * Array of projects. + * Array of projects (deprecated - use projects_list). * * @var ProjectResponse[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\ProjectResponse', - ], - ], - ])] #[SerializedName('projectsList')] + #[Type('array')] + protected ?array $projects_list = null; + + /** + * Array of projects. + * + * @var ProjectResponse[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + */ + #[SerializedName('projects_list')] + #[Type('array')] protected ?array $projects_list = null; /** @@ -80,6 +99,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 +157,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..3468cd98 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; /** @@ -41,6 +42,7 @@ class RefreshRequest { #[Assert\Type('string')] #[SerializedName('refresh_token')] + #[Type('string')] protected ?string $refresh_token = null; /** diff --git a/Model/RegisterErrorResponse.php b/Model/RegisterErrorResponse.php index 96b3a927..e4496342 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; /** @@ -42,16 +43,19 @@ class RegisterErrorResponse #[Assert\Choice(['Email already in use', 'Email invalid', 'Email missing'])] #[Assert\Type('string')] #[SerializedName('email')] + #[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')] + #[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')] + #[Type('string')] protected ?string $password = null; /** diff --git a/Model/RegisterRequest.php b/Model/RegisterRequest.php index cd820188..c5e0b007 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,10 +41,11 @@ class RegisterRequest { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. */ #[Assert\Type('bool')] - #[SerializedName('dry-run')] + #[SerializedName('dry_run')] + #[Type('bool')] protected ?bool $dry_run = false; /** @@ -51,6 +53,7 @@ class RegisterRequest */ #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** @@ -58,6 +61,7 @@ class RegisterRequest */ #[Assert\Type('string')] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -65,6 +69,7 @@ class RegisterRequest */ #[Assert\Type('string')] #[SerializedName('password')] + #[Type('string')] protected ?string $password = null; /** @@ -72,6 +77,7 @@ class RegisterRequest */ #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** @@ -79,13 +85,15 @@ class RegisterRequest */ #[Assert\Type('string')] #[SerializedName('about')] + #[Type('string')] protected ?string $about = null; /** * A short description about the project the user is currently working on. */ #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] + #[SerializedName('currently_working_on')] + #[Type('string')] protected ?string $currently_working_on = null; /** @@ -117,7 +125,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..da128d8a 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; /** @@ -42,6 +43,7 @@ class ResetPasswordErrorResponse #[Assert\Choice(['Email invalid', 'Email missing'])] #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** diff --git a/Model/ResetPasswordRequest.php b/Model/ResetPasswordRequest.php index 2feeceff..a09ecca0 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; /** @@ -44,6 +45,7 @@ class ResetPasswordRequest */ #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** diff --git a/Model/SearchResponse.php b/Model/SearchResponse.php index 31e9f1b7..5a3dc690 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,42 @@ class SearchResponse * Array of projects. * * @var ProjectResponse[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) + * @Assert\Type("OpenAPI\Server\Model\ProjectResponse") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\ProjectResponse', - ], - ], - ])] #[SerializedName('projects')] + #[Type('array')] protected ?array $projects = null; #[Assert\Type('int')] #[SerializedName('projects_total')] + #[Type('int')] protected ?int $projects_total = null; /** * Array of users. * * @var BasicUserDataResponse[]|null + * + * @Assert\All({ + * + * @Assert\Type("OpenAPI\Server\Model\BasicUserDataResponse") + * }) + * @Assert\Type("OpenAPI\Server\Model\BasicUserDataResponse") + * }) */ - #[Assert\All([ - 'constraints' => [ - [ - 'type' => 'OpenAPI\Server\Model\BasicUserDataResponse', - ], - ], - ])] #[SerializedName('users')] + #[Type('array')] protected ?array $users = null; #[Assert\Type('int')] #[SerializedName('users_total')] + #[Type('int')] protected ?int $users_total = null; /** diff --git a/Model/StudioResponse.php b/Model/StudioResponse.php new file mode 100755 index 00000000..016e4b91 --- /dev/null +++ b/Model/StudioResponse.php @@ -0,0 +1,239 @@ +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..f6ef11ef 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; /** @@ -44,6 +45,7 @@ class SurveyResponse */ #[Assert\Type('string')] #[SerializedName('url')] + #[Type('string')] protected ?string $url = null; /** diff --git a/Model/TagResponse.php b/Model/TagResponse.php index f96dad20..d645d818 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; /** @@ -44,6 +45,7 @@ class TagResponse */ #[Assert\Type('string')] #[SerializedName('id')] + #[Type('string')] protected ?string $id = null; /** @@ -51,6 +53,7 @@ class TagResponse */ #[Assert\Type('string')] #[SerializedName('text')] + #[Type('string')] protected ?string $text = null; /** diff --git a/Model/UpdateProjectErrorResponse.php b/Model/UpdateProjectErrorResponse.php index 24750cdc..1a6fb26c 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; /** @@ -42,21 +43,25 @@ class UpdateProjectErrorResponse #[Assert\Choice(['Name empty', 'Name too long'])] #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; #[Assert\Choice(['Description too long'])] #[Assert\Type('string')] #[SerializedName('description')] + #[Type('string')] protected ?string $description = null; #[Assert\Choice(['Credits too long'])] #[Assert\Type('string')] #[SerializedName('credits')] + #[Type('string')] protected ?string $credits = null; #[Assert\Choice(['Project screenshot invalid or not supported'])] #[Assert\Type('string')] #[SerializedName('screenshot')] + #[Type('string')] protected ?string $screenshot = null; /** diff --git a/Model/UpdateProjectFailureResponse.php b/Model/UpdateProjectFailureResponse.php index 1c96c2bc..6f28d267 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; /** @@ -42,6 +43,7 @@ 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')] + #[Type('string')] protected ?string $error = null; /** diff --git a/Model/UpdateProjectRequest.php b/Model/UpdateProjectRequest.php index b7bfaa57..d3bfbc37 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; /** @@ -44,6 +45,7 @@ class UpdateProjectRequest */ #[Assert\Type('string')] #[SerializedName('name')] + #[Type('string')] protected ?string $name = null; /** @@ -51,6 +53,7 @@ class UpdateProjectRequest */ #[Assert\Type('string')] #[SerializedName('description')] + #[Type('string')] protected ?string $description = null; /** @@ -58,6 +61,7 @@ class UpdateProjectRequest */ #[Assert\Type('string')] #[SerializedName('credits')] + #[Type('string')] protected ?string $credits = null; /** @@ -65,6 +69,7 @@ class UpdateProjectRequest */ #[Assert\Type('bool')] #[SerializedName('private')] + #[Type('bool')] protected ?bool $private = null; /** @@ -72,6 +77,7 @@ class UpdateProjectRequest */ #[Assert\Type('string')] #[SerializedName('screenshot')] + #[Type('string')] protected ?string $screenshot = null; /** diff --git a/Model/UpdateStudioErrorResponse.php b/Model/UpdateStudioErrorResponse.php new file mode 100755 index 00000000..3aea2de6 --- /dev/null +++ b/Model/UpdateStudioErrorResponse.php @@ -0,0 +1,134 @@ +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..f8710a2a 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; /** @@ -42,26 +43,31 @@ class UpdateUserErrorResponse #[Assert\Choice(['Email already in use', 'Email invalid'])] #[Assert\Type('string')] #[SerializedName('email')] + #[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')] + #[Type('string')] protected ?string $username = null; #[Assert\Choice(['Password too short', 'Password too long', 'Password contains invalid chars'])] #[Assert\Type('string')] #[SerializedName('password')] + #[Type('string')] protected ?string $password = null; #[Assert\Choice(['Current password is missing', 'Current password is wrong'])] #[Assert\Type('string')] - #[SerializedName('currentPassword')] + #[SerializedName('current_password')] + #[Type('string')] protected ?string $current_password = null; #[Assert\Choice(['Profile picture invalid or not supported'])] #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** diff --git a/Model/UpdateUserRequest.php b/Model/UpdateUserRequest.php index f468b6e3..13198390 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,10 +41,11 @@ class UpdateUserRequest { /** - * Indicates wether a request should only be verified or executed. + * Indicates if a request should only be verified or executed. */ #[Assert\Type('bool')] - #[SerializedName('dry-run')] + #[SerializedName('dry_run')] + #[Type('bool')] protected ?bool $dry_run = false; /** @@ -51,6 +53,7 @@ class UpdateUserRequest */ #[Assert\Type('string')] #[SerializedName('email')] + #[Type('string')] protected ?string $email = null; /** @@ -58,6 +61,7 @@ class UpdateUserRequest */ #[Assert\Type('string')] #[SerializedName('username')] + #[Type('string')] protected ?string $username = null; /** @@ -65,6 +69,7 @@ class UpdateUserRequest */ #[Assert\Type('string')] #[SerializedName('password')] + #[Type('string')] protected ?string $password = null; /** @@ -72,6 +77,7 @@ class UpdateUserRequest */ #[Assert\Type('string')] #[SerializedName('picture')] + #[Type('string')] protected ?string $picture = null; /** @@ -79,20 +85,23 @@ class UpdateUserRequest */ #[Assert\Type('string')] #[SerializedName('about')] + #[Type('string')] protected ?string $about = null; /** * A short description about the project the user is currently working on. */ #[Assert\Type('string')] - #[SerializedName('currentlyWorkingOn')] + #[SerializedName('currently_working_on')] + #[Type('string')] protected ?string $currently_working_on = null; /** * The current password of the user. Required for changing the password. */ #[Assert\Type('string')] - #[SerializedName('currentPassword')] + #[SerializedName('current_password')] + #[Type('string')] protected ?string $current_password = null; /** @@ -125,7 +134,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..879edd81 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; /** @@ -41,6 +42,7 @@ class UpgradeTokenRequest { #[Assert\Type('string')] #[SerializedName('upload_token')] + #[Type('string')] protected ?string $upload_token = null; /** diff --git a/Model/UploadErrorResponse.php b/Model/UploadErrorResponse.php index d844f6f0..652e1c42 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; /** @@ -41,6 +42,7 @@ class UploadErrorResponse { #[Assert\Type('string')] #[SerializedName('error')] + #[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/composer.json b/composer.json index 7b12c8e6..7d4d82a3 100755 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "phpstan/phpstan": "*", "symfony/browser-kit": "^6.4|^7.0", "symfony/yaml": "^6.4|^7.0", - "hoa/regex": "~1.0" + "hoa/regex": "~1.0", + "rector/rector": "^1.2" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 9d4d3fdb..1d8baa69 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0ba3712de153b871104e0c9b6f06bc89", + "content-hash": "0bf14ef829d5eccc1573970075c294bb", "packages": [ { "name": "doctrine/instantiator", @@ -5264,6 +5264,65 @@ ], "time": "2023-06-16T10:52:11+00:00" }, + { + "name": "rector/rector", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "044e6364017882d1e346da8690eeabc154da5495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/044e6364017882d1e346da8690eeabc154da5495", + "reference": "044e6364017882d1e346da8690eeabc154da5495", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.11" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "suggest": { + "ext-dom": "To manipulate phpunit.xml via the custom-rule command" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "keywords": [ + "automation", + "dev", + "migration", + "refactoring" + ], + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2024-07-25T07:44:34+00:00" + }, { "name": "sebastian/cli-parser", "version": "3.0.1", 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 +withPaths([ + __DIR__.'/Model', + ]) + ->withSets([ + Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES, + Rector\Symfony\Set\SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES, + Rector\Symfony\Set\SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES, + Rector\Symfony\Set\JMSSetList::ANNOTATIONS_TO_ATTRIBUTES, + ]) +;