Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yceruto committed Jan 6, 2024
1 parent 0dc0030 commit c68891d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class PostResourceBody
#[Property(minLength: 3)]
public string $name;

#[Property]
public ResourceStatus $status;
#[Property(enum: ResourceStatus::class)]
public string $status;
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type":"https:\/\/symfony.com\/errors\/validation","title":"Validation Failed","status":422,"detail":"status: This value should be of type OpenSolid\\Tests\\OpenApiBundle\\Functional\\App\\PostResourceAction\\Model\\ResourceStatus.","violations":[{"propertyPath":"status","title":"This value should be of type OpenSolid\\Tests\\OpenApiBundle\\Functional\\App\\PostResourceAction\\Model\\ResourceStatus.","template":"This value should be of type {{ type }}.","parameters":{"{{ type }}":"OpenSolid\\Tests\\OpenApiBundle\\Functional\\App\\PostResourceAction\\Model\\ResourceStatus","hint":"The data must belong to a backed enumeration of type OpenSolid\\Tests\\OpenApiBundle\\Functional\\App\\PostResourceAction\\Model\\ResourceStatus"}}]}
{"type":"https:\/\/symfony.com\/errors\/validation","title":"Validation Failed","status":422,"detail":"name: This value is too short. It should have 3 characters or more.\nstatus: The value you selected is not a valid choice.","violations":[{"propertyPath":"name","title":"This value is too short. It should have 3 characters or more.","template":"This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.","parameters":{"{{ value }}":"\"fo\"","{{ limit }}":"3","{{ value_length }}":"2"},"type":"urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45"},{"propertyPath":"status","title":"The value you selected is not a valid choice.","template":"The value you selected is not a valid choice.","parameters":{"{{ value }}":"\"dra\"","{{ choices }}":"\"draft\", \"published\""},"type":"urn:uuid:8e179f1b-97aa-4560-a02f-2a8b42e49df7"}]}

0 comments on commit c68891d

Please sign in to comment.