forked from loafle/openapi-generator-original
Add OAS3 allowEmptyValue for query params (#10312)
* add the special case of empty query parameters to the fake API
This commit is contained in:
@@ -891,11 +891,12 @@ export default class FakeApi {
|
||||
* @param {Array.<String>} http
|
||||
* @param {Array.<String>} url
|
||||
* @param {Array.<String>} context
|
||||
* @param {String} allowEmpty
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Object.<String, {String: String}>} opts.language
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, opts) {
|
||||
testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, opts) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
// verify the required parameter 'pipe' is set
|
||||
@@ -918,6 +919,10 @@ export default class FakeApi {
|
||||
if (context === undefined || context === null) {
|
||||
throw new Error("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'allowEmpty' is set
|
||||
if (allowEmpty === undefined || allowEmpty === null) {
|
||||
throw new Error("Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
@@ -927,7 +932,8 @@ export default class FakeApi {
|
||||
'http': this.apiClient.buildCollectionParam(http, 'ssv'),
|
||||
'url': this.apiClient.buildCollectionParam(url, 'csv'),
|
||||
'context': this.apiClient.buildCollectionParam(context, 'multi'),
|
||||
'language': opts['language']
|
||||
'language': opts['language'],
|
||||
'allowEmpty': allowEmpty
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
@@ -952,12 +958,13 @@ export default class FakeApi {
|
||||
* @param {Array.<String>} http
|
||||
* @param {Array.<String>} url
|
||||
* @param {Array.<String>} context
|
||||
* @param {String} allowEmpty
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Object.<String, {String: String}>} opts.language
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, opts) {
|
||||
return this.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, opts)
|
||||
testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts) {
|
||||
return this.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, opts)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user