Skip to content

Commit

Permalink
Deployments bug fix #17 (#19)
Browse files Browse the repository at this point in the history
* Changed the @notempty annotation on the port field of the Deployment entity class to @NotNull and @min.

* Added also the @max annotation to the port field of the Deployment entity class.
  • Loading branch information
deanone authored Jan 24, 2023
1 parent 1079e6a commit b0194f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.Max;
import java.util.Date;

@Document(collection = "deployments")
Expand Down Expand Up @@ -51,7 +53,9 @@ public class Deployment {
@NotEmpty
private String k8s_url;

@NotEmpty
@NotNull
@Min(value = 1, message = "Port is a positive integer number (up to 65535).")
@Max(value = 65535, message = "Port is a positive integer number (up to 65535).")
private Integer port;

private Integer replicas;
Expand Down

0 comments on commit b0194f6

Please sign in to comment.