avoid panic on empty swagger info element
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
f814b489db
commit
f6cfb2de1e
@ -87,7 +87,9 @@ func (g *openapiv3Generator) buildDocumentV3(plugin *protogen.Plugin) *v3.Docume
|
|||||||
if doc.Openapi != "" {
|
if doc.Openapi != "" {
|
||||||
d.Openapi = doc.Openapi
|
d.Openapi = doc.Openapi
|
||||||
}
|
}
|
||||||
d.Info = proto.Clone(doc.Info).(*v3.Info)
|
if doc.Info != nil {
|
||||||
|
d.Info = proto.Clone(doc.Info).(*v3.Info)
|
||||||
|
}
|
||||||
d.Servers = append(d.Servers, doc.Servers...)
|
d.Servers = append(d.Servers, doc.Servers...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user