From 8498cb3d838ef472c5308450b6b563b81c8bab0e Mon Sep 17 00:00:00 2001 From: Rucciva Date: Tue, 18 Jun 2024 15:13:56 +0700 Subject: [PATCH] prefix enum --- internal/proxy/generate.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/proxy/generate.go b/internal/proxy/generate.go index ccc35be..e110fca 100644 --- a/internal/proxy/generate.go +++ b/internal/proxy/generate.go @@ -76,6 +76,9 @@ func Generate(ctx context.Context, specPath string, opts GenerateOptions) (bytes code, err := codegen.Generate(kinspec, codegen.Configuration{ PackageName: opts.PackageName, + Compatibility: codegen.CompatibilityOptions{ + AlwaysPrefixEnumValues: true, + }, Generate: codegen.GenerateOptions{ EchoServer: true, Strict: true, @@ -129,6 +132,9 @@ func Generate(ctx context.Context, specPath string, opts GenerateOptions) (bytes } code, err := codegen.Generate(kinspec, codegen.Configuration{ + Compatibility: codegen.CompatibilityOptions{ + AlwaysPrefixEnumValues: true, + }, Generate: codegen.GenerateOptions{ EchoServer: true, Strict: true,