Description
Using the Symfony framework, it would be useful in some cases if we could configure the "asset package" used by the api platform.
In this way, we would have more control over the generated asset urls: https://symfony.com/doc/4.4/reference/configuration/framework.html#packages
Example
There could be a new config option with the currently used null default value, so it would be backward-compatible.
# app/config/packages/api_platform.yaml
api_platform:
asset_package: 'custom_package'
The current templates should need only some minor modifications i.e.:
- <link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css') }}">
+ <link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css', asset_package) }}">
And of course that new parameter has to be set for the templates i.e. in \ApiPlatform\Core\Bridge\Symfony\Bundle\Action\SwaggerUiAction::getContext
Description
Using the Symfony framework, it would be useful in some cases if we could configure the "asset package" used by the api platform.
In this way, we would have more control over the generated asset urls: https://symfony.com/doc/4.4/reference/configuration/framework.html#packages
Example
There could be a new config option with the currently used
nulldefault value, so it would be backward-compatible.The current templates should need only some minor modifications i.e.:
And of course that new parameter has to be set for the templates i.e. in
\ApiPlatform\Core\Bridge\Symfony\Bundle\Action\SwaggerUiAction::getContext