Skip to content

Commit 1485497

Browse files
authored
Merge pull request #91 from josephschorr/optional-resource-type
Make sure to mark the resource_type as optional in the validation regex
2 parents 1e53496 + c6841ed commit 1485497

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

authzed/api/v1/permission_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ message RelationshipFilter {
132132
// resource_type is the *optional* resource type of the relationship.
133133
// NOTE: It is not prefixed with "optional_" for legacy compatibility.
134134
string resource_type = 1 [ (validate.rules).string = {
135-
pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$",
135+
pattern : "^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$",
136136
max_bytes : 128,
137137
} ];
138138

0 commit comments

Comments
 (0)