Checklist
Affected version
1.1.1
Description of the problem
When using ContactsApi.addContactToList() or ContactsApi.removeContactFromList(), the API call succeeds but response deserialization fails with:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type
software.xdev.brevo.model.PostContactInfoContactsSuccess from Array value (token JsonToken.START_ARRAY)
at [Source: REDACTED; line: 1, column: 24] (through reference chain:
software.xdev.brevo.model.PostContactInfo["contacts"]->software.xdev.brevo.model.PostContactInfoContacts["success"])
Cause:
The Brevo API returns success as an array of emails:
{
"contacts": {
"success": ["email@example.com"],
"failure": [],
"total": 1
}
}
But PostContactInfoContactsSuccess is modeled as an empty object class (no fields), not as a List.
Expected:
PostContactInfoContacts.success should be typed as List (or similar), not PostContactInfoContactsSuccess.
Affected methods:
- ContactsApi.addContactToList()
- ContactsApi.removeContactFromList()
Steps to reproduce the bug
ApiClient apiClient = Configuration.getDefaultApiClient();
ApiKeyAuth apiKey = (ApiKeyAuth) apiClient.getAuthentication("api-key");
apiKey.setApiKey("your-api-key");
ContactsApi contactsApi = new ContactsApi();
AddContactToListRequest request = new AddContactToListRequest();
request.setEmails(List.of("test@example.com"));
request.setIds(null);
request.setExtIds(null);
contactsApi.addContactToList(123L, request); // throws ApiException
Additional information
Other methods returning PostContactInfo may have the same issue.
Checklist
Affected version
1.1.1
Description of the problem
When using ContactsApi.addContactToList() or ContactsApi.removeContactFromList(), the API call succeeds but response deserialization fails with:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type
software.xdev.brevo.model.PostContactInfoContactsSuccessfrom Array value (tokenJsonToken.START_ARRAY)at [Source: REDACTED; line: 1, column: 24] (through reference chain:
software.xdev.brevo.model.PostContactInfo["contacts"]->software.xdev.brevo.model.PostContactInfoContacts["success"])
Cause:
The Brevo API returns success as an array of emails:
{ "contacts": { "success": ["email@example.com"], "failure": [], "total": 1 } }But PostContactInfoContactsSuccess is modeled as an empty object class (no fields), not as a List.
Expected:
PostContactInfoContacts.success should be typed as List (or similar), not PostContactInfoContactsSuccess.
Affected methods:
Steps to reproduce the bug
Additional information
Other methods returning PostContactInfo may have the same issue.