mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 23:57:10 +00:00
Fix boolean value handling in HTTP request body (#1515)
* fix boolean http body handling * fix typo in parameter name
This commit is contained in:
@@ -482,6 +482,73 @@ export default class FakeApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testGroupParameters operation.
|
||||
* @callback module:api/FakeApi~testGroupParametersCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @param {module:api/FakeApi~testGroupParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, callback) {
|
||||
opts = opts || {};
|
||||
let 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");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'required_string_group': requiredStringGroup,
|
||||
'required_int64_group': requiredInt64Group,
|
||||
'string_group': opts['stringGroup'],
|
||||
'int64_group': opts['int64Group']
|
||||
};
|
||||
let headerParams = {
|
||||
'required_boolean_group': requiredBooleanGroup,
|
||||
'boolean_group': opts['booleanGroup']
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testInlineAdditionalProperties operation.
|
||||
* @callback module:api/FakeApi~testInlineAdditionalPropertiesCallback
|
||||
|
||||
Reference in New Issue
Block a user