You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -195,8 +190,8 @@ export class RequestParameterMutator {
195
190
constproperties=hasXOf
196
191
? xOfProperties(schema)
197
192
: type==='object'
198
-
? Object.keys(schema.properties??{})
199
-
: [];
193
+
? Object.keys(schema.properties??{})
194
+
: [];
200
195
201
196
this.explodedJsonObjectAndMutateRequest(
202
197
req,
@@ -248,23 +243,49 @@ export class RequestParameterMutator {
248
243
}
249
244
}
250
245
246
+
/**
247
+
* used for !explode array parameters
248
+
* @param req
249
+
* @param $in
250
+
* @param name
251
+
* @param delimiter
252
+
* @param rawQuery
253
+
* @private
254
+
*/
251
255
privateparseJsonArrayAndMutateRequest(
252
256
req: Request,
253
257
$in: string,
254
258
name: string,
255
259
delimiter: string,
260
+
rawQuery: Map<string,string[]>,
256
261
): void{
257
262
/**
258
-
* array deserialization
263
+
* array deserialization for query and params
259
264
* filter=foo,bar,baz
260
265
* filter=foo|bar|baz
261
266
* filter=foo%20bar%20baz
262
267
*/
263
268
constfield=REQUEST_FIELDS[$in];
269
+
constrawValues=[]
270
+
if(['query'].includes($in)){
271
+
// perhaps split query from params
272
+
rawValues.concat(rawQuery.get(name)??[]);
273
+
}
274
+
275
+
leti=0;
264
276
if(req[field]?.[name]){
265
277
if(Array.isArray(req[field][name]))return;
266
278
constvalue=req[field][name].split(delimiter);
267
-
req[field][name]=value;
279
+
constrawValue=rawValues[i++];
280
+
if(rawValue?.includes(delimiter)){// TODO add && !allowReserved to improve performance. When allowReserved is true, commas are common and we do not need to do this extra work
281
+
// Currently, rawValue is only populated for query params
282
+
// if the raw value contains a delimiter, decode manually
283
+
// parse the decode value and update req[field][name]
0 commit comments