fix: fixed JSON mapping of requestTypes

This commit is contained in:
Yannik Bretschneider 2021-05-30 17:01:48 +02:00
parent cb0f2cae13
commit 27c3d6554a

View File

@ -1,6 +1,10 @@
package uulm.teamname.marvelous.gamelibrary.requests; package uulm.teamname.marvelous.gamelibrary.requests;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonKey;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage; import uulm.teamname.marvelous.gamelibrary.json.basic.EventMessage;
import uulm.teamname.marvelous.gamelibrary.json.ingame.RequestDeserializer; import uulm.teamname.marvelous.gamelibrary.json.ingame.RequestDeserializer;
@ -9,7 +13,8 @@ import java.util.Objects;
/** Represents an abstract request sent inside a {@link EventMessage} between client and server. */ /** Represents an abstract request sent inside a {@link EventMessage} between client and server. */
@JsonDeserialize(using = RequestDeserializer.class) @JsonDeserialize(using = RequestDeserializer.class)
public abstract class Request { public abstract class Request {
public RequestType type;
@JsonProperty("requestType") public RequestType type;
@Override @Override