-
Notifications
You must be signed in to change notification settings - Fork 472
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
API Spec Should Provide Source and/or Description of RegEx Validation #3306
Comments
@Devaansh-Kumar are you interested in taking this? |
@robscott my understanding of this request is that we want to add a note for where we took the regex from, but we dont want this in the CRD. I believe we can generalize this to more than just a regex but all comments we want to add on the go struct but not on the CRD. Just making sure we are on the same page? |
Yep, I don't think we want to overuse this pattern and have comments for anything, but agree that the overall pattern can/should be generalized any time we want to have comments like this. |
Yes @LiorLieberman, I can take this up. |
/assign |
What would you like to be added:
Ideally the API spec should have more information about RegEx validation, for example where it came from or what it's based on. This should be visible in go type definitions but hidden from the generated CRD.
Why this is needed:
We rely heavily on RegEx validation and it can be difficult to ensure that our validation is well aligned with the relevant RFC or k8s concept. A simple reference or description of how we landed at a specific RegEx would be very helpful for future readers. Since we already have custom CRD gen, it would be relatively simple to build something like this to enable the concept:
gateway-api/pkg/generator/main.go
Lines 209 to 210 in b4bff75
The text was updated successfully, but these errors were encountered: