String to Uri
I'm trying this method https://github.com/kubukoz/sup/blob/9887f19c9873880252f96b86cd9d88de39eeca2e/modules/http4s/src/main/scala/sup/modules/http4s.scala#L19-L22
and I found that, overriding the path field, I can't put the health check route endpoint far from the root of the service, eg:
"healthCheckFoo": resulting inlocalhost/myHealthcheckworks,200"bar/healthCheckFoo": doesn't work,404
I think the parameter type should change, from String to Uri
hmm Uri has the problem that it could be absolute. While I agree the current state is problematic, I'm not convinced that's the best solution. Maybe a list of segments instead?
A workaround at the moment would be to wrap these routes in Router to add extra segments. e.g. Router("bar" -> healthCheckRoutes(..., "healthCheckFoo")).
@rossabaker what do you think about using Uri in this case?
A Uri.Path is basically just a Vector of segments that may or may not be absolute. Even if it is absolute, you can ignore that and append it to some other prefix. And you won't have schemes, authorities, etc. to discard.
oh, Uri.Path sounds great then. Thanks!
I'd add that, but keep the existing signature as well.