Checklist
Describe the bug
I have multiple endpoints and admin panel. I want my endpoints to be in root path of /api/v1/, but admin to be just /admin/. So, I added app_configs["root_path"] = f"/api/v{settings.APP_VERSION}", and admin panel breaks down.
Steps to reproduce the bug
app_configs: dict[str, Any] = {"title": "Itinerago API"}
app_configs["root_path"] = f"/api/v{settings.APP_VERSION}"
app = FastAPI(**app_configs)
app.include_router(auth_router, prefix="/auth", tags=["Auth"])
app.include_router(core_router, prefix="", tags=["Main Logic"])
admin = Admin(app, engine)
# admin.add_view-s here
Commenting out second line fixes admin, however, it does not give desired output.
Expected behavior
APIs will have /api/v1/ prefix, but, admin will not. Admin will load without a problem.
Actual behavior
Admin breaks down completely:

and

Links are also broken:
In the first image, when you click one of the models it goes to: /api/v1/admin/model/list

Debugging material
No response
Environment
Windows, Python 3.10, Dockerized Fastapi
sqladmin version 0.12.0
Additional context
No response
Checklist
master.Describe the bug
I have multiple endpoints and admin panel. I want my endpoints to be in root path of
/api/v1/, but admin to be just/admin/. So, I addedapp_configs["root_path"] = f"/api/v{settings.APP_VERSION}", and admin panel breaks down.Steps to reproduce the bug
Commenting out second line fixes admin, however, it does not give desired output.
Expected behavior
APIs will have
/api/v1/prefix, but, admin will not. Admin will load without a problem.Actual behavior
Admin breaks down completely:
and
Links are also broken:
In the first image, when you click one of the models it goes to: /api/v1/admin/model/list
Debugging material
No response
Environment
Windows, Python 3.10, Dockerized Fastapi
sqladmin version 0.12.0
Additional context
No response