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

Cache Issue: Incorrect group returned when multiple path definitions are present #2913

Open
desiderantes opened this issue Feb 22, 2025 · 0 comments

Comments

@desiderantes
Copy link

desiderantes commented Feb 22, 2025

Describe the bug

  • With Cache enabled, when requesting a group and the controller has multiple path definitions, Springdoc will always return the first group it generated, no matter the amount of groups.

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using? : 3.4.3
  • What modules and versions of springdoc-openapi are you using?: 2.8.5
  • What is the actual and the expected result using OpenAPI Description (yml or json)? When requesting multiple groups, it should always return the expected group
  • Provide with a sample code (HelloController) or Test that reproduces the problem: here

Expected behavior

  • A clear and concise description of what you expected to happen.
  • What is the expected result using OpenAPI Description (yml or json)?

In the project I shared, whenever you request any of the api groups (v1, v2 or v3), it will always return the one it generated first (if, for example, you kill the app and reload with the path requesting v2, it will return v2 for all groups. This uses the default /swagger-ui/index.html.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
I know of the other bug reports for this. I don't know if they're the same issue.

@desiderantes desiderantes changed the title With Cache enabled, multiple grouped apis will always return the first one served. Cache Issue: Incorrect Group Returned When Multiple Path Definitions Are Present Mar 6, 2025
@desiderantes desiderantes changed the title Cache Issue: Incorrect Group Returned When Multiple Path Definitions Are Present Cache Issue: Incorrect group returned when multiple path definitions are present Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant