Skip to content

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

Closed
@tlemme

Description

@tlemme

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions