Skip to content

Commit cb2eec6

Browse files
committed
Also ignore unknown fields on message responses
1 parent 1255644 commit cb2eec6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/main/java/com/whatsapp/api/domain/messages/response/Contact.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package com.whatsapp.api.domain.messages.response;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
34
import com.fasterxml.jackson.annotation.JsonInclude;
45
import com.fasterxml.jackson.annotation.JsonProperty;
56

67
/**
78
* The type Contact.
89
*/
910
@JsonInclude(JsonInclude.Include.NON_NULL)
11+
@JsonIgnoreProperties(ignoreUnknown = true)
1012
public record Contact(
1113

1214
@JsonProperty("input") String input,

src/main/java/com/whatsapp/api/domain/messages/response/Message.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package com.whatsapp.api.domain.messages.response;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
34
import com.fasterxml.jackson.annotation.JsonInclude;
45
import com.fasterxml.jackson.annotation.JsonProperty;
56

67
/**
78
* The type Message.
89
*/
910
@JsonInclude(JsonInclude.Include.NON_NULL)
11+
@JsonIgnoreProperties(ignoreUnknown = true)
1012
public record Message(
1113

1214
@JsonProperty("id") String id) {

src/main/java/com/whatsapp/api/domain/messages/response/MessageResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.whatsapp.api.domain.messages.response;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
34
import com.fasterxml.jackson.annotation.JsonInclude;
45
import com.fasterxml.jackson.annotation.JsonProperty;
56

@@ -9,6 +10,7 @@
910
* The type Message response.
1011
*/
1112
@JsonInclude(JsonInclude.Include.NON_NULL)
13+
@JsonIgnoreProperties(ignoreUnknown = true)
1214
public record MessageResponse(
1315

1416
@JsonProperty("messaging_product") String messagingProduct,

0 commit comments

Comments
 (0)