Skip to content

[BUG] [Play] [Swagger] Allow exposing Swagger on a non-root route #1272

@gaeljw

Description

@gaeljw

Tapir version: 0.18.0-M11
Scala version: 2.13.6

Describe the bug

It's not possible to expose Swagger documentation on a non-root route:

  • it can be exposed on /docs for instance
  • but it cannot be exposed on /api/docs

To be more concrete, the SwaggerPlay is not able to handle a contextPath containing / like:

new SwaggerPlay(openApiYml, "api/docs")

This doesn't generate any error but the route is just ignored by Play.

How to reproduce?

I can provide a minimal repo to reproduce if needed but I don't think it's necessary.

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions