Expand description
Route generation for type-safe frontend integration
Generates TypeScript route helpers compatible with Inertia.js v2+ UrlMethodPair interface. This allows type-safe navigation with:
router.visit(controllers.user.show({ id: '123' }))form.submit(controllers.todo.store({ title: 'Task', completed: false }))<Link href={controllers.user.index()}>Users</Link>
Structs§
- Form
Request Field - Form
Request Struct - A form request struct definition
- Generated
Route - A complete route ready for TypeScript generation
- Handler
Info - Information about a handler function
- Path
Param - A path parameter extracted from route patterns like /users/{id}
- Route
Definition - A parsed route definition from routes.rs
- Route
Json - Single route entry in
RoutesJson. - Routes
Json - Stable JSON schema for
ferro generate-routes --json(D-10..D-12).
Enums§
- Http
Method - HTTP methods for routes
- Rust
Type - Rust type representation for TypeScript conversion
Functions§
- generate_
json_ string - Scan routes and serialize to a pretty JSON string.
- generate_
routes_ to_ file - Generate routes and write to the output file
- generate_
typescript - Generate TypeScript routes file
- parse_
routes_ file - Parse routes.rs file content and extract route definitions
- routes_
to_ json - Convert scanned routes into the stable
RoutesJsonschema. - run
- Main entry point for route generation (standalone use)
- run_
json - Entry point for
ferro generate-routes --json. Prints to stdout, exits non-zero on error. - scan_
routes - Scan routes and handlers to build GeneratedRoute list