Enable nested exposure of Siblings
Siblings can now be exposed alongside Children and Parents
try router.crudRegister(for: Todo.self) { controller in
try controller.crudRegister(forSiblings: \.tags)
}
try router.crudRegister(for: Tag.self) { controller in
try controller.crudRegister(forSiblings: \.todos)
}
exposes
GET /todo/:id
GET /todo
POST /todo
PUT /todo/:id
DELETE /todo/:id
GET /todo/:id/tag/:id
GET /todo/:id/tag
POST /todo/:id/tag
PUT /todo/:id/tag/:id
DELETE /todo/:id/tag/:id
GET /tag/:id
GET /tag
POST/tag
PUT /tag/:id
DELETE /tag/:id
GET /tag/:id/todo/:id
GET /tag/:id/todo
POST /tag/:id/todo
PUT /tag/:id/todo/:id
DELETE /tag/:id/todo/:id