Skip to content

docs(routing): document catch-all / wildcard (*path) routes#1410

Merged
sansyrox merged 1 commit into
mainfrom
fix/wildcard-routing-docs
Jun 19, 2026
Merged

docs(routing): document catch-all / wildcard (*path) routes#1410
sansyrox merged 1 commit into
mainfrom
fix/wildcard-routing-docs

Conversation

@sansyrox

@sansyrox sansyrox commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

Robyn already supports multi-level catch-all / wildcard routes via a *name segment (matchit catch-all), but it was only shown as a one-line # Wildcard matching comment in a code sample — so users repeatedly assume it's missing (#1160).

Adds a dedicated "Catch-all (wildcard) routes" section to advanced_routing.mdx (en + zh) explaining that *name matches the rest of the path across multiple / levels and is exposed via request.path_params:

@app.get("/files/*path")
async def read_file(request):
    # GET /files/img/2024/logo.png  ->  path == "img/2024/logo.png"
    return {"path": request.path_params["path"]}

Verified live on 0.86.0. Closes the docs gap behind #1160 (issue already closed as already-supported).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded advanced routing documentation with a new section on catch-all patterns, explaining how to capture remaining path segments in requests
    • Added practical examples demonstrating usage for nested file paths and single-page application fallback routing
    • Updated documentation in multiple languages for broader accessibility

Robyn already supports multi-level catch-all routes via a `*name` segment, but
it was only shown as a one-line comment in a code sample, so users assumed it
was missing (#1160). Add a dedicated "Catch-all (wildcard) routes" section
(en + zh) explaining that `*name` matches the rest of the path across multiple
levels and is exposed via request.path_params.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
robyn Ready Ready Preview, Comment Jun 19, 2026 4:55pm

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ddd95ad-f975-4c94-9087-eefaa2c88b75

📥 Commits

Reviewing files that changed from the base of the PR and between 3529cad and a080e19.

📒 Files selected for processing (2)
  • docs_src/src/pages/documentation/en/api_reference/advanced_routing.mdx
  • docs_src/src/pages/documentation/zh/api_reference/advanced_routing.mdx

📝 Walkthrough

Walkthrough

Added a "Catch-all (wildcard) routes" section to the advanced routing reference documentation in both English and Chinese. The new section explains *name path segment semantics and includes Python handler examples for nested file path access and SPA fallback routing.

Changes

Catch-all wildcard route documentation

Layer / File(s) Summary
Catch-all route section (EN + ZH)
docs_src/src/pages/documentation/en/api_reference/advanced_routing.mdx, docs_src/src/pages/documentation/zh/api_reference/advanced_routing.mdx
Inserts a new subsection explaining *name wildcard capture semantics and provides code examples for reading nested file paths and SPA fallback handlers in both English and Chinese locales.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 A wildcard hops down the path with glee,
*name catches segments — one, two, or three!
From /files/a/b/c to SPA's last stand,
The docs now explain it, both English and Mandarin planned.
Hop hop, the routes bloom, the rabbit is pleased! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding documentation for catch-all/wildcard routes, which matches the actual file modifications.
Description check ✅ Passed The description provides context, rationale, examples, and verification details, but omits the standard PR checklist items (title/summary validation, testing, pre-commit hooks).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wildcard-routing-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq

codspeed-hq Bot commented Jun 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 207 untouched benchmarks


Comparing fix/wildcard-routing-docs (a080e19) with main (3529cad)

Open in CodSpeed

@sansyrox sansyrox merged commit a9fe45f into main Jun 19, 2026
39 checks passed
@sansyrox sansyrox deleted the fix/wildcard-routing-docs branch June 19, 2026 18:49
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