aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-02-22 12:48:18 -0800
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-02-22 12:48:18 -0800
commitb9125082245ba32e793b9969ec5757f9786a77b8 (patch)
treee52df97930566f560e040aaa214d965e80ba8437
parent9f791595903b926e32b3d2ec5d959cfe1a3e1e78 (diff)
parenta3d7794df60b407a552befebf45c92e23415ab52 (diff)
Merge pull request #5331 from murgatroid99/node_message_reflection_info
Add more reflection information to Node client classes
-rw-r--r--src/node/src/client.js4
-rw-r--r--src/node/src/common.js2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/node/src/client.js b/src/node/src/client.js
index c02c44730e..c65dd73650 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -648,8 +648,8 @@ exports.makeClientConstructor = function(methods, serviceName) {
var deserialize = attrs.responseDeserialize;
Client.prototype[name] = requester_makers[method_type](
attrs.path, serialize, deserialize);
- Client.prototype[name].serialize = serialize;
- Client.prototype[name].deserialize = deserialize;
+ // Associate all provided attributes with the method
+ _.assign(Client.prototype[name], attrs);
});
return Client;
diff --git a/src/node/src/common.js b/src/node/src/common.js
index e5217608ec..7705a275fc 100644
--- a/src/node/src/common.js
+++ b/src/node/src/common.js
@@ -146,6 +146,8 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
path: prefix + method.name,
requestStream: method.requestStream,
responseStream: method.responseStream,
+ requestType: method.resolvedRequestType,
+ responseType: method.resolvedResponseType,
requestSerialize: serializeCls(method.resolvedRequestType.build()),
requestDeserialize: deserializeCls(method.resolvedRequestType.build(),
binaryAsBase64, longsAsStrings),