-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
We use stacked routes in our project to deprecate/alias routes, the FastAPI Extension is only picking up the first route and not subsequent routes. For example
@router.post("/vendor-order", deprecated=True, description="DEPRECATED: use /api/v1/orders instead")
@router.post("/lab/orders", description="...")
async def post_order(
request: Request,
session: AsyncSession = Depends(get_session),
):
passOnly the /vendor-order route is showing in the list of routes. When I remove the @router.post("/vendor-order"...), then the /lab/orders route properly shows in the route list.
I would expect to see both of the routes in the list of routes
Extension logs
2026-03-06 16:32:44.411 [info] FastAPI extension 0.1.3 activated (VS Code 1.110.0)
2026-03-06 16:32:44.698 [info] Discovering FastAPI apps in 1 workspace folder(s)...
2026-03-06 16:32:47.692 [info] Found 1 candidate FastAPI file(s) in billing-service
2026-03-06 16:32:47.709 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/main.py": 0 routes, 1 routers, 2 include_router calls
2026-03-06 16:32:47.709 [info] Resolving include_router: health_ready_check_router (prefix: none)
2026-03-06 16:32:47.713 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/health_and_ready.py": 4 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.713 [info] Resolving include_router: v1_router (prefix: none)
2026-03-06 16:32:47.720 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/__init__.py": 0 routes, 1 routers, 11 include_router calls
2026-03-06 16:32:47.720 [info] Resolving include_router: espdt_router (prefix: none)
2026-03-06 16:32:47.722 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/epsdt.py": 3 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.722 [info] Resolving include_router: labtest_router (prefix: none)
2026-03-06 16:32:47.731 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/labtest.py": 9 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.731 [info] Resolving include_router: billing_data_entry_router (prefix: none)
2026-03-06 16:32:47.739 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/billing_data_entry.py": 13 routes, 0 routers, 0 include_router calls
2026-03-06 16:32:47.739 [info] Resolving include_router: notification_router (prefix: none)
2026-03-06 16:32:47.744 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/notification.py": 4 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.744 [info] Resolving include_router: payor_router (prefix: none)
2026-03-06 16:32:47.776 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/payor.py": 4 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.776 [info] Resolving include_router: providers_router (prefix: none)
2026-03-06 16:32:47.781 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/providers.py": 1 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.781 [info] Resolving include_router: catalog_router (prefix: none)
2026-03-06 16:32:47.786 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/catalog.py": 2 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.787 [info] Resolving include_router: external_router (prefix: none)
2026-03-06 16:32:47.795 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/external.py": 4 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.796 [info] Resolving include_router: workflows_router (prefix: none)
2026-03-06 16:32:47.822 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/workflows.py": 7 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.822 [info] Resolving include_router: support_router (prefix: none)
2026-03-06 16:32:47.826 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/support.py": 4 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.827 [info] Resolving include_router: reports_router (prefix: none)
2026-03-06 16:32:47.831 [info] Analyzed "file:///Users/mike.ephraim/dev/billing-service/app/router/v1/reports.py": 3 routes, 1 routers, 0 include_router calls
2026-03-06 16:32:47.832 [info] Found 1 FastAPI app(s) with 45 route(s) in billing-service
Repository link (if open source)
No response
Project structure
billing-service/
├── pyproject.toml
└── app/
├── main.py
└── routers/v1/
└── labtest.py
FastAPI app and router setup
app_version = toml.load("pyproject.toml")["tool"]["poetry"]["version"]
app = FastAPI(
title="Billing Service", openapi_url=f"{settings.API_PREFIX}/openapi.json", version=app_version, lifespan=lifespan
)
router = APIRouter(tags=["Lab Tests"], dependencies= Depends(auth_bearer_service_account)])pyproject.toml [tool.fastapi] section (if present)
VS Code version
1.110.0
FastAPI extension version
0.1.3
Python version
3.11.12
FastAPI version
0.115.11
Operating system
macOS 15.7.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working