Hi team, i wanted to know if there is any ways to ...
# ask-for-help
a
Hi team, i wanted to know if there is any ways to disable the swagger UI displayed once running the bento?
c
Hi @Akash - what’s the reason you want to disable the swagger UI?
a
Hi @Chaoyu, thanks for asking! I have additional APIs within the same service, but I'd prefer that other people/clients remain unaware of their presence.
c
Got it! There isn’t an official api for this. You can potentially add a proxy layer for that. @Frost Ming are you aware of any potential workarounds? Perhaps override the “/“ path?
f
there is a workaround, just mount an empty ASGI app under path
/
👍 2
Copy code
import fastapi
app = fastapi.FastAPI()

@bentoml.mount_asgi_app(app)
@bentoml.service
class MyService:
    # swagger is disabled on this service
    ...
a
@Frost Ming thanks, for your inputs