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

Support of {*param} path patterns is broken in 1.6.15 #2188

Closed
tlemme opened this issue Mar 31, 2023 · 1 comment
Closed

Support of {*param} path patterns is broken in 1.6.15 #2188

tlemme opened this issue Mar 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tlemme
Copy link

tlemme commented Mar 31, 2023

Describe the bug
Spring provides "/my/path/{*param}" a path pattern to match multiple segments at the end of a path. So param might contain "multiple/segments": https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc

This was working fine until 1.6.15. Issue #2031 broke the correct behavior.

To Reproduce
Steps to reproduce the behavior:

  • Create a Controller with a path like "/my/path/{param}"
  • Deploy it with springdoc-openapi
  • Open API spec will contain the path and the param
  • Change the path to "/my/path/{*param}"
  • Redeploy

Expected:

  • Open API spec will contain the path and the param

Actual:

  • Open API spec contains the path but not the param

Forked and provided a sample reproducer with a quick naive fix. Probably the fix is not optimal (I don't know the specifics of the path patterns).
master...tlemme:springdoc-openapi:master

@bnasslahsen
Copy link
Contributor

@tlemme,

Thank you for your investigation!

@bnasslahsen bnasslahsen added the bug Something isn't working label Apr 1, 2023
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

2 participants