I'm using this PointFree library Swift URL Routing to try and build a router in my app. However, the docs are fairly light and I can't work out how to get just a literal string out of a route to place into the path.
For instance...
enum MyRoute {
case getItem(itemID: String)
}
Should have a path like /item/theItemID.
In the docs it shows how to do this with a number...
Route(.case(MyRoute.getItem(itemID:)) {
Path {
"item"
Digits()
}
}
But my value is not a number it's a string and I can't seem to work out how to do this. (Which seems like it should be a trivial thing ) If I use Digits() then it complains that it doesn't have an Int.