JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
I try to generate the pact file from java bean, for example:
public class A {
List<String> test;
public A() {
}
public List<String> getTest() {
return test;
}
public void setTest(List<String> test) {
this.test = test;
}
}
and generate the pact using consumerBuilder:
A a = new A();
a.setTest(Arrays.asList("testValue"));
ConsumerBuilder<A> consumerBuilder = ConsumerExpects.type(A.class);
PactDslJsonBody body = consumerBuilder .build(a);
I receive:
{"test":[{"test":"testValue"}]}
but I would like to get:
{"test":["testValue"]}
I tried some experiment with setting a custom array mapping for the consumerBuilder, but I couldn't get it to work, any help would be appreciated.
I use the following dependency:
I try to generate the pact file from java bean, for example:
and generate the pact using consumerBuilder:
I receive: {"test":[{"test":"testValue"}]}
but I would like to get: {"test":["testValue"]}
I tried some experiment with setting a custom array mapping for the consumerBuilder, but I couldn't get it to work, any help would be appreciated.