The routes of A if it has a Resource, and nothing if it does not.
The routes of A if it has a Resource, and nothing if it does not.
This is what the sbt plugin emits, one line per candidate case class, so that the compiler decides which models mount rather than a text scan guessing from a derives clause. It sees through a type alias and finds a hand-written given Resource[A], neither of which a regex can, and a model with no instance yields Nil instead of failing to compile.
What the declaration carries comes out in front of the model's own routes, so that guarding a model is also what mounts the page its refusals redirect to. Guarded.public carries nothing, which is why an application with no guard emits exactly the table it always did. A guard hands the same route instances to every declaration it makes, so a table with two guarded models holds the login page twice and distinct takes one; the generator emits that distinct, because RouteTable refuses the same method and path twice rather than picking a winner.