@@ -20,8 +20,9 @@ var util = require("./util");
20
20
* @param {boolean|Object.<string,*> } [responseStream] Whether the response is streamed
21
21
* @param {Object.<string,*> } [options] Declared options
22
22
* @param {string } [comment] The comment for this method
23
+ * @param {Object.<string,*> } [parsedOptions] Declared options, properly parsed into an object
23
24
*/
24
- function Method ( name , type , requestType , responseType , requestStream , responseStream , options , comment ) {
25
+ function Method ( name , type , requestType , responseType , requestStream , responseStream , options , comment , parsedOptions ) {
25
26
26
27
/* istanbul ignore next */
27
28
if ( util . isObject ( requestStream ) ) {
@@ -93,6 +94,11 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
93
94
* @type {string|null }
94
95
*/
95
96
this . comment = comment ;
97
+
98
+ /**
99
+ * Options properly parsed into an object
100
+ */
101
+ this . parsedOptions = parsedOptions ;
96
102
}
97
103
98
104
/**
@@ -104,6 +110,8 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
104
110
* @property {boolean } [requestStream=false] Whether requests are streamed
105
111
* @property {boolean } [responseStream=false] Whether responses are streamed
106
112
* @property {Object.<string,*> } [options] Method options
113
+ * @property {string } comment Method comments
114
+ * @property {Object.<string,*> } [parsedOptions] Method options properly parsed into an object
107
115
*/
108
116
109
117
/**
@@ -114,7 +122,7 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
114
122
* @throws {TypeError } If arguments are invalid
115
123
*/
116
124
Method . fromJSON = function fromJSON ( name , json ) {
117
- return new Method ( name , json . type , json . requestType , json . responseType , json . requestStream , json . responseStream , json . options , json . comment ) ;
125
+ return new Method ( name , json . type , json . requestType , json . responseType , json . requestStream , json . responseStream , json . options , json . comment , json . parsedOptions ) ;
118
126
} ;
119
127
120
128
/**
@@ -131,7 +139,8 @@ Method.prototype.toJSON = function toJSON(toJSONOptions) {
131
139
"responseType" , this . responseType ,
132
140
"responseStream" , this . responseStream ,
133
141
"options" , this . options ,
134
- "comment" , keepComments ? this . comment : undefined
142
+ "comment" , keepComments ? this . comment : undefined ,
143
+ "parsedOptions" , this . parsedOptions ,
135
144
] ) ;
136
145
} ;
137
146
0 commit comments