Bolero 0.2
Pre-release
Pre-release
Features
#10: Router: add full path specification. Documentation
Routers can now use EndPointAttribute
to specify the full shape of the path for a given union case, rather than just a single prefix fragment. These paths can freely mix constant and parameter fragments, and several cases can share a common prefix of one or multiple fragments.
type Page =
| [<EndPoint "/article/{id}">]
Article of id: int
| [<EndPoint "/list/{page}/{*tags}">]
ArticleList of page: int * tags: list<string>
| [<EndPoint "/user/{username}/favorites">]
UserFavorites of username: string
| [<EndPoint "/user/{username}/comments">]
UserComments of username: string
Specifying a single prefix fragment is still supported in a fully compatible way.