Skip to content

Commit

Permalink
Merge pull request #91 from josephschorr/optional-resource-type
Browse files Browse the repository at this point in the history
Make sure to mark the resource_type as optional in the validation regex
  • Loading branch information
josephschorr authored Feb 6, 2024
2 parents 1e53496 + c6841ed commit 1485497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ message RelationshipFilter {
// resource_type is the *optional* resource type of the relationship.
// NOTE: It is not prefixed with "optional_" for legacy compatibility.
string resource_type = 1 [ (validate.rules).string = {
pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$",
pattern : "^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$",
max_bytes : 128,
} ];

Expand Down

0 comments on commit 1485497

Please sign in to comment.