Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoiriert committed Apr 23, 2024
1 parent d4f737e commit be39fbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app/src/Entity/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'path_label' => 'User tags',
]
)]
#[Serializer\ExclusionPolicy('all')]
class Tag implements \Stringable, TranslatableInterface
{
use TranslatableTrait;
Expand All @@ -32,16 +33,19 @@ class Tag implements \Stringable, TranslatableInterface
ORM\GeneratedValue,
ORM\Column(name: 'id', type: 'bigint')
]
#[Serializer\Expose]
private ?int $id = null;

#[ORM\Column(unique: true)]
#[
Assert\NotNull,
Assert\Length(min: 3, max: 255)
]
#[Serializer\Expose]
private ?string $name = null;

#[ORM\Column(name: 'active', type: 'boolean', options: ['default' => 1])]
#[Serializer\Expose]
private bool $active = true;

public function getId(): ?int
Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/fixtures/api-doc-scope-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@
},
"Tag": {
"required": [
"label"
"name"
],
"type": "object",
"properties": {
Expand All @@ -1040,7 +1040,7 @@
"format": "int32",
"type": "integer"
},
"label": {
"name": {
"maxLength": 255,
"minLength": 3,
"type": "string"
Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/fixtures/api-doc-scope-tag.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
},
"Tag": {
"required": [
"label"
"name"
],
"type": "object",
"properties": {
Expand All @@ -332,7 +332,7 @@
"format": "int32",
"type": "integer"
},
"label": {
"name": {
"maxLength": 255,
"minLength": 3,
"type": "string"
Expand Down

0 comments on commit be39fbb

Please sign in to comment.