Skip to content

Commit

Permalink
Added @notempty annotation to required fields (deployment object) (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
theioakiti authored Jan 10, 2023
1 parent 3dc9dbc commit 1079e6a
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;

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

Expand All @@ -20,53 +21,56 @@ public class Deployment {
@Id
private String id;

@NotNull
@NotEmpty
private String user_id;

@NotEmpty
private String user;

//@DocumentReference
//private User user;

//@NotNull
@NotEmpty
private String git_credentials_id;

//@DocumentReference
//private GitCredentials gitCredentials;

@NotNull
@NotEmpty
private String name;

@NotEmpty
private String project;

//@NotNull
//private String url;

@NotNull
@NotEmpty
private String service_url;

@NotEmpty
private String k8s_url;

@NotEmpty
private Integer port;

private Integer replicas;

//@NotNull
@NotEmpty
private String workflow_id;

//@DocumentReference
//private Workflow workflow;

@NotNull
@NotEmpty
private String service_id;

//@DocumentReference
//private Service service;

@NotNull
private String version;

//@NotNull
@NotEmpty
private String state;

@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
Expand Down

0 comments on commit 1079e6a

Please sign in to comment.