Skip to content

Commit 66b5dae

Browse files
authored
fix(api); validate runner type (#655)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 7812df1 commit 66b5dae

File tree

3 files changed

+70
-56
lines changed

3 files changed

+70
-56
lines changed

app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go

Lines changed: 53 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/workflowcontract/v1/crafting_schema.pb.validate.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/workflowcontract/v1/crafting_schema.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ message CraftingSchema {
3535
repeated Annotation annotations = 5;
3636

3737
message Runner {
38-
RunnerType type = 1 [(validate.rules).enum = {
39-
not_in: [0]
40-
}];
38+
RunnerType type = 1 [
39+
(validate.rules).enum = {
40+
not_in: [0]
41+
},
42+
(validate.rules).enum.defined_only = true
43+
];
4144

4245
enum RunnerType {
4346
RUNNER_TYPE_UNSPECIFIED = 0;

0 commit comments

Comments
 (0)