Skip to content

docs: document path-scoped middleware and remove em-dashes from prose - #233

Merged
tonydspaniard merged 1 commit into
masterfrom
docs/middleware-scoping-and-emdash-cleanup
Jun 10, 2026
Merged

docs: document path-scoped middleware and remove em-dashes from prose#233
tonydspaniard merged 1 commit into
masterfrom
docs/middleware-scoping-and-emdash-cleanup

Conversation

@tonydspaniard

Copy link
Copy Markdown
Member

Summary

Documentation-only change. No source changes, no version bump.

  • New section in docs/packages/http.md: "Scoping middleware to specific paths". Fills a gap: how to restrict/exclude middleware by request path.
    • RequestPathRule's path (include) / passthrough (exclude) contract for the authentication middleware, with boundary-aware prefix matching (/api matches /api/users/42 but not /apidocs) and AND-combining with RequestMethodRule to let OPTIONS pre-flight through.
    • A copy-paste PathScopedMiddleware decorator (only / except prefix lists) for scoping any non-authentication middleware, since the PSR-15 pipeline is global.
    • Forward link added from the "Authentication and JWT" section.
  • Em-dash cleanup. Replaced ~1,330 prose em-dashes with contextual punctuation (parentheses, colons, commas, semicolons) across docs/, README.md, AGENT.md, and CHANGELOG.md. Em-dashes inside code blocks and inline code spans are intentionally left untouched, including the two in docs/packages/tinker.md that document the literal rendered for a missing count.

Test plan

  • Markdown renders correctly (tables, links, and anchors intact after punctuation changes)
  • New http.md section anchor (#scoping-middleware-to-specific-paths) resolves from the Authentication and JWT cross-link
  • No source/code changes; CI (cs/stan/test) unaffected

Add a "Scoping middleware to specific paths" section to docs/packages/http.md covering RequestPathRule's path/passthrough include/exclude contract and a PathScopedMiddleware decorator for scoping non-authentication middleware.

Replace prose em-dashes with contextual punctuation (parentheses, colons, commas, semicolons) across docs/, README.md, AGENT.md, and CHANGELOG.md. Em-dashes inside code blocks and inline code spans are left untouched.
@tonydspaniard
tonydspaniard merged commit 8481ba4 into master Jun 10, 2026
4 checks passed
@tonydspaniard
tonydspaniard deleted the docs/middleware-scoping-and-emdash-cleanup branch June 10, 2026 05:22
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