TheThingsIndustries / protoc-gen-fieldmask

Generate field mask utilities from proto files
Apache License 2.0
10 stars 3 forks source link

Oneof validation #32

Closed rvolosatovs closed 4 years ago

rvolosatovs commented 4 years ago

Summary

Only set oneof should be validated if not explicitly specified

Steps to Reproduce

  1. Generate validation code for a oneof

What do you see now?

If no explicit path is supplied to the validator of a oneof, it defaults to validate all possible oneofs

What do you want to see instead?

If no explicit path is supplied to the validator of a oneof, it should only validate the one, which set

How do you propose to implement this?

Check, which oneof is set and validate it

Can you do this yourself and submit a Pull Request?

yes