We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The API prefix is currenlty configured via route prefix in config/routes/api_platform.yaml:
config/routes/api_platform.yaml
api_platform: resource: . type: api_platform prefix: /v4
The problem is when dumping the OpenAPI definition :
docker-compose exec php bin/console api:openapi:export --yaml --output=oas.yaml
The server baseUrl is still set to /:
baseUrl
/
servers: - url: / description: '' paths: '/v4/contributors/{id}':
We can manually set the baseUrl in a custom OpenApiFactory:
OpenApiFactory
$context[ApiPlatformOpenApiFactory::BASE_URL] = '/v4/';
But this doesn't get rid of the prefix on the paths...
Ideally there should be a way to configure a baseUrl in ApiPlatform configuration and this baseUrl would then be used in the OpenAPI generation.
This would result in the following:
servers: - url: /v4/ description: '' paths: '/contributors/{id}':
Maybe if there was a way to override the api_platform.router we could set the router.request_context.base_url to v4 there.
api_platform.router
router.request_context.base_url
v4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The API prefix is currenlty configured via route prefix in
config/routes/api_platform.yaml
:The problem is when dumping the OpenAPI definition :
The server
baseUrl
is still set to/
:We can manually set the
baseUrl
in a customOpenApiFactory
:But this doesn't get rid of the prefix on the paths...
Ideally there should be a way to configure a
baseUrl
in ApiPlatform configuration and thisbaseUrl
would then be used in the OpenAPI generation.This would result in the following:
Maybe if there was a way to override the
api_platform.router
we could set therouter.request_context.base_url
tov4
there.The text was updated successfully, but these errors were encountered: