I can't find any swagger configuration file in api platform

762 views Asked by At

I'm using the last version of Api-platform, shipped with swagger.io .

I'm having an issue with swagger interface. When I try to use it to Get a resource, it doesn't seem to be able to find any base url or server url.

Logically, I tried to find if I could tell Swagger where to fetch my resources.

I tried to tell swagger what the base path or the url of my server is but I can't find any swagger configuration file.

My question is : is there any swagger configuration file in api_platform files ? Is there any way to create one where I could tell swagger where to look for my resources and what server to fetch them from.

By the way, swagger shows me no 'base url' header below the title of my API.

Thank you for your help.

1

There are 1 answers

1
shvv On

API Platform create OpenAPI specification automatically based on your resources configuration.

You can use @ApiProperty.attributes.openapi_context annotation or api_platform.swagger.normalizer.documentation decorator for customization.