-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proto validation for Projects #4909
Conversation
@@ -2317,7 +2317,14 @@ message UpdateProjectRequest { | |||
]; | |||
|
|||
// description is the description of the project to update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is uninterpreted text, right (not Markdown)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, also confirmed it with Giuseppe 👍
@@ -2336,7 +2343,14 @@ message ProjectPatch { | |||
]; | |||
|
|||
// description is the description of the project to update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it 👍
proto/minder/v1/minder.proto
Outdated
string description = 3 [ | ||
(buf.validate.field).string = { | ||
pattern: "[[:space:][:punct:][:word:]]*", | ||
min_len: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If min_len
is 0, you don't need the ignore
annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it 👍
// subject is the subject to which the role is assigned. | ||
string subject = 2; | ||
string subject = 2 [ | ||
(buf.validate.field).string = {uuid: true}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure these are always UUIDs, but they may happen to be UUIDs for now. I think it's okay to leave this as-is at the moment.
Signed-off-by: Radoslav Dimitrov <[email protected]>
Signed-off-by: Radoslav Dimitrov <[email protected]>
aea725f
to
7bf7e26
Compare
Summary
Ref https://github.com/stacklok/minder-stories/issues/94
Change Type
Mark the type of change your PR introduces:
Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist: