Skip to content

chore(backend): Explicitly enable SpringDoc API docs and Swagger UI to avoid warnings#5420

Merged
corneliusroemer merged 1 commit intomainfrom
fix-warning-springdoc
Nov 13, 2025
Merged

chore(backend): Explicitly enable SpringDoc API docs and Swagger UI to avoid warnings#5420
corneliusroemer merged 1 commit intomainfrom
fix-warning-springdoc

Conversation

@corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Nov 12, 2025

This commit explicitly enables the SpringDoc API documentation and Swagger UI
endpoints - rather than using implicit defaults.

This change addresses warnings introduced in springdoc-openapi-starter-webmvc-ui
version 2.8.14 (and potentially earlier versions) which appear when these
endpoints are enabled implicitly by default.

The specific warnings are:

- 2025-11-12 13:54:38,267 WARN [main] [] [] - org.springdoc.core.events.SpringDocAppInitializer: SpringDoc /api-docs endpoint is enabled by default. To disable it in production, set the property 'springdoc.api-docs.enabled=false'
- 2025-11-12 13:54:38,267 WARN [main] [] [] - org.springdoc.core.events.SpringDocAppInitializer: SpringDoc /swagger-ui.html endpoint is enabled by default. To disable it in production, set the property 'springdoc.swagger-ui.enabled=false'

This change aligns with the recommendations from the springdoc-openapi project,
as discussed in PR springdoc/springdoc-openapi#3090.
The dependency version bump is being handled in #5410.

Screenshot

PR Checklist

  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://fix-warning-springdoc.loculus.org

@corneliusroemer corneliusroemer changed the title fix(backend): Explicitly enable SpringDoc API docs and Swagger UI to avoid warnings chore(backend): Explicitly enable SpringDoc API docs and Swagger UI to avoid warnings Nov 12, 2025
@corneliusroemer corneliusroemer added preview Triggers a deployment to argocd review please PR waiting for final review labels Nov 12, 2025
…avoid warnings

This commit explicitly enables the SpringDoc API documentation and Swagger UI
endpoints in .

This change addresses warnings introduced in springdoc-openapi-starter-webmvc-ui
version 2.8.14 (and potentially earlier versions) which appear when these
endpoints are enabled by default. The warnings prompt developers to explicitly
set  and
in production to prevent accidental exposure.

The specific warnings are:
- 2025-11-12 13:54:38,267 WARN [main] [] [] - org.springdoc.core.events.SpringDocAppInitializer: SpringDoc /api-docs endpoint is enabled by default. To disable it in production, set the property 'springdoc.api-docs.enabled=false'
- 2025-11-12 13:54:38,267 WARN [main] [] [] - org.springdoc.core.events.SpringDocAppInitializer: SpringDoc /swagger-ui.html endpoint is enabled by default. To disable it in production, set the property 'springdoc.swagger-ui.enabled=false'

This change aligns with the recommendations from the springdoc-openapi project,
as discussed in PR springdoc/springdoc-openapi#3090.
The dependency version bump is being handled in #5410.
@corneliusroemer corneliusroemer merged commit 51327d1 into main Nov 13, 2025
39 checks passed
@corneliusroemer corneliusroemer deleted the fix-warning-springdoc branch November 13, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd review please PR waiting for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants