-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-6620: Added image criterions rest input parsers #76
Conversation
a9de947
to
a5b1fc4
Compare
fc311c1
to
2f68cda
Compare
2f68cda
to
a7acb74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no associated tests. Can we get integration tests for those, on specific service level at least - with validation failures especially?
} | ||
|
||
/** | ||
* @param array<mixed> $data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
Optional.
You can use @phpstan-assert
to inform static analysis about the expected shape of data after validation.
See https://phpstan.org/writing-php-code/narrowing-types#custom-type-checking-functions-and-methods for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed with the dev team, tests coverage will be added later.
a7acb74
to
bd450a6
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
v4.6
This PR adds new criteria parsers that allows to search images by REST.
Examples:
FileSize criterion:
Criterion to filter by image size.
min
- Optional, minimum file size in MBmax
- Optional maximum file size in MBMimeType criterion:
Criterion to filter by image mime type.
type
- string or arrayOR
Orientation criterion:
Criterion to filter by image orientation.
orientation
- string or array. Allowed orientation types: portrait, landscape, square.OR
Dimensions criterion:
Composite criterion to filter by image dimensions.
Allowed criteria width, height. All criteria are optional.
min
- Optional, minimum value in pixelmax
- Optional, maximum value in pixelImage criterion:
Composite criterion to filter by image attributes.
Allowed criteria mimeTypes, size,width, height,orientation. All criteria are optional.
min
- Optional, minimum value in pixel or MBmax
- Optional, maximum value in pixel or MBOR
TODO:
$ composer fix-cs
).