Skip to content

What is the valid regex or the valid characters for the name of a type in a model? #302

Answered by rhamzeh
bubianchi-criteo asked this question in Q&A
Discussion options

You must be logged in to vote

The correct regex is the one used by the API:

There's additionally these set of regexes defined in the API:
https://github.com/openfga/openfga/blob/main/pkg/tuple/tuple.go#L35-L38

	userIDRegex   = regexp.MustCompile(`^[^:#\s]+$`)
	objectRegex   = regexp.MustCompile(`^[^:#\s]+:[^#:\s]+…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bubianchi-criteo
Comment options

@bubianchi-criteo
Comment options

@rhamzeh
Comment options

@bubianchi-criteo
Comment options

Answer selected by bubianchi-criteo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants