Relations can now recurse infinitely
Nest your routes to your heart's content 😄
try router.crud(register: User.self, .only([.read])) { controller in
try controller.crud(children: \.todos, .only([.read])) { childrenController in
try childrenController.crud(siblings: \.tags, .only([.read])) { siblingsController in
try siblingsController.crud(siblings: \.todos, .only([.read]))
}
}
}
produces
GET/user/:id
GET/user/:id/todo/:id
GET/user/:id/todo/:id/tag/:id
GET/user/:id/todo/:id/tag/:id/todo/:id