-
-
Notifications
You must be signed in to change notification settings - Fork 534
Description
Describe the feature
Caching does not seem to take locale into account.
springdoc-openapi/springdoc-openapi-common/src/main/java/org/springdoc/core/OpenAPIService.java
Lines 727 to 729 in f86c325
public OpenAPI getCachedOpenAPI() { | |
return cachedOpenAPI; | |
} |
This can causes the wrong language to be displayed.
To Reproduce
Turn on caching (springdoc.cache.disabled=false
)
Generate first request to swagger page using English locale
Generate second request swagger page using French locale
Expected behavior
I would expect that the second request using the French locale would return the French content however it returns the cached data which is the English content.
Note: Doing the reverse produces the opposite results. i.e. French local first and then English locale second will end up producing French data for the English locale.
Additional context
Work around seems to be to set
springdoc.cache.disabled=true