Skip to content

Commit

Permalink
declare editions support range
Browse files Browse the repository at this point in the history
  • Loading branch information
sudorandom committed Sep 4, 2024
1 parent 84c4726 commit a8640bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"path/filepath"
"strings"

"github.com/golang/protobuf/protoc-gen-go/descriptor"
"github.com/lmittmann/tint"
"github.com/pb33f/libopenapi"
base "github.com/pb33f/libopenapi/datamodel/high/base"
Expand Down Expand Up @@ -225,10 +226,12 @@ func Convert(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorRespons
})
}

features := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
features := uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL | pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS)
return &pluginpb.CodeGeneratorResponse{
File: files,
SupportedFeatures: &features,
MinimumEdition: proto.Int32(int32(descriptor.Edition_EDITION_PROTO2)),
MaximumEdition: proto.Int32(int32(descriptor.Edition_EDITION_2024)),
File: files,
}, nil
}

Expand Down

0 comments on commit a8640bc

Please sign in to comment.