Closed NOMORECOFFEE closed 5 years ago
transport.NewCompoundServiceDesc().SwaggerDef() return: {"definitions":null,"paths":null} expect: {"definitions":{},"paths":{}} or not panic in example
transport.NewCompoundServiceDesc().SwaggerDef()
{"definitions":null,"paths":null}
{"definitions":{},"paths":{}}
s1 := transport.NewCompoundServiceDesc() s2 := transport.NewCompoundServiceDesc(s1) s2.SwaggerDef() // <-- panic
I think you shouldn't call type cast before nil check https://github.com/utrack/clay/blob/master/transport/swagcombo.go#L30-L36
nil
transport.NewCompoundServiceDesc().SwaggerDef()
return:{"definitions":null,"paths":null}
expect:{"definitions":{},"paths":{}}
or not panic in exampleI think you shouldn't call type cast before
nil
check https://github.com/utrack/clay/blob/master/transport/swagcombo.go#L30-L36