diff --git a/Api/StudioApiInterface.php b/Api/StudioApiInterface.php index b01e0622..ac9525e0 100755 --- a/Api/StudioApiInterface.php +++ b/Api/StudioApiInterface.php @@ -56,8 +56,8 @@ public function setBearerAuth(?string $value): void; * * @param string $id (required) * @param string $accept_language (optional, default to 'en') - * @param string|null $name The name of the studio (optional) - * @param string|null $description A small description about the Studio (optional) + * @param string|null $name The name of the studio (character: min 3, max 180) (optional) + * @param string|null $description A small description about the Studio (character: min 1, max 3000) (optional) * @param bool $is_public This flag sets the studios' visibility to public or private (optional, default to true) * @param bool $enable_comments This flag enables or disabled the possibility to add comments to the studio (optional, default to true) * @param UploadedFile|null $image_file Cover image; Size limit 1MB; Supported extensions are jpeg, png, webp; (optional) @@ -82,8 +82,8 @@ public function studioIdPut( * Create a new Studio * * @param string $accept_language (optional, default to 'en') - * @param string|null $name The name of the studio (optional) - * @param string|null $description A small description about the Studio (optional) + * @param string|null $name The name of the studio (character: min 3, max 180) (optional) + * @param string|null $description A small description about the Studio (character: min 1, max 3000) (optional) * @param bool $is_public This flag sets the studios' visibility to public or private (optional, default to true) * @param bool $enable_comments This flag enables or disabled the possibility to add comments to the studio (optional, default to true) * @param UploadedFile|null $image_file Cover image; Size limit 1MB; Supported extensions are jpeg, png, webp; (optional) diff --git a/Controller/StudioController.php b/Controller/StudioController.php index 120833c0..b13c41c1 100755 --- a/Controller/StudioController.php +++ b/Controller/StudioController.php @@ -110,24 +110,12 @@ public function studioIdPutAction(Request $request, $id) } $asserts = []; $asserts[] = new Assert\Type('string'); - $asserts[] = new Assert\Length([ - 'max' => 180, - ]); - $asserts[] = new Assert\Length([ - 'min' => 3, - ]); $response = $this->validate($name, $asserts); if ($response instanceof Response) { return $response; } $asserts = []; $asserts[] = new Assert\Type('string'); - $asserts[] = new Assert\Length([ - 'max' => 3000, - ]); - $asserts[] = new Assert\Length([ - 'min' => 1, - ]); $response = $this->validate($description, $asserts); if ($response instanceof Response) { return $response; @@ -243,24 +231,12 @@ public function studioPostAction(Request $request) } $asserts = []; $asserts[] = new Assert\Type('string'); - $asserts[] = new Assert\Length([ - 'max' => 180, - ]); - $asserts[] = new Assert\Length([ - 'min' => 3, - ]); $response = $this->validate($name, $asserts); if ($response instanceof Response) { return $response; } $asserts = []; $asserts[] = new Assert\Type('string'); - $asserts[] = new Assert\Length([ - 'max' => 3000, - ]); - $asserts[] = new Assert\Length([ - 'min' => 1, - ]); $response = $this->validate($description, $asserts); if ($response instanceof Response) { return $response; diff --git a/docs/Api/StudioApiInterface.md b/docs/Api/StudioApiInterface.md index 8b566cb7..665b2918 100755 --- a/docs/Api/StudioApiInterface.md +++ b/docs/Api/StudioApiInterface.md @@ -56,8 +56,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **string**| | **accept_language** | **string**| | [optional] [default to 'en'] - **name** | **string**| The name of the studio | [optional] - **description** | **string**| A small description about the Studio | [optional] + **name** | **string**| The name of the studio (character: min 3, max 180) | [optional] + **description** | **string**| A small description about the Studio (character: min 1, max 3000) | [optional] **is_public** | **bool**| This flag sets the studios' visibility to public or private | [optional] [default to true] **enable_comments** | **bool**| This flag enables or disabled the possibility to add comments to the studio | [optional] [default to true] **image_file** | **UploadedFile****UploadedFile**| Cover image; Size limit 1MB; Supported extensions are jpeg, png, webp; | [optional] @@ -113,8 +113,8 @@ class StudioApi implements StudioApiInterface Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **string**| | [optional] [default to 'en'] - **name** | **string**| The name of the studio | [optional] - **description** | **string**| A small description about the Studio | [optional] + **name** | **string**| The name of the studio (character: min 3, max 180) | [optional] + **description** | **string**| A small description about the Studio (character: min 1, max 3000) | [optional] **is_public** | **bool**| This flag sets the studios' visibility to public or private | [optional] [default to true] **enable_comments** | **bool**| This flag enables or disabled the possibility to add comments to the studio | [optional] [default to true] **image_file** | **UploadedFile****UploadedFile**| Cover image; Size limit 1MB; Supported extensions are jpeg, png, webp; | [optional]