Skip to content
Permalink
Browse files

Merge pull request #2784 from telstra/fix/json-deserialization-when-s…

…witch-sync-error

Fixed JSON deserialization when switch sync error.
  • Loading branch information...
timofei-durakov committed Sep 11, 2019
2 parents 6efa1c5 + 0e8cb55 commit a76c61a4175e8588ddd13b86453cacd0a5d65421
@@ -20,25 +20,24 @@
import org.openkilda.model.SwitchId;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.EqualsAndHashCode;
import lombok.Value;

/**
* Defines the payload of a Message representing an error of sync switch rules.
*/
@Value
@JsonSerialize
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SwitchSyncErrorData extends ErrorData {

@JsonIgnore
@JsonProperty("switch-id")
private SwitchId switchId;

@JsonCreator
public SwitchSyncErrorData(SwitchId switchId,
public SwitchSyncErrorData(@JsonProperty("switch-id") SwitchId switchId,
@JsonProperty("error-type") ErrorType errorType,
@JsonProperty("error-message") String errorMessage,
@JsonProperty("error-description") String errorDescription) {

0 comments on commit a76c61a

Please sign in to comment.
You can’t perform that action at this time.