File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from fastapi import APIRouter
2+
3+ from core .config import settings
4+ from .users import router as users_router
5+
6+ router = APIRouter (
7+ prefix = settings .api_prefix .v1 .prefix ,
8+ )
9+
10+ router .include_router (
11+ users_router
12+ )
Original file line number Diff line number Diff line change 1+ from fastapi import APIRouter
2+
3+ from core .config import settings
4+
5+
6+ router = APIRouter (
7+ prefix = settings .api_prefix .v1 .users ,
8+ tags = ["Users" ],
9+ )
10+
Original file line number Diff line number Diff line change 33from pydantic_settings import BaseSettings , SettingsConfigDict
44
55
6+ class ApiV1Prefix (BaseModel ):
7+ prefix : str = "/v1"
8+ users : str = "/users"
9+
610class ApiPrefix (BaseModel ):
711 prefix : str = "/api"
12+ v1 : ApiV1Prefix = ApiV1Prefix ()
13+
814
915class RunConfig (BaseModel ):
1016 host : str = "127.0.0.1"
You can’t perform that action at this time.
0 commit comments