Skip to content

Commit

Permalink
adding validation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
akoserwal committed Nov 14, 2024
1 parent d4d25f5 commit f518eaf
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 81 deletions.
166 changes: 86 additions & 80 deletions api/kessel/inventory/v1beta1/resources/k8s_cluster_detail.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ message K8sClusterDetail {

ClusterStatus cluster_status = 499346904 [ json_name = "cluster_status", (buf.validate.field).enum = {not_in: [0], defined_only: true} ];

string cluster_reason = 499346905 [ json_name = "cluster_reason"];
optional string cluster_reason = 499346905 [ json_name = "cluster_reason",
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.max_len = 1024,
(buf.validate.field).string.pattern = "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
];

// The version of kubernetes
string kube_version = 395858490 [ json_name = "kube_version" ];
Expand Down

0 comments on commit f518eaf

Please sign in to comment.