Support multiple inheritance in Contract
See original GitHub issueWe’re using Feign for inter-services calls in a micro services architecture. We would like to move to a single interface between the client and the resource so that changes in the api are reflected automatically to the client.
The problem is that some clients we built during the past months extends 2 specific interfaces related to common tasks between the micro services (backup related actions for instance).
While trying to refactor the code, I hit the (understandable) limitation of the single inheritance. I’d be open to work on that and make a PR out of it, is this something you’d consider merging? I know I can provide my own Contract
but I’d like to have your opinion on contributing this upstream first.
I haven’t thought about all the details yet but it would be something like scanning all the extended interfaces and making sure that all the methods defined have the proper metadata.
Thanks!
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
My friend shared code snippet that actually works. It has one known issue - you have to duplicate method variable mapping in children. Except this code works fine.
You need to create Hierarchical contract bean in your configuration, to make it working.
HierarchicalContract.txt
It would be great to support it, we have a hierarchy of interfaces and it represents a lot of work/duplication to flatten it out. I believe that this is request 3 😃.