Skip to content

Add NoHttpExchangeAnnotation#910

Merged
timtebeek merged 9 commits intoopenrewrite:mainfrom
nurdy-kim:main
Jan 27, 2026
Merged

Add NoHttpExchangeAnnotation#910
timtebeek merged 9 commits intoopenrewrite:mainfrom
nurdy-kim:main

Conversation

@nurdy-kim
Copy link
Contributor

@nurdy-kim nurdy-kim commented Jan 25, 2026

What's changed?

Add a Recipe NoHttpExchangeAnnotation that replaces @HttpExchange annotations with their specific method variants(@GetExchange, @PostExchange, etc..) when possible.

Before:

@HttpExchange(method = "GET", value = "/api/users")
String getUsers();

After:

@GetExchange("/api/users")
String getUsers();

What's your motivation?

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@nurdy-kim nurdy-kim marked this pull request as ready for review January 25, 2026 12:55
@timtebeek timtebeek self-requested a review January 25, 2026 16:31
@timtebeek timtebeek added the recipe Recipe requested label Jan 25, 2026
@timtebeek timtebeek moved this from In Progress to Ready to Review in OpenRewrite Jan 25, 2026
Copy link
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @nurdy-kim ! Should help folks be more explicit about their methods.

@timtebeek timtebeek merged commit 37c8a97 into openrewrite:main Jan 27, 2026
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

recipe Recipe requested

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants