Skip to content

Commit

Permalink
Merge pull request #1710 from authzed/add-helper-require-object-type-…
Browse files Browse the repository at this point in the history
…prefix

compiler: adds a helper method to require any object type prefix
  • Loading branch information
josephschorr authored Jan 18, 2024
2 parents 2149e2a + 8fcbab3 commit facdadd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/schemadsl/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func ObjectTypePrefix(prefix string) ObjectPrefixOption {
return func(cfg *config) { cfg.objectTypePrefix = &prefix }
}

func RequirePrefixedObjectType() ObjectPrefixOption {
return func(cfg *config) { cfg.objectTypePrefix = nil }
}

func AllowUnprefixedObjectType() ObjectPrefixOption {
return func(cfg *config) { cfg.objectTypePrefix = new(string) }
}
Expand Down

0 comments on commit facdadd

Please sign in to comment.