Skip to content

Commit

Permalink
Also ignore unknown fields on message responses
Browse files Browse the repository at this point in the history
  • Loading branch information
sgdesmet committed Jan 2, 2024
1 parent 1255644 commit cb2eec6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.whatsapp.api.domain.messages.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The type Contact.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public record Contact(

@JsonProperty("input") String input,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.whatsapp.api.domain.messages.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The type Message.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public record Message(

@JsonProperty("id") String id) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.whatsapp.api.domain.messages.response;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

Expand All @@ -9,6 +10,7 @@
* The type Message response.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public record MessageResponse(

@JsonProperty("messaging_product") String messagingProduct,
Expand Down

0 comments on commit cb2eec6

Please sign in to comment.