Rewrite safe PathSelectors.regex(...) calls as PathSelectors.ant(...)
MSALSpringdoc's GroupedOpenApi.pathsToMatch(...) accepts Ant-style patterns, not Java regex. This recipe rewrites PathSelectors.regex(...) calls whose literal argument is a literal path prefix followed by .* (optionally anchored with ^/$) into the equivalent PathSelectors.ant(...) call, so downstream Docket-to-GroupedOpenApi migration can translate the path. Regex patterns that use metacharacters, alternation, or character classes are left unchanged.
org. openrewrite. java. spring. doc. NormalizeSpringfoxPathSelectorsRegexToAntmod run . --recipe= org. openrewrite. java. spring. doc. NormalizeSpringfoxPathSelectorsRegexToAntInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.