Description
Deprecations are presented as replacement for api versioning.
ApiPlatform provide way to deprecate both Resource, Operation and Properties.
But I was not able to find any way to deprecate Filters, although this is often something that may evolve.
Example
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
+ use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\RangeFilter;
/**
* @ApiResource()
- * @ApiFilter(SearchFilter::class, properties={"id": "exact", "price": "exact", "description": "partial"})
+ * @ApiFilter(SearchFilter::class, properties={"description": "partial"})
+ * @ApiFilter(RangeFilter::class, properties={"price"})
+ * @ApiFilter(SearchFilter::class, properties={"id": "exact"}, deprecationReason="Use get operation instead")
+ * @ApiFilter(SearchFilter::class, properties={"price": "exact"}, deprecationReason="Use range filter instead")
*/
class Offer
{
}
The filter is still present, but should be deprecated using OpenAPI:v3 Parameter Object deprecated field name :

Description
Deprecations are presented as replacement for api versioning.
ApiPlatform provide way to deprecate both Resource, Operation and Properties.
But I was not able to find any way to deprecate Filters, although this is often something that may evolve.
Example
The filter is still present, but should be deprecated using OpenAPI:v3 Parameter Object
deprecatedfield name :