What is the best way to define optional named parameters in a REST path using Apache Wink?
Right now I am using something like this:
/items{sep: (?)}{id: (.*)}")
for matching requests such as:
/items/123
/items/
/items
so that I can capture a clean {id}
.
Another option would be:
/items{id: (/?/[^/]+?)}
but then the {id}
will contain the /
character and it will require a cleanup.
I am using Wink in my framework (µ)Micro and I am planning to stick with it, recommending other/better(?) similar frameworks would not answer this question at this time.
Thank you!
-florin