Skip to content

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

Description

@domenkozar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions