Fix boolean value handling in HTTP request body (#1515)

* fix boolean http body handling

* fix typo in parameter name
This commit is contained in:
William Cheng
2018-11-24 16:42:32 +08:00
committed by GitHub
parent 0ba9278308
commit f8ada391c4
112 changed files with 648 additions and 117 deletions

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -442,7 +442,7 @@
}
}
}
} else if (bodyParam) {
} else if (bodyParam !== null && bodyParam !== undefined) {
request.send(bodyParam);
}

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -583,6 +583,87 @@
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* @param {Number} requiredStringGroup Required String in group parameters
* @param {Boolean} requiredBooleanGroup Required Boolean in group parameters
* @param {Number} requiredInt64Group Required Integer in group parameters
* @param {Object} opts Optional parameters
* @param {Number} opts.stringGroup String in group parameters
* @param {Boolean} opts.booleanGroup Boolean in group parameters
* @param {Number} opts.int64Group Integer in group parameters
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.testGroupParametersWithHttpInfo = function(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts) {
opts = opts || {};
var postBody = null;
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup === undefined || requiredStringGroup === null) {
throw new Error("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
}
// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup === undefined || requiredBooleanGroup === null) {
throw new Error("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
}
// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group === undefined || requiredInt64Group === null) {
throw new Error("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
}
var pathParams = {
};
var queryParams = {
'required_string_group': requiredStringGroup,
'required_int64_group': requiredInt64Group,
'string_group': opts['stringGroup'],
'int64_group': opts['int64Group'],
};
var collectionQueryParams = {
};
var headerParams = {
'required_boolean_group': requiredBooleanGroup,
'boolean_group': opts['booleanGroup']
};
var formParams = {
};
var authNames = [];
var contentTypes = [];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
'/fake', 'DELETE',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType
);
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* @param {Number} requiredStringGroup Required String in group parameters
* @param {Boolean} requiredBooleanGroup Required Boolean in group parameters
* @param {Number} requiredInt64Group Required Integer in group parameters
* @param {Object} opts Optional parameters
* @param {Number} opts.stringGroup String in group parameters
* @param {Boolean} opts.booleanGroup Boolean in group parameters
* @param {Number} opts.int64Group Integer in group parameters
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.testGroupParameters = function(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts) {
return this.testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts)
.then(function(response_and_data) {
return response_and_data.data;
});
}
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -42,10 +42,12 @@
* Constructs a new <code>Category</code>.
* @alias module:model/Category
* @class
* @param name {String}
*/
var exports = function() {
var exports = function(name) {
var _this = this;
_this['name'] = name;
};
/**
@@ -74,8 +76,9 @@
exports.prototype['id'] = undefined;
/**
* @member {String} name
* @default 'default-name'
*/
exports.prototype['name'] = undefined;
exports.prototype['name'] = 'default-name';

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*

View File

@@ -7,7 +7,7 @@
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
*
* OpenAPI Generator version: 3.3.2-SNAPSHOT
* OpenAPI Generator version: 3.3.4-SNAPSHOT
*
* Do not edit the class manually.
*