language
language copied to clipboard
Validation consistency for condition names & references
Go through:
- https://github.com/openfga/api/blob/c96ec773cae9caf2a9536856bf1fa206a42ef7ef/openfga/v1/openfga.proto#L92
- https://github.com/openfga/api/blob/c96ec773cae9caf2a9536856bf1fa206a42ef7ef/openfga/v1/authzmodel.proto#L137
- https://github.com/openfga/language/blob/main/pkg/go/validation/validation-rules.go#L13
And make sure the validation is consistent for all three? Let's make it {1,50}
@rhamzeh
With all 3 have different regexes here; the language version is the source of truth, right?
Are you concerned about a breaking change by restricting the condition name reference from 256 to 50 characters?
Use {1,50}
Use
{1,50}
What about the difference in the patterns?
[^\\s] vs [^:#@\\s] vs [^\\*\\s]