Skip to content

'swagger-ui' is an invalid Endpoint Id for spring-actuator. #2228

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

Closed
kevinm416 opened this issue May 4, 2023 · 1 comment
Closed

'swagger-ui' is an invalid Endpoint Id for spring-actuator. #2228

kevinm416 opened this issue May 4, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists wontfix This will not be worked on

Comments

@kevinm416
Copy link

Describe the bug
The default swagger-ui location produces a warning in spring-boot 3.0.6 when it is served on an actuator endpoint.

2023-05-04T17:43:42.45376564Z WARN o.s.b.a.e.EndpointId Endpoint ID 'swagger-ui' contains invalid characters, please migrate to a valid format.

To Reproduce
Steps to reproduce the behavior:

Start a spring boot app with swagger-ui exposed on the actuator endpoint:

management:
  server:
    port: 8081
  endpoints:
    web:
      exposure:
        include:
          - openapi
          - swagger-ui
  • What version of spring-boot you are using? 3.0.6
  • What modules and versions of springdoc-openapi are you using?
    • id "org.springdoc.openapi-gradle-plugin" version "1.6.0"
    • implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
  • What is the actual and the expected result using OpenAPI Description (yml or json)?
  • Provide with a sample code (HelloController) or Test that reproduces the problem

Expected behavior
No warn logs are produced when using default springdoc with spring-boot.

Alternatively, provide a configuration option for changing swagger-ui to another path to avoid the warning. As far as I can tell, swagger-ui is hard-coded in org.springdoc.core.utils.Constants#SWAGGER_UI_PREFIX, so I can't change it to avoid the warning.

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented May 4, 2023

@kevinm416,

There are no plan for this. Its a duplicate of #1603
But feel free to propose a PR, if you feel it useful for the community !

@bnasslahsen bnasslahsen added wontfix This will not be worked on duplicate This issue or pull request already exists labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants