Skip to content

Swagger UI with provided spec broken in 1.7.0 #2193

Closed
@tobi-laa

Description

@tobi-laa

Describe the bug

Using Springdoc + Swagger UI with a provided spec as described here seems to be broken in version 1.7.0. Attempting to navigate to swagger-ui.html yields 404 Not Found.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
    2.7.10
  • What modules and versions of springdoc-openapi are you using?
    • springdoc-openapi-ui
    • springdoc-openapi-security

Expected behavior

The description found here should either be updated to reflect additional steps or should work again.

Additional context

The problem appears to be the newly added org.springdoc.core.SpringDocUIConfiguration, which is only loaded when property springdoc.api-docs.enabled is set to true. With the aforementioned description to use a provided spec, said property needs to be set to false.

Maybe it is possible to simply remove @ConditionalOnExpression("${springdoc.api-docs.enabled:true}") from SpringDocUIConfiguration? As an alternative, the minimal Beans configuration might be expanded to include the contents of SpringDocUIConfiguration.

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