Add missing field validations #245
Labels
c/shared
This is shared between components
compat/api
This could affect API compatibility
in progress
We're working on it
Milestone
Summary:
Currently there is a bunch of fields in our API, which lack validation options.
E.g.
lorawan-stack/api/end_device.proto
Lines 144 to 147 in 4f5dc70
Refs #51 #69
Why do we need this?
To make sure we don't store garbage
What is already there? What do you see now?
Possible garbage in fields
What is missing? What do you want to see?
Validation
How do you propose to implement this?
Add the validators.
For the exact case linked I propose
(validate.rules).enum.defined_only = true
and
(validate.rules).enum.not_in = [0]
See https://github.com/lyft/protoc-gen-validate#enums
The text was updated successfully, but these errors were encountered: