File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,12 @@ import (
88
99 "github.com/getkin/kin-openapi/openapi3"
1010 "github.com/stretchr/objx"
11- oapiv1 "github.com/technicallyjosh/protoc-gen-openapi/api/oapi/v1"
12- "github.com/technicallyjosh/protoc-gen-openapi/internal/generator/util"
1311 "google.golang.org/protobuf/compiler/protogen"
1412 "google.golang.org/protobuf/proto"
1513 "gopkg.in/yaml.v3"
14+
15+ oapiv1 "github.com/technicallyjosh/protoc-gen-openapi/api/oapi/v1"
16+ "github.com/technicallyjosh/protoc-gen-openapi/internal/generator/util"
1617)
1718
1819// Config holds the configuration for the generator.
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ package main
33import (
44 "flag"
55
6- "github.com/technicallyjosh/protoc-gen-openapi/internal/generator"
76 "google.golang.org/protobuf/compiler/protogen"
7+ "google.golang.org/protobuf/types/pluginpb"
8+
9+ "github.com/technicallyjosh/protoc-gen-openapi/internal/generator"
810)
911
1012func main () {
@@ -29,6 +31,7 @@ func main() {
2931 }
3032
3133 opts .Run (func (plugin * protogen.Plugin ) error {
34+ plugin .SupportedFeatures = uint64 (pluginpb .CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL ) | uint64 (pluginpb .CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS )
3235 return generator .New (plugin , conf ).Run ()
3336 })
3437}
You can’t perform that action at this time.
0 commit comments