remondis-it / pact-consumer-builder

Library for generating pact consumer expectations from java beans
Apache License 2.0
14 stars 6 forks source link

Ignore fields in a java POJO class #34

Open rajendran-rajarajan-phx opened 2 years ago

rajendran-rajarajan-phx commented 2 years ago

Hi there,

I have started using your library to generate the PactDslJsonBody from java pojo classes that are generated from an Avro schema and I am getting the following error:

Caused by: com.remondis.cdc.consumer.pactbuilder.NotAJavaBeanException: The field CbsGatewayResponsePayload.getSchema() with type Schema cannot be created with the current configuration.
Please add type mapping for Schema.

As the field Schema is not actually part of the POJO but more like a meta field created by Avro, Is there a way we can specify in the pact builder to ignore the field when generating the PactDslJsonBody?

schuettec commented 2 years ago

Sorry for the late response. I'm on it.