Skip to content

FastAPI empty-path routes not captured #8

@DeusData

Description

@DeusData

Problem

FastAPI routes with empty string paths like `@router.get("")` are not captured as Route nodes.

Root Cause

The route extraction logic likely requires a non-empty path string. Empty paths are valid in FastAPI — they inherit the router's prefix path.

Fix

In the Python/FastAPI route extraction:

  1. Allow empty string `""` as a valid route path
  2. The Route node should show the empty path (or `/` as normalized form)

Test Repo

Any FastAPI project using router prefixes: `router = APIRouter(prefix="/api/v1"); @router.get("")`

Impact

Captures missing routes in FastAPI projects. Small fix, straightforward.

References

  • Benchmark report: `BENCHMARK_REPORT.md` (Python section)
  • HTTP link pipeline: `internal/httplink/`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions