Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,22 @@ To enable API Gateway compatibility on your OpenAPI docs, add `api_gateway=true`
`http://www.example.com/docs.jsonopenapi?api_gateway=true`. The flag `--api-gateway` is also
available through the command-line.

The compatibility layer removes every query parameter whose name does not match
`^[a-zA-Z0-9._$-]+$` from the generated specification. Bracketed filter parameters such as
`order[title]` or `exists[author]` are dropped, not renamed. To keep a filter usable behind API
Gateway, declare it with a [`QueryParameter`](filters.md#declaring-parameters) and a bracket-free
key:

```php
use ApiPlatform\Doctrine\Orm\Filter\SortFilter;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\QueryParameter;

#[GetCollection(parameters: [
'order_title' => new QueryParameter(filter: new SortFilter(), property: 'title'),
])]
```

## OAuth

### OAuth using Symfony
Expand Down
Loading