Skip to content

Commit

Permalink
Fix documentation and validation on `UpdateModulesRequest.default_lab…
Browse files Browse the repository at this point in the history
…el_name` (#108)

If present, it must be non-empty and may not point to an archived label.
  • Loading branch information
saquibmian committed May 8, 2024
1 parent 1ad2f24 commit e92b877
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions buf/registry/module/v1/module_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ message UpdateModulesRequest {
//
// This Label may not yet exist.
//
// This may point to an archived Label.
optional string default_label_name = 7 [(buf.validate.field).string.max_len = 250];
// This may not point to an archived Label.
optional string default_label_name = 7 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.max_len = 250
];
}
// The Modules to update.
repeated Value values = 1 [
Expand Down
7 changes: 5 additions & 2 deletions buf/registry/module/v1beta1/module_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ message UpdateModulesRequest {
//
// This Label may not yet exist.
//
// This may point to an archived Label.
optional string default_label_name = 7 [(buf.validate.field).string.max_len = 250];
// This may not point to an archived Label.
optional string default_label_name = 7 [
(buf.validate.field).string.min_len = 1,
(buf.validate.field).string.max_len = 250
];
}
// The Modules to update.
repeated Value values = 1 [
Expand Down

0 comments on commit e92b877

Please sign in to comment.