-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
feat(doctrine): doctrine filters like laravel eloquent filters #6775
base: main
Are you sure you want to change the base?
feat(doctrine): doctrine filters like laravel eloquent filters #6775
Conversation
fd22d9c
to
93b3226
Compare
93b3226
to
6cfee88
Compare
@soyuka As requested, the swagger UI doc looks like this for the |
77cb4c6
to
fc7f5f1
Compare
@soyuka As requested, the swagger UI doc looks like this for the |
src/Metadata/Tests/Resource/Factory/ParameterResourceMetadataCollectionFactoryTests.php
Outdated
Show resolved
Hide resolved
2f4ec07
to
8f0620e
Compare
68d2dfb
to
3736645
Compare
3736645
to
74919ff
Compare
74919ff
to
4456cb1
Compare
4456cb1
to
7513e53
Compare
if (str_contains($parameter->getKey(), ':property')) { | ||
$properties = []; | ||
foreach (array_keys($parameter->getExtraProperties()['_properties'] ?? []) as $property) { | ||
$properties[] = [$property => ['type' => 'string', 'enum' => ['asc', 'desc']]]; | ||
} | ||
|
||
return ['type' => 'object', 'properties' => $properties]; | ||
} |
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.
We shouldn't need this as PropertyPlaceholderOpenApiParameterTrait alread declares a parameter per property. If this was for Validation we should move this to the ParameterValidationResourceMetadataCollectionFactory?
new OpenApiParameter(name: $key.'[strictly_after]', in: $in), | ||
new OpenApiParameter(name: $key.'[strictly_before]', in: $in), | ||
]; | ||
} | ||
} |
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 to self: we should probably log if a filter doesn't support the :property
placeholder.
7513e53
to
eb9277d
Compare
main
Completes #6749.
Goal:
Using Dotrine filters as we use Laravel Eloquent filters. Example using a
BooleanFilter
with Symfony and Doctrine:TODO:
Will be done in another PR: