spring-cloud-contract icon indicating copy to clipboard operation
spring-cloud-contract copied to clipboard

Feature request: Allow contract DSL to explicitly specify Base Class

Open aviv-amdocs opened this issue 3 years ago • 0 comments

When writing producer-side contracts, my services have complex setup. Some contracts-tests require different setup, so we use different base classes.

I find the baseClassMappings (in pom.xml) hard to use, because priority is hard to follow (A contract that matches two regex values might pick the wrong one), and because granularity is hard to make right (e.g. when one contract needs to change its base class).

I would like the ability to explicitly specify, in the contract DSL itself, the base class (FQN or maybe an alias, with aliases defined in pom.xml).

I've considered "By Convention" setup, but I dislike it because it forces my contracts to be in a directory structure that is based on implementation detail (base class) rather then by logical roles.

aviv-amdocs avatar Mar 24 '21 10:03 aviv-amdocs