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(jsonschema): hashmaps produces invalid openapi schema (#6830)
* fix(jsonschema): hashmaps produces invalid openapi schema
* fix
---------
Co-authored-by: soyuka <[email protected]>
* fix: add missing error normalizer trait and remove deprecated interface (#6853)
* fix: test empty parameter against null (#6852)
fixes#6844
* Fix deprecation symfony/dependency-injection
* cs: run php-cs-fixer
* ci: use problem error normalizer trait
* 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:
---------
Co-authored-by: Vincent Amstoutz <[email protected]>
Co-authored-by: mladencosa <[email protected]>
Co-authored-by: Michiel Kalle <[email protected]>
Copy file name to clipboardExpand all lines: features/filter/filter_validation.feature
+4-4
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"
* Gets the JSON Schema document which specifies the data type corresponding to the given PHP class, and recursively adds needed new schema to the current schema if provided.
199
201
*
200
202
* Note: if the class is not part of exceptions listed above, any class is considered as a resource.
if (true !== $readableLink && $this->isResourceClass($className)) {
263
+
if (true !== $readableLink && $isResourceClass) {
259
264
return [
260
265
'type' => 'string',
261
266
'format' => 'iri-reference',
262
267
'example' => 'https://example.com/',
263
268
];
264
269
}
265
270
266
-
// TODO: add propertyNameCollectionFactory and recurse to find the underlying schema? Right now SchemaFactory does the job so we don't compute anything here.
0 commit comments