Files
Martin Vogel 88d4f29d18 fix(extract): form Route nodes from NestJS @Controller/@Get decorators (#1428)
NestJS controllers produced zero Route nodes. Two gaps in the decorator
route walk (extract_route_from_decorators):

- It only inspected decorator children of kind `call` (Python). A
  TypeScript decorator's call is a `call_expression`, so @Get(':id') was
  never examined.
- The path helpers only accept literals that start with "/". Nest writes
  segments without one (@Controller('users'), @Get(':id')), and the
  class-level prefix was composed only for Java/Kotlin (Spring/JAX-RS).

TS/TSX class methods now read the Nest verb decorators (@Get, @Post, @Put,
@Delete, @Patch, @Head, @Options, @All -> ANY) and compose them with the
class's @Controller / @JsonController prefix. The prefix can be a string,
an array (first entry), or the options object's `path`. Paths are rooted
at "/". A verb decorator outside a controller class forms no route. A
non-literal path argument (a constant) also forms none, so no route is
invented. Route and HANDLES are reused as they are: no new label.

Not covered: the app-level setGlobalPrefix() and enableVersioning() in
main.ts are cross-file and are not applied.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-09-29 03:14:39 +02:00
..