Skip to content

Detect HTTP routes as graph symbols #438

Description

@ajianaz

Goal

Detect HTTP route definitions as first-class symbols in the code graph.

Scope

Detect REST endpoint definitions and create ROUTE nodes + HANDLER edges.

Per-Framework Patterns

Framework Pattern Example
Axum #[get("/path")] #[get("/users/:id")]
Actix-web .route("/path", get(handler)) .resource("/users")
Rocket #[get("/path")] #[get("/users/<id>")]
Express app.get("/path", handler) router.post("/api/users")
FastAPI @app.get("/path") @router.post("/users/{id}")
Gin r.GET("/path", handler) g.POST("/api/users", handler)

Implementation

  1. Add ROUTE symbol kind
  2. Extract route paths from decorators/attributes
  3. Create edges: ROUTE → HANDLER → function symbol
  4. Store in edges table with DEFINES kind

CLI

cora routes                     # List all HTTP routes
cora routes --method GET         # Filter by method
cora routes --prefix /api        # Filter by path prefix

Acceptance

  • cora routes lists detected HTTP endpoints
  • Routes appear as symbols in brain search
  • cora query "/api/users -> *" traces route to handler

Depends On

Estimated Effort

1-2 weeks

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurescope:cliCLI interface and UXscope:code-intelCode intelligence — indexing, graph, impact analysis

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions