Skip to content

Commit

Permalink
fix(core): incorrect usage of validation annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Nov 17, 2023
1 parent 0b42eed commit fdd1579
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion core/src/main/java/io/kestra/core/models/flows/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public abstract class Input<T> {
@Pattern(regexp="^[a-zA-Z0-9][.a-zA-Z0-9_-]*")
String name;

@NotBlank
@NotNull
@Valid
Type type;
Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/io/kestra/core/tasks/flows/Dag.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.kestra.core.runners.RunContext;
import io.kestra.core.utils.GraphUtils;
import io.kestra.core.validations.DagTaskValidation;
import io.micronaut.core.annotation.Introspected;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
Expand Down Expand Up @@ -79,7 +80,6 @@
)
public class Dag extends Task implements FlowableTask<VoidOutput> {
@NotNull
@NotBlank
@Builder.Default
@Schema(
title = "Number of concurrent parallel tasks",
Expand All @@ -88,6 +88,7 @@ public class Dag extends Task implements FlowableTask<VoidOutput> {
@PluginProperty
private final Integer concurrent = 0;

@Valid
@NotEmpty
private List<DagTask> tasks;

Expand Down Expand Up @@ -211,6 +212,7 @@ private ArrayList<String> nestedDependencies(DagTask taskDepend, List<DagTask> t
@EqualsAndHashCode
@Getter
@NoArgsConstructor
@Introspected
public static class DagTask {
@NotNull
@PluginProperty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
)
public class EachParallel extends Parallel implements FlowableTask<VoidOutput> {
@NotNull
@NotBlank
@Builder.Default
@Schema(
title = "Number of concurrent parallel tasks",
Expand All @@ -101,7 +100,6 @@ public class EachParallel extends Parallel implements FlowableTask<VoidOutput> {
private final Integer concurrent = 0;

@NotNull
@NotBlank
@PluginProperty(dynamic = true)
@Schema(
title = "The list of values for this task",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
)
public class EachSequential extends Sequential implements FlowableTask<VoidOutput> {
@NotNull
@NotBlank
@PluginProperty(dynamic = true)
@Schema(
title = "The list of values for this task",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
)
public class Parallel extends Task implements FlowableTask<VoidOutput> {
@NotNull
@NotBlank
@Builder.Default
@Schema(
title = "Number of concurrent parallel tasks",
Expand Down

0 comments on commit fdd1579

Please sign in to comment.