Skip to content
Snippets Groups Projects
Commit 4da7df7d authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

api-platform: enable the client pagination config

Mainly so it renders the relevant pagination parameters into the
openapi and api docs. We handle the parameters manually in all cases.
Instead of "itemsPerPage" we default to "perPage", for historic reasons.
parent 93b24a94
No related branches found
No related tags found
No related merge requests found
Pipeline #205097 passed
...@@ -60,6 +60,15 @@ class DbpRelayCoreExtension extends ConfigurableExtension implements PrependExte ...@@ -60,6 +60,15 @@ class DbpRelayCoreExtension extends ConfigurableExtension implements PrependExte
$container->prependExtensionConfig('api_platform', [ $container->prependExtensionConfig('api_platform', [
'title' => $config['docs_title'], 'title' => $config['docs_title'],
'collection' => [
'pagination' => [
// This enables it for the doctrine integration, which we don't actually use.
// But it also adds it to the open-api docs which need because we implement it manually
// in the controllers and providers, so enable it anyway.
'client_items_per_page' => true,
'items_per_page_parameter_name' => 'perPage',
],
],
'description' => $config['docs_description'], 'description' => $config['docs_description'],
'defaults' => [ 'defaults' => [
'cache_headers' => [ 'cache_headers' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment