Ignore unknown properties from JSON

pull/9/head
Hammy 3 years ago
parent 4a58dacfbc
commit cedc3020fc

@ -46,6 +46,7 @@ import java.util.Objects;
"type", "type",
"id" "id"
}) })
@JsonIgnoreProperties(ignoreUnknown = true)
public class Series { public class Series {
/** /**
* Full Name (in English) * Full Name (in English)

@ -1,9 +1,6 @@
package me.goudham.api.entity.user; package me.goudham.api.entity.user;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import me.goudham.api.entity.waifu.Waifu; import me.goudham.api.entity.waifu.Waifu;
import java.util.List; import java.util.List;
@ -11,13 +8,13 @@ import java.util.Objects;
/** /**
* {@link UserList} * {@link UserList}
* <p>Get an array of all user lists on their profile</p> * <p>Get an array of all Waifu lists on their profile</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul> * <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String order}</li> * <li>{@link Integer order}</li>
* <li>{@link List} of {@link Waifu}'s</li> * <li>{@link List} of {@link Waifu}'s</li>
* </ul> * </ul>
* *
@ -29,6 +26,7 @@ import java.util.Objects;
"order", "order",
"waifus" "waifus"
}) })
@JsonIgnoreProperties(ignoreUnknown = true)
public class UserList { public class UserList {
/** /**
* {@link UserList} ID * {@link UserList} ID

@ -46,7 +46,7 @@ import java.util.Objects;
"appearances", "appearances",
"id" "id"
}) })
@JsonIgnoreProperties(value = { "series" }) @JsonIgnoreProperties(ignoreUnknown = true)
public class FilteredWaifu { public class FilteredWaifu {
/** /**
* Used to generate readable URL's for the {@link FilteredWaifu} * Used to generate readable URL's for the {@link FilteredWaifu}

Loading…
Cancel
Save