salvo-routing

Configure Salvo routing with nested routers, path parameters and filters.

20|5|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salvo-routing
Source: https://github.com/salvo-rs/salvo-skills/tree/main/skills/salvo-routing
Command: npx skills add https://github.com/salvo-rs/salvo-skills --skill salvo-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Complex routing in Salvo can become hard to manage without a structured approach to nested routers, path parameters, and custom filters.

Core Features & Use Cases

  • Nested routers and push-based composition to build multi-level APIs
  • Path parameters, typed segments, and regex constraints for precise routing
  • Middleware and filters integrated with routes for consistent behavior across endpoints

Quick Start

Initialize a router with "api/v1" and a nested "users/{id}" route to demonstrate parameter extraction.

Frequently Asked Questions about salvo-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure nested routers for a RESTful API in Salvo?

You can configure nested routers in Salvo using push-based composition to build multi-level APIs. Initialize a base router with a prefix like "api/v1" and push child routers to structure endpoint hierarchies cleanly.

How do I extract path parameters in Salvo routing?

Salvo routing extracts path parameters using syntax like "users/{id}" within route definitions. You can apply typed segments and regex constraints to ensure precise parameter matching and validate incoming request data.

Can I apply middleware and filters to specific routes in Salvo?

Yes, Salvo supports integrating middleware and filters directly with routes. Applying filters at the route level ensures consistent behavior and validation logic across specific endpoints without affecting unrelated paths.

What's the best way to organize complex routing logic in Salvo?

The best way to manage complex routing in Salvo is structuring endpoints with nested routers and push-based composition. This approach prevents route configuration bloat and maintains clear endpoint separation for RESTful APIs.

Does Salvo routing support regex constraints for path segments?

Yes, Salvo routing supports regex constraints for path segments. You can apply these constraints alongside typed segments to enforce strict matching rules on path parameters before the request reaches the handler.

Why do I need nested routers for my Salvo application?

Nested routers are needed to manage complex API structures without configuration chaos. They allow push-based composition of multi-level endpoints, keeping route definitions modular and maintainable as your RESTful API grows.