Will It Vibe logoWill It Vibe?
API-009Medium severity-8 points

Duplicate path-parameter name in one route

Part of Architecture & Best Practices, which counts for 15% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

A route path uses the same parameter name twice, for example /teams/:id/members/:id. Newer router versions (path-to-regexp v6+, used by Express 5) reject this at startup; older versions silently let the second occurrence overwrite the first in req.params, so the handler can never read one of the two values. Give each parameter a distinct name, such as :teamId and :memberId.

Why it matters

A route path that reuses the same parameter name twice, such as /teams/:id/members/:id, cannot express both values through req.params: on older router versions the second occurrence silently overwrites the first, so the handler only ever sees one of the two IDs, and newer router versions (path-to-regexp v6+, used by Express 5) refuse to compile the route at all and throw at startup.

How to fix it

Give each parameter a distinct, descriptive name that reflects what it identifies, for example :teamId and :memberId instead of two :id segments, and update the handler to read req.params.teamId and req.params.memberId.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Architecture & Best Practices checks