This message was deleted.
# ask-for-help
s
This message was deleted.
s
Hiya! We don't currently have a mechanism for this, as we don't actually wrap FastAPI.
e
@sauyon so in which way would you suggest to edit the API root path that appears on the swagger page?
Is there anyway to interfere the creation of the Swagger page?
s
Hm, I think the API root path is set to
.
so putting it under a proxy should work fine. @Aaron Pham might know more about OpenAPI customization?
e
This is still a problem for us As the Bento is behind a proxy, we need to be able to show in the OpenAPI specification the prefix of the urls, for example
/my_api/v1
. In OpenAPI, this appears under
host
and
basePath
keys. Is this possible in Bento? If not, what is the underlying technology that generates the OpenAPI specification? maybe we could edit it directly
s
@Aaron Pham @Jian Shen Yap ^
a
Technically you can overwrite the whole doc with
Copy code
object.__setattr__(svc, "doc", ...)
But this is pretty hacky