From 8fcbab344ea03bc037e4e1818b164e4a5b35b5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Rold=C3=A1n=20Betancort?= Date: Tue, 16 Jan 2024 17:59:48 +0000 Subject: [PATCH] compiler: adds a helper method to require any object type prefix --- pkg/schemadsl/compiler/compiler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/schemadsl/compiler/compiler.go b/pkg/schemadsl/compiler/compiler.go index 0f961bd43a..d3245589cc 100644 --- a/pkg/schemadsl/compiler/compiler.go +++ b/pkg/schemadsl/compiler/compiler.go @@ -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) } }