mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Update index.rst (#2015)
Replace "Symfony\Component\Serializer\Annotation\Group" by "Symfony\Component\Serializer\Annotation\Groups"
This commit is contained in:
parent
1cf58fbae0
commit
3d38bba7cd
@ -306,13 +306,13 @@ properties and validator constraints. Take the model class below:
|
||||
|
||||
.. code-block:: php-annotations
|
||||
|
||||
use Symfony\Component\Serializer\Annotation\Group;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
class UserDto
|
||||
{
|
||||
/**
|
||||
* @Group({"default", "create", "update"})
|
||||
* @Groups({"default", "create", "update"})
|
||||
* @Assert\NotBlank(groups={"default", "create"})
|
||||
*/
|
||||
public string $username;
|
||||
@ -320,12 +320,12 @@ properties and validator constraints. Take the model class below:
|
||||
|
||||
.. code-block:: php-attributes
|
||||
|
||||
use Symfony\Component\Serializer\Annotation\Group;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
class UserDto
|
||||
{
|
||||
#[Group(["default", "create", "update"])
|
||||
#[Groups(["default", "create", "update"])
|
||||
#[Assert\NotBlank(groups: ["default", "create"])
|
||||
public string $username;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user