servant-swagger-ui icon indicating copy to clipboard operation
servant-swagger-ui copied to clipboard

servant-swagger-ui-core breaks routing when it's not the last matching route

Open domenkozar opened this issue 6 years ago • 0 comments

If there's a POST under the same route as swagger and it comes after swagger UI, it will result into something like:

$ curl -X POST http://localhost:8090/api/v1/fastspring
Only GET or HEAD is supported

Example:

      :<|> "api" :> SwaggerSchemaUI "v1" "swagger.json"
      :<|> "api" :> "v1" :> "fastspring" :> Post '[JSON] NoContent 

Putting SwaggerSchemaUI last fixes the issue.

domenkozar avatar Feb 07 '19 05:02 domenkozar