Skip to content

fix(docs): drop redundant HTTP verb from default 'Call ...' summary#158

Merged
filipeforattini merged 1 commit into
mainfrom
fix/docs-call-summary-verb
Jun 25, 2026
Merged

fix(docs): drop redundant HTTP verb from default 'Call ...' summary#158
filipeforattini merged 1 commit into
mainfrom
fix/docs-call-summary-verb

Conversation

@filipeforattini

Copy link
Copy Markdown
Member

Problem

FS verb-convention routes (users/[id]/get.ts → name users/:id/get, httpMethod: GET) rendered in the docs as:

GET
/enrichment/document/:value
Call enrichment/document/:value/get   ← redundant /get

The trailing /get duplicates the HTTP method badge shown right next to the path.

Fix

Both the OpenAPI and USD generators now strip the trailing verb segment from meta.name when building the default Call ... summary, but only when that segment is exactly the route's HTTP method (and a non-verb segment precedes it):

Call enrichment/document/:value

Procedures with a real summary/description are untouched. Names whose last segment isn't the route verb (e.g. users.list) are untouched.

Tests

New cases in test/docs/openapi/generator.int.test.ts. Full docs suite (146) + tsc green.

🤖 Generated with Claude Code

FS verb-convention routes (users/[id]/get.ts → name users/:id/get,
httpMethod GET) were rendering 'Call users/:id/get' in the docs — the
trailing /get duplicates the method badge already shown next to the
path. Both the OpenAPI and USD generators now strip the trailing verb
segment from meta.name for the default summary when it matches the
route's HTTP method, so the label reads 'Call users/:id'. Procedures
with a real summary/description are untouched, as are names whose last
segment isn't the route verb (e.g. users.list).
@filipeforattini filipeforattini merged commit 7d1519e into main Jun 25, 2026
2 checks passed
@filipeforattini filipeforattini deleted the fix/docs-call-summary-verb branch June 25, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant