Get JSON from generated apigen classes using Jackson library
Opened this issue · 0 comments
JustinBlandford commented
Hi,
We have used the plugin to generate Java classes from our graphql spec. The generated classes have static Builder classes within the interface for the model objects. For the generated classes, the member variables all have underscores at the start of them by default. Each class also has an Impl class where it overrides the toString method to return the JSON structure in the correct format. We are using the Builder classes to generate the data, but am struggling to get the object back in a format without the underscores i.e. as JSON that we can use to issue a GraphQl request. Could you please give some guidance on the best way to achieve this?
Regards
Justin