Skip to content

Commit

Permalink
genopenapi: set source code info explicitly (#3544)
Browse files Browse the repository at this point in the history
Fixes #3542
  • Loading branch information
johanbrandhorst committed Aug 25, 2023
1 parent 212aa13 commit a7dbd77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protoc-gen-openapiv2/internal/genopenapi/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ func (so openapiSwaggerObject) sortPathsAlphabetically() {
func AddErrorDefs(reg *descriptor.Registry) error {
// load internal protos
any := protodesc.ToFileDescriptorProto((&anypb.Any{}).ProtoReflect().Descriptor().ParentFile())
any.SourceCodeInfo = new(descriptorpb.SourceCodeInfo)
status := protodesc.ToFileDescriptorProto((&statuspb.Status{}).ProtoReflect().Descriptor().ParentFile())
status.SourceCodeInfo = new(descriptorpb.SourceCodeInfo)
return reg.Load(&pluginpb.CodeGeneratorRequest{
ProtoFile: []*descriptorpb.FileDescriptorProto{
any,
Expand Down

0 comments on commit a7dbd77

Please sign in to comment.