Skip to content

Commit 6e5a26b

Browse files
Add min and max for editions
1 parent 8ffc743 commit 6e5a26b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"flag"
55

66
"google.golang.org/protobuf/compiler/protogen"
7+
"google.golang.org/protobuf/types/descriptorpb"
78
"google.golang.org/protobuf/types/pluginpb"
89

910
"github.com/technicallyjosh/protoc-gen-openapi/internal/generator"
@@ -32,6 +33,9 @@ func main() {
3233

3334
opts.Run(func(plugin *protogen.Plugin) error {
3435
plugin.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) | uint64(pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS)
36+
plugin.SupportedEditionsMinimum = descriptorpb.Edition_EDITION_PROTO2
37+
plugin.SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023
38+
3539
return generator.New(plugin, conf).Run()
3640
})
3741
}

0 commit comments

Comments
 (0)