servant-swagger-ui
servant-swagger-ui copied to clipboard
servant-swagger-ui-core breaks routing when it's not the last matching route
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.