-
Notifications
You must be signed in to change notification settings - Fork 4
Description
I'm receive an error by Jackson when try to use Quarkus RestClient and response classes from this repository as mapped response of the client.
With this stacktrace error:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: cannot construct instance of ai.pluggy.client.response.AccountResponse (no creators, like default constructor, exist): cannot deserialize from object value (no delegate- or property-based creator) at [source: (org.jboss.resteasy.specimpl.AbstractBuiltResponse$InputStreamWrapper);
I suspect the error occur when Jackson try to deserialize the AccountsResponse, but the class don't have a default constructor.
As you can see from the master code, the class is annotated only with @Data & @Builder and not provide a default and empty constructor.
@Data
@Builder
public class AccountsResponse {
List<Account> results;
}
When we map the class with @NoArgsConstructor & @AllArgsConstructor annotation of Lombok it's fixed.
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AccountsResponse {
List<Account> results;
}
So, It's possible to include that annotations on all of response classes ?
I've already did it, if i can make a pull request just include me as a collaborator.