diff --git a/extractor.go b/extractor.go index 753cc17..8b3ed4f 100644 --- a/extractor.go +++ b/extractor.go @@ -90,14 +90,19 @@ func extractEndpoint(method reflect.Method) *registry.Endpoint { request := extractValue(reqType, 0) response := extractValue(rspType, 0) - return ®istry.Endpoint{ + ep := ®istry.Endpoint{ Name: method.Name, Request: request, Response: response, - Metadata: map[string]string{ - "stream": fmt.Sprintf("%v", stream), - }, } + + if stream { + ep.Metadata = map[string]string{ + "stream": fmt.Sprintf("%v", stream), + } + } + + return ep } func extractSubValue(typ reflect.Type) *registry.Value {