-
-
Notifications
You must be signed in to change notification settings - Fork 933
Description
API Platform version(s) affected: 3.1.2
Description
In the PropertyFilter.php::getDescription
method a nice description is generated, but this message doesn't appear in openapi docs.
How to reproduce
Create resource with GetCollection and add a PropertyFilter
#[ApiResource(operations: [new GetCollection(security: 'is_granted("USER")')])]
#[ApiFilter(PropertyFilter::class, arguments: [])]
The parameter description of this field isn't displayed in openapi docs
Possible Solution
In OpenApiFactory.php::getFiltersParameters
the description is retrieved for each filter. There the property $data['description']
is used as description for the filter. The PropertyFilter.php
however returns $data['openapi']['description'] and $data['swagger']['description']. These properties aren't used and get lost. A solution would be to also set the $data['description']
property in PropertyFilter.