Renders router snippets for a Caravela domain's generated frontend routes — one block per render mode:
:liveentities getliveroutes under the:browserpipeline (today's LiveView + WebSocket path).:restentities getcaravela_restroutes under the:browserpipeline, served viacaravela_svelte's Inertia-style HTTP transport. The router macro is imported fromCaravelaSvelte.Router; this snippet prints the lines the developer pastes, it doesn't requirecaravela_svelteto be compiled at generation time.
Caravela does not edit router.ex automatically — these snippets
are printed by mix caravela.gen.live for the developer to paste
into their app's composition root.
Routes mirror the generator's own path convention:
/library/books
/library/books/new
/library/books/:id
/library/books/:id/editWhen the domain declares version "v1", the scope prefix shifts to
/v1/library/... and the web-module alias picks up the V1. segment,
matching Caravela.Gen.LiveView's module layout.
Summary
Functions
Return the router snippet covering every entity's frontend mode.