diff --git a/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java b/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java index f59d5326b3..bfad9ef897 100644 --- a/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java +++ b/openbas-api/src/main/java/io/openbas/rest/payload/form/PayloadUpsertInput.java @@ -1,9 +1,11 @@ package io.openbas.rest.payload.form; import com.fasterxml.jackson.annotation.JsonProperty; +import io.openbas.database.model.Payload; import io.openbas.database.model.PayloadArgument; import io.openbas.database.model.PayloadPrerequisite; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.Setter; @@ -23,13 +25,13 @@ public class PayloadUpsertInput { @JsonProperty("payload_name") private String name; - @NotBlank(message = MANDATORY_MESSAGE) + @NotNull(message = MANDATORY_MESSAGE) @JsonProperty("payload_source") - private String source; + private Payload.PAYLOAD_SOURCE source; - @NotBlank(message = MANDATORY_MESSAGE) + @NotNull(message = MANDATORY_MESSAGE) @JsonProperty("payload_status") - private String status; + private Payload.PAYLOAD_STATUS status; @NotBlank(message = MANDATORY_MESSAGE) @JsonProperty("payload_external_id")