We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Let's plan on moving this logic to language and have test cases for them, we can then implement this in several languages consistently
Originally posted by @rhamzeh in openfga/vscode-ext#215 (review)
Current set of regexes used:
Protos:
"^[^:#@\\s]{1,254}$"
"^[^:#@\\s]{1,50}$"
"^[^\\s]{2,256}$"
API: https://github.com/openfga/openfga/blob/main/pkg/tuple/tuple.go#L35-L38
userIDRegex = regexp.MustCompile(`^[^:#\s]+$`) objectRegex = regexp.MustCompile(`^[^:#\s]+:[^#:\s]+$`) userSetRegex = regexp.MustCompile(`^[^:#\s]+:[^#\s]+#[^:#\s]+$`) relationRegex = regexp.MustCompile(`^[^:#@\s]+$`)
Validation has to pass both sets of regexes above in order to be valid according to the API.
On the VS Code/Playground side we use a different set of less permissive regexes: https://github.com/openfga/vscode-ext/blob/07e65ccd3a0d533bcbbb2b4495899d73d2656e3b/server/src/openfga-yaml-schema.ts#L126-L154
We have yet more regexes in language:
language/pkg/js/validator/validate-dsl.ts
Lines 7 to 10 in 35310a2
The text was updated successfully, but these errors were encountered:
d-jeffery
No branches or pull requests
Originally posted by @rhamzeh in openfga/vscode-ext#215 (review)
Current set of regexes used:
Protos:
"^[^:#@\\s]{1,254}$"
"^[^:#@\\s]{1,50}$"
"^[^\\s]{2,256}$"
"^[^\\s]{2,256}$"
API:
https://github.com/openfga/openfga/blob/main/pkg/tuple/tuple.go#L35-L38
Validation has to pass both sets of regexes above in order to be valid according to the API.
On the VS Code/Playground side we use a different set of less permissive regexes:
https://github.com/openfga/vscode-ext/blob/07e65ccd3a0d533bcbbb2b4495899d73d2656e3b/server/src/openfga-yaml-schema.ts#L126-L154
We have yet more regexes in language:
language/pkg/js/validator/validate-dsl.ts
Lines 7 to 10 in 35310a2
The text was updated successfully, but these errors were encountered: