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

Allow contract composition #2666

Open
edudar opened this issue Nov 22, 2024 · 0 comments
Open

Allow contract composition #2666

edudar opened this issue Nov 22, 2024 · 0 comments

Comments

@edudar
Copy link
Contributor

edudar commented Nov 22, 2024

The feign client can support one contract only, and contracts tend to initialize themselves in the constructor. However, contracts are generally not mutually exclusive, and mixing, let’s say, default and spring contracts is totally possible if one transitions from one contract to another. My current workaround uses reflection and simply merges lists and maps of annotation processors of the two, which works because each contract supports its own set of annotations, so only one processor works at a time. It would be great if feign can provide composite contract out of the box that accept a list of contracts as an argument. The rest already works fine thanks to DeclarativeContract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant