1

I am building a web app using Symfony v4.3 and API Platform.

API Platform has OpenAPI documentation (Swagger UI) and every time I go to myweb_url/api/doc UI, scheme is set to HTTPS as default. I would like to configure it to HTTP as default scheme in api_platform.yaml config file.

Is this even the right place to do this and is this possible without decorating the whole UI?

Getz
  • 63
  • 7

1 Answers1

1

The answer is nelmio_api_doc.yaml configuration

To achieve HTTP as default in api/doc, you need to put HTTP first in the scheme field in the nelmio_api_doc.yaml configuration:

nelmio_api_doc:

documentation:
    schemes: [http, https]
Getz
  • 63
  • 7