You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(metadata): various parameter improvements (#6867)
- `Parameter::getValue()` now takes a default value as argument `getValue(mixed $default = new ParameterNotFound()): mixed`
- `Parametes::get(string $key, string $parameterClass = QueryParameter::class)` (but also `has` and `remove`) now has a default value as second argument to `QueryParameter::class`
- Constraint violation had the wrong message when using `property`, fixed by using the `key` instead:
Copy file name to clipboardExpand all lines: features/filter/filter_validation.feature
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,15 @@ Feature: Validate filters based upon filter description
25
25
Scenario: Required filter should throw an error if not set
26
26
When I am on "/array_filter_validators"
27
27
Then the response status code should be 422
28
-
And the JSON node "detail" should be equal to 'arrayRequired: This value should not be blank.\nindexedArrayRequired: This value should not be blank.'
28
+
And the JSON node "detail" should be equal to 'arrayRequired[]: This value should not be blank.\nindexedArrayRequired[foo]: This value should not be blank.'
29
29
30
30
When I am on "/array_filter_validators?arrayRequired[foo]=foo"
31
31
Then the response status code should be 422
32
-
And the JSON node "detail" should be equal to 'indexedArrayRequired: This value should not be blank.'
32
+
And the JSON node "detail" should be equal to 'indexedArrayRequired[foo]: This value should not be blank.'
33
33
34
34
When I am on "/array_filter_validators?arrayRequired[]=foo"
35
35
Then the response status code should be 422
36
-
And the JSON node "detail" should be equal to 'indexedArrayRequired: This value should not be blank.'
36
+
And the JSON node "detail" should be equal to 'indexedArrayRequired[foo]: This value should not be blank.'
37
37
38
38
Scenario: Test filter bounds: maximum
39
39
When I am on "/filter_validators?required=foo&required-allow-empty&maximum=10"
@@ -49,7 +49,7 @@ Feature: Validate filters based upon filter description
49
49
50
50
When I am on "/filter_validators?required=foo&required-allow-empty&exclusiveMaximum=10"
51
51
Then the response status code should be 422
52
-
And the JSON node "detail" should be equal to 'maximum: This value should be less than 10.'
52
+
And the JSON node "detail" should be equal to 'exclusiveMaximum: This value should be less than 10.'
53
53
54
54
Scenario: Test filter bounds: minimum
55
55
When I am on "/filter_validators?required=foo&required-allow-empty&minimum=5"
0 commit comments