zio-http icon indicating copy to clipboard operation
zio-http copied to clipboard

Formatting Root route pattern

Open landlockedsurfer opened this issue 6 months ago • 0 comments

Hi all,

I think I found an issue when formatting the root route pattern.

Describe the bug

Formatting the RoutePattern Method.GET / Root returns an empty path.

To Reproduce

Add the following test case to e.g. zio.http.RoutePatternSpec:

      test("formatting root") {
        val routePattern = Method.GET / Root
        assertTrue(routePattern.format(()) == Right(Path("/")))
      },

Expected behaviour

Formatting the RoutePattern Method.GET / Root should return /.

landlockedsurfer avatar Oct 23 '25 12:10 landlockedsurfer