mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 02:32:45 +00:00
This commit is contained in:
@@ -306,16 +306,16 @@
|
|||||||
}
|
}
|
||||||
switch (collectionFormat) {
|
switch (collectionFormat) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
return param.map(this.paramToString).join(',');
|
return param.map(this.paramToString, this).join(',');
|
||||||
case 'ssv':
|
case 'ssv':
|
||||||
return param.map(this.paramToString).join(' ');
|
return param.map(this.paramToString, this).join(' ');
|
||||||
case 'tsv':
|
case 'tsv':
|
||||||
return param.map(this.paramToString).join('\t');
|
return param.map(this.paramToString, this).join('\t');
|
||||||
case 'pipes':
|
case 'pipes':
|
||||||
return param.map(this.paramToString).join('|');
|
return param.map(this.paramToString, this).join('|');
|
||||||
case 'multi':
|
case 'multi':
|
||||||
// return the array directly as SuperAgent will handle it as expected
|
// return the array directly as SuperAgent will handle it as expected
|
||||||
return param.map(this.paramToString);
|
return param.map(this.paramToString, this);
|
||||||
default:
|
default:
|
||||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,16 +272,16 @@ class ApiClient {
|
|||||||
}
|
}
|
||||||
switch (collectionFormat) {
|
switch (collectionFormat) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
return param.map(this.paramToString).join(',');
|
return param.map(this.paramToString, this).join(',');
|
||||||
case 'ssv':
|
case 'ssv':
|
||||||
return param.map(this.paramToString).join(' ');
|
return param.map(this.paramToString, this).join(' ');
|
||||||
case 'tsv':
|
case 'tsv':
|
||||||
return param.map(this.paramToString).join('\t');
|
return param.map(this.paramToString, this).join('\t');
|
||||||
case 'pipes':
|
case 'pipes':
|
||||||
return param.map(this.paramToString).join('|');
|
return param.map(this.paramToString, this).join('|');
|
||||||
case 'multi':
|
case 'multi':
|
||||||
//return the array directly as SuperAgent will handle it as expected
|
//return the array directly as SuperAgent will handle it as expected
|
||||||
return param.map(this.paramToString);
|
return param.map(this.paramToString, this);
|
||||||
default:
|
default:
|
||||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,16 +270,16 @@ class ApiClient {
|
|||||||
}
|
}
|
||||||
switch (collectionFormat) {
|
switch (collectionFormat) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
return param.map(this.paramToString).join(',');
|
return param.map(this.paramToString, this).join(',');
|
||||||
case 'ssv':
|
case 'ssv':
|
||||||
return param.map(this.paramToString).join(' ');
|
return param.map(this.paramToString, this).join(' ');
|
||||||
case 'tsv':
|
case 'tsv':
|
||||||
return param.map(this.paramToString).join('\t');
|
return param.map(this.paramToString, this).join('\t');
|
||||||
case 'pipes':
|
case 'pipes':
|
||||||
return param.map(this.paramToString).join('|');
|
return param.map(this.paramToString, this).join('|');
|
||||||
case 'multi':
|
case 'multi':
|
||||||
//return the array directly as SuperAgent will handle it as expected
|
//return the array directly as SuperAgent will handle it as expected
|
||||||
return param.map(this.paramToString);
|
return param.map(this.paramToString, this);
|
||||||
default:
|
default:
|
||||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,16 +270,16 @@ class ApiClient {
|
|||||||
}
|
}
|
||||||
switch (collectionFormat) {
|
switch (collectionFormat) {
|
||||||
case 'csv':
|
case 'csv':
|
||||||
return param.map(this.paramToString).join(',');
|
return param.map(this.paramToString, this).join(',');
|
||||||
case 'ssv':
|
case 'ssv':
|
||||||
return param.map(this.paramToString).join(' ');
|
return param.map(this.paramToString, this).join(' ');
|
||||||
case 'tsv':
|
case 'tsv':
|
||||||
return param.map(this.paramToString).join('\t');
|
return param.map(this.paramToString, this).join('\t');
|
||||||
case 'pipes':
|
case 'pipes':
|
||||||
return param.map(this.paramToString).join('|');
|
return param.map(this.paramToString, this).join('|');
|
||||||
case 'multi':
|
case 'multi':
|
||||||
//return the array directly as SuperAgent will handle it as expected
|
//return the array directly as SuperAgent will handle it as expected
|
||||||
return param.map(this.paramToString);
|
return param.map(this.paramToString, this);
|
||||||
default:
|
default:
|
||||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user