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

Fix incorrect path computation for Spring API endpoints #632

Merged
merged 7 commits into from
Nov 21, 2024

Conversation

adrilo
Copy link
Contributor

@adrilo adrilo commented Nov 20, 2024

What's changed?

The current logic did not cover the case where a RequestMapping with a path was defined on the Controller class, and no paths were defined in the *Mapping at the method level.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

The current logic did not cover the case where a `RequestMapping` with a path was defined on the Controller class, and no paths were defined in the `*Mapping` at the method level.
@timtebeek timtebeek self-requested a review November 20, 2024 23:52
@timtebeek timtebeek added the bug Something isn't working label Nov 20, 2024
@timtebeek
Copy link
Contributor

Thanks a lot for the fix here @adrilo ; Out of curiosity: did you already run this recipe through the Moderne CLI against local projects?

I'll fix the test failures separately before we merge; Those came in after

@timtebeek timtebeek self-requested a review November 21, 2024 00:22
@timtebeek timtebeek merged commit aa22402 into openrewrite:main Nov 21, 2024
2 checks passed
@adrilo adrilo deleted the fix_spring_api_endpoints_paths branch November 21, 2024 16:24
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
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants