forked from loafle/openapi-generator-original
Bugfix/3929 do not set multipart (#3932)
* Do not set Content-Type to multipart/form-data It causes superagent to not add the boundary in the Content-Type * Run shell-scripts
This commit is contained in:
@@ -90,7 +90,8 @@ var opts = {
|
||||
'binary': "B", // String | None
|
||||
'_date': new Date("2013-10-20"), // Date | None
|
||||
'dateTime': new Date("2013-10-20T19:20:30+01:00"), // Date | None
|
||||
'password': "password_example" // String | None
|
||||
'password': "password_example", // String | None
|
||||
'callback': "callback_example" // String | None
|
||||
};
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
@@ -120,6 +121,7 @@ Name | Type | Description | Notes
|
||||
**_date** | **Date**| None | [optional]
|
||||
**dateTime** | **Date**| None | [optional]
|
||||
**password** | **String**| None | [optional]
|
||||
**callback** | **String**| None | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -377,7 +377,10 @@
|
||||
|
||||
var contentType = this.jsonPreferredMime(contentTypes);
|
||||
if (contentType) {
|
||||
request.type(contentType);
|
||||
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
|
||||
if(contentType != 'multipart/form-data') {
|
||||
request.type(contentType);
|
||||
}
|
||||
} else if (!request.header['Content-Type']) {
|
||||
request.type('application/json');
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
* @param {Date} opts._date None
|
||||
* @param {Date} opts.dateTime None
|
||||
* @param {String} opts.password None
|
||||
* @param {String} opts.callback None
|
||||
* @param {module:api/FakeApi~testEndpointParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.testEndpointParameters = function(_number, _double, patternWithoutDelimiter, _byte, opts, callback) {
|
||||
@@ -171,7 +172,8 @@
|
||||
'binary': opts['binary'],
|
||||
'date': opts['_date'],
|
||||
'dateTime': opts['dateTime'],
|
||||
'password': opts['password']
|
||||
'password': opts['password'],
|
||||
'callback': opts['callback']
|
||||
};
|
||||
|
||||
var authNames = ['http_basic_test'];
|
||||
|
||||
Reference in New Issue
Block a user