Skip to content

Allow contract composition #2666

Open
Open
@edudar

Description

@edudar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions