Skip to content
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 more examples #93

Merged
merged 13 commits into from
Sep 19, 2023
Merged

Add more examples #93

merged 13 commits into from
Sep 19, 2023

Conversation

oliversun9
Copy link
Contributor

@oliversun9 oliversun9 commented Sep 18, 2023

option_* cover most features from the standard options.

cel_* cover most features from CEL's feature list. Exception:

  • From timestamp's getFooFromBar family, including getDate, getDayOfMonth, getDayOfYear, getFullYear, getHours, getMilliseconds, getMinutes, getMonth and getSeconds, only getDayOrWeek is covered, but there is a comment mentioning all the rest and a link to this feature list.

cel_* also cover custom CEL functions and overloads

// `gte = +inf` validates that the number must be greater than positve infinity.
// This means mystery_index must be +inf.
// protoc fails to compile this line but Buf compiles it successfully:
// float mystery_index = 3 [(buf.validate.field).float.gte = +inf];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems protoc cannot compile this line, and make test fails at this line.

@oliversun9 oliversun9 marked this pull request as ready for review September 19, 2023 19:18
@bufdev
Copy link
Member

bufdev commented Sep 19, 2023

Merging this as-is and let's continue to improve it later

@bufdev bufdev merged commit 4655215 into main Sep 19, 2023
@bufdev bufdev deleted the osun/more-examples branch September 19, 2023 19:20
emcfarlane added a commit that referenced this pull request Sep 21, 2023
Tiny fix from #93 adds
back the links in the examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants