Skip to content

Commit

Permalink
add prefix to swagger docs
Browse files Browse the repository at this point in the history
Signed-off-by: owenowenisme <[email protected]>
  • Loading branch information
owenowenisme committed Feb 10, 2025
1 parent e9d148a commit 810acec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ async def lifespan(app: FastAPI):
yield


app = FastAPI(lifespan=lifespan)
app = FastAPI(
lifespan=lifespan, docs_url='/api/docs', redoc_url='/api/redoc', openapi_url='/api/openapi.json'
)

app.include_router(main_router)
app.include_router(user_router)
Expand Down
2 changes: 1 addition & 1 deletion backend/routers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from crud.main import get_env_info, health

router = APIRouter(tags=['basic'])
router = APIRouter(tags=['basic'], prefix='/api/v1')


@router.get('/info')
Expand Down

0 comments on commit 810acec

Please sign in to comment.