title: Filter required in Api Platform
body: <p>Im using API Platform and I have defined a custom filter following <a href="https://api-platform.com/docs/core/filters/#creating-custom-filters" rel="nofollow noreferrer">https://api-platform.com/docs/core/filters/#creating-custom-filters</a></p>
  
  <p>It works ok, but <strong>I need to that filter is required everytime that application do a GET HTTP Request of particular entity (where the filter is set).</strong></p>
  
  <p>I have check this code:</p>
  
  <pre><code>// This function is only used to hook in documentation generators (supported by Swagger and Hydra)
  public function getDescription(string $resourceClass): array
  {
      if (!$this-&gt;properties) {
          return [];
      }
  
      $description = [];
      foreach ($this-&gt;properties as $property =&gt; $strategy) {
          $description["similar_$property"] = [
              'property' =&gt; $property,
              'type' =&gt; 'string',
              'required' =&gt; false,
              'swagger' =&gt; [
                  'description' =&gt; 'Filter using a similar postgres function.',
                  'name' =&gt; $property,
                  'type' =&gt; 'string',
              ],
          ];
      }
  
      return $description;
  }
  </code></pre>
  
  <p>Although getDescription has a required field, it only works for api documentation and not for HTTP Request</p>