Skip to content

Cannot find routes in files containing only APIRouter() #91

@savannahostrowski

Description

@savannahostrowski

+1, was going to open an issue but since this is already here I went ahead and
created a PR #87 with a fix (tested locally and working).

Root cause: findAllFastAPIFiles() in appDiscovery.ts uses a text pre-filter to avoid running tree-sitter on every Python file. It only checks for "FastAPI(", so files containing only APIRouter() are silently skipped, the downstream parsing pipeline already fully supports APIRouter, the bug is purely in the discovery step.

Originally posted by @NureddinSoltan in #85

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions