How to hide the server host but show the base path in Redoc?

306 Views Asked by At

Currently Redoc includes the host URL in my API endpoint which I do not want it to do. I tried several ways to hide it and only show the base path and endpoint in Redoc docs, but nothing seems to work.

Current behaviour - http://localhost:8000/v1/abc
Expected behaviour - /v1/abc

I do not want Redoc to add the host. I tried passing an empty url in the servers attribute in my OpenAPI file, hide-hostname in Redoc options and other various ways like only passing a "/" in the url, but it always adds the security scheme or browser URL if nothing is provided.

0

There are 0 best solutions below