Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related to show-actuator=true with no groups, Missing paths after upgrading from Spring Docs 1.5.13 to 1.6.0 #1381

Closed
mathieu-amblard opened this issue Dec 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mathieu-amblard
Copy link
Contributor

Describe the bug
After upgrading from Spring Docs 1.5.13 to 1.6.0, we lost all paths of our application except the Actuator ones.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using? We have tried with 2.3.11.RELEASE and 2.5.7.
  • What modules and versions of springdoc-openapi are you using? 1.6.0
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-webmvc-core</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>1.6.0</version>
        </dependency>

We have also the following properties :

springdoc.api-docs.path=/swagger.json
springdoc.swagger-ui.path=/swagger-ui.html
springdoc.show-actuator=true
springdoc.paths-to-exclude=/error
management.endpoints.web.base-path=/rest/actuator

Expected behavior
We expect to get both, paths from actuator and and paths from our application.

Additional context
By modifying the actuator base path property as following it is working :

management.endpoints.web.base-path=/

But we cannot change it.

It seems, that this change cause the issue.
1.5.13 :
https://github.com/springdoc/springdoc-openapi/blob/v1.5.13/springdoc-openapi-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java#L38-L40

You use the filter method so the paths are kept.

1.6.0 :
https://github.com/springdoc/springdoc-openapi/blob/master/springdoc-openapi-common/src/main/java/org/springdoc/core/customizers/ActuatorOpenApiCustomizer.java#L37-L39

You use the removeIf method so the paths are removed.

@mathieu-amblard mathieu-amblard changed the title Missing paths after upgrading Spring Docs 1.5.13 to 1.6.0 Missing paths after upgrading from Spring Docs 1.5.13 to 1.6.0 Dec 14, 2021
@pfund
Copy link

pfund commented Dec 14, 2021

I confirm this. Only adding

springdoc.show-actuator=true

Will show the actuator endpoints but remove the other ones

@bnasslahsen bnasslahsen changed the title Missing paths after upgrading from Spring Docs 1.5.13 to 1.6.0 Related to show-actuator=true with no groups, Missing paths after upgrading from Spring Docs 1.5.13 to 1.6.0 Dec 14, 2021
@bnasslahsen
Copy link
Contributor

@mathieu-amblard,

You can test with the latest SNAPSHOT.
v1.6.1 will be released shortly.

@mathieu-amblard
Copy link
Contributor Author

I have tested the latest SNAPSHOT and it works.
Thank you 👍 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants