mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 23:57:10 +00:00
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
@@ -7,45 +7,35 @@
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/Client', 'model/OuterBoolean', 'model/OuterComposite', 'model/OuterNumber', 'model/OuterString'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterBoolean'), require('../model/OuterComposite'), require('../model/OuterNumber'), require('../model/OuterString'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import OuterBoolean from '../model/OuterBoolean';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import OuterNumber from '../model/OuterNumber';
|
||||
import OuterString from '../model/OuterString';
|
||||
|
||||
/**
|
||||
* Fake service.
|
||||
* @module api/FakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class FakeApi {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeApi.
|
||||
* @alias module:api/FakeApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
root.SwaggerPetstore.FakeApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Client, root.SwaggerPetstore.OuterBoolean, root.SwaggerPetstore.OuterComposite, root.SwaggerPetstore.OuterNumber, root.SwaggerPetstore.OuterString);
|
||||
}
|
||||
}(this, function(ApiClient, Client, OuterBoolean, OuterComposite, OuterNumber, OuterString) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Fake service.
|
||||
* @module api/FakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new FakeApi.
|
||||
* @alias module:api/FakeApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
var exports = function(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,30 +53,28 @@
|
||||
* @param {module:api/FakeApi~fakeOuterBooleanSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/OuterBoolean}
|
||||
*/
|
||||
this.fakeOuterBooleanSerialize = function(opts, callback) {
|
||||
fakeOuterBooleanSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = opts['body'];
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = [];
|
||||
var returnType = OuterBoolean;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterBoolean;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/boolean', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -106,30 +94,28 @@
|
||||
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/OuterComposite}
|
||||
*/
|
||||
this.fakeOuterCompositeSerialize = function(opts, callback) {
|
||||
fakeOuterCompositeSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = opts['body'];
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = [];
|
||||
var returnType = OuterComposite;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterComposite;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/composite', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -149,30 +135,28 @@
|
||||
* @param {module:api/FakeApi~fakeOuterNumberSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/OuterNumber}
|
||||
*/
|
||||
this.fakeOuterNumberSerialize = function(opts, callback) {
|
||||
fakeOuterNumberSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = opts['body'];
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = [];
|
||||
var returnType = OuterNumber;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterNumber;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/number', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -192,30 +176,28 @@
|
||||
* @param {module:api/FakeApi~fakeOuterStringSerializeCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/OuterString}
|
||||
*/
|
||||
this.fakeOuterStringSerialize = function(opts, callback) {
|
||||
fakeOuterStringSerialize(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = opts['body'];
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = [];
|
||||
var returnType = OuterString;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterString;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/string', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -235,8 +217,8 @@
|
||||
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
this.testClientModel = function(body, callback) {
|
||||
var postBody = body;
|
||||
testClientModel(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -244,25 +226,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json'];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = Client;
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'PATCH',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -295,9 +275,9 @@
|
||||
* @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) {
|
||||
testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter '_number' is set
|
||||
if (_number === undefined || _number === null) {
|
||||
@@ -320,15 +300,13 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
'integer': opts['integer'],
|
||||
'int32': opts['int32'],
|
||||
'int64': opts['int64'],
|
||||
@@ -345,14 +323,14 @@
|
||||
'callback': opts['callback']
|
||||
};
|
||||
|
||||
var authNames = ['http_basic_test'];
|
||||
var contentTypes = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
var accepts = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
var returnType = null;
|
||||
let authNames = ['http_basic_test'];
|
||||
let contentTypes = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
let accepts = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -379,45 +357,91 @@
|
||||
* @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double)
|
||||
* @param {module:api/FakeApi~testEnumParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.testEnumParameters = function(opts, callback) {
|
||||
testEnumParameters(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
let postBody = null;
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'csv'),
|
||||
'enum_query_string': opts['enumQueryString'],
|
||||
'enum_query_integer': opts['enumQueryInteger'],
|
||||
'enum_query_integer': opts['enumQueryInteger']
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
'enum_query_string_array': {
|
||||
value: opts['enumQueryStringArray'],
|
||||
collectionFormat: 'csv'
|
||||
},
|
||||
};
|
||||
var headerParams = {
|
||||
let headerParams = {
|
||||
'enum_header_string_array': opts['enumHeaderStringArray'],
|
||||
'enum_header_string': opts['enumHeaderString']
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
'enum_form_string_array': this.apiClient.buildCollectionParam(opts['enumFormStringArray'], 'csv'),
|
||||
'enum_form_string': opts['enumFormString'],
|
||||
'enum_query_double': opts['enumQueryDouble']
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['*/*'];
|
||||
var accepts = ['*/*'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = ['*/*'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
}));
|
||||
/**
|
||||
* Callback function to receive the result of the testJsonFormData operation.
|
||||
* @callback module:api/FakeApi~testJsonFormDataCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param {String} param field1
|
||||
* @param {String} param2 field2
|
||||
* @param {module:api/FakeApi~testJsonFormDataCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testJsonFormData(param, param2, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param === undefined || param === null) {
|
||||
throw new Error("Missing the required parameter 'param' when calling testJsonFormData");
|
||||
}
|
||||
|
||||
// verify the required parameter 'param2' is set
|
||||
if (param2 === undefined || param2 === null) {
|
||||
throw new Error("Missing the required parameter 'param2' when calling testJsonFormData");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'param': param,
|
||||
'param2': param2
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/jsonFormData', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,45 +7,31 @@
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/Client'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/Client'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
|
||||
/**
|
||||
* Fake_classname_tags123 service.
|
||||
* @module api/Fake_classname_tags123Api
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class Fake_classname_tags123Api {
|
||||
|
||||
/**
|
||||
* Constructs a new Fake_classname_tags123Api.
|
||||
* @alias module:api/Fake_classname_tags123Api
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
root.SwaggerPetstore.Fake_classname_tags123Api = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Client);
|
||||
}
|
||||
}(this, function(ApiClient, Client) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Fake_classname_tags123 service.
|
||||
* @module api/Fake_classname_tags123Api
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new Fake_classname_tags123Api.
|
||||
* @alias module:api/Fake_classname_tags123Api
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
var exports = function(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
@@ -62,8 +48,8 @@
|
||||
* @param {module:api/Fake_classname_tags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
this.testClassname = function(body, callback) {
|
||||
var postBody = body;
|
||||
testClassname(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -71,29 +57,26 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json'];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = Client;
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake_classname_test', 'PATCH',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
@@ -7,45 +7,32 @@
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/ApiResponse', 'model/Pet'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/ApiResponse'), require('../model/Pet'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import ApiResponse from '../model/ApiResponse';
|
||||
import Pet from '../model/Pet';
|
||||
|
||||
/**
|
||||
* Pet service.
|
||||
* @module api/PetApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class PetApi {
|
||||
|
||||
/**
|
||||
* Constructs a new PetApi.
|
||||
* @alias module:api/PetApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
root.SwaggerPetstore.PetApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.ApiResponse, root.SwaggerPetstore.Pet);
|
||||
}
|
||||
}(this, function(ApiClient, ApiResponse, Pet) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Pet service.
|
||||
* @module api/PetApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new PetApi.
|
||||
* @alias module:api/PetApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
var exports = function(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
@@ -62,8 +49,8 @@
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.addPet = function(body, callback) {
|
||||
var postBody = body;
|
||||
addPet(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -71,25 +58,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = ['application/json', 'application/xml'];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -110,9 +95,9 @@
|
||||
* @param {String} opts.apiKey
|
||||
* @param {module:api/PetApi~deletePetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.deletePet = function(petId, opts, callback) {
|
||||
deletePet(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
@@ -120,27 +105,25 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
let headerParams = {
|
||||
'api_key': opts['apiKey']
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'DELETE',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -160,8 +143,8 @@
|
||||
* @param {module:api/PetApi~findPetsByStatusCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Array.<module:model/Pet>}
|
||||
*/
|
||||
this.findPetsByStatus = function(status, callback) {
|
||||
var postBody = null;
|
||||
findPetsByStatus(status, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status === undefined || status === null) {
|
||||
@@ -169,29 +152,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
'status': this.apiClient.buildCollectionParam(status, 'csv')
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
'status': {
|
||||
value: status,
|
||||
collectionFormat: 'csv'
|
||||
},
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = [Pet];
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = [Pet];
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByStatus', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -211,8 +189,8 @@
|
||||
* @param {module:api/PetApi~findPetsByTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Array.<module:model/Pet>}
|
||||
*/
|
||||
this.findPetsByTags = function(tags, callback) {
|
||||
var postBody = null;
|
||||
findPetsByTags(tags, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags === undefined || tags === null) {
|
||||
@@ -220,29 +198,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
'tags': this.apiClient.buildCollectionParam(tags, 'csv')
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
'tags': {
|
||||
value: tags,
|
||||
collectionFormat: 'csv'
|
||||
},
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = [Pet];
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = [Pet];
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByTags', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -262,8 +235,8 @@
|
||||
* @param {module:api/PetApi~getPetByIdCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Pet}
|
||||
*/
|
||||
this.getPetById = function(petId, callback) {
|
||||
var postBody = null;
|
||||
getPetById(petId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
@@ -271,26 +244,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['api_key'];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = Pet;
|
||||
let authNames = ['api_key'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Pet;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -309,8 +280,8 @@
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.updatePet = function(body, callback) {
|
||||
var postBody = body;
|
||||
updatePet(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -318,25 +289,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = ['application/json', 'application/xml'];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'PUT',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -358,9 +327,9 @@
|
||||
* @param {String} opts.status Updated status of the pet
|
||||
* @param {module:api/PetApi~updatePetWithFormCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.updatePetWithForm = function(petId, opts, callback) {
|
||||
updatePetWithForm(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
@@ -368,28 +337,26 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
'name': opts['name'],
|
||||
'status': opts['status']
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = ['application/x-www-form-urlencoded'];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -412,9 +379,9 @@
|
||||
* @param {module:api/PetApi~uploadFileCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/ApiResponse}
|
||||
*/
|
||||
this.uploadFile = function(petId, opts, callback) {
|
||||
uploadFile(petId, opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
@@ -422,32 +389,29 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'file': opts['file']
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = ['multipart/form-data'];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = ApiResponse;
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}/uploadImage', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
@@ -7,45 +7,31 @@
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/Order'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/Order'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Order from '../model/Order';
|
||||
|
||||
/**
|
||||
* Store service.
|
||||
* @module api/StoreApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Constructs a new StoreApi.
|
||||
* @alias module:api/StoreApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
root.SwaggerPetstore.StoreApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Order);
|
||||
}
|
||||
}(this, function(ApiClient, Order) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Store service.
|
||||
* @module api/StoreApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new StoreApi.
|
||||
* @alias module:api/StoreApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
var exports = function(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
@@ -62,8 +48,8 @@
|
||||
* @param {String} orderId ID of the order that needs to be deleted
|
||||
* @param {module:api/StoreApi~deleteOrderCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.deleteOrder = function(orderId, callback) {
|
||||
var postBody = null;
|
||||
deleteOrder(orderId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
@@ -71,26 +57,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'order_id': orderId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{order_id}', 'DELETE',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -109,29 +93,27 @@
|
||||
* @param {module:api/StoreApi~getInventoryCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Object.<String, {'String': 'Number'}>}
|
||||
*/
|
||||
this.getInventory = function(callback) {
|
||||
var postBody = null;
|
||||
getInventory(callback) {
|
||||
let postBody = null;
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = ['api_key'];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = {'String': 'Number'};
|
||||
let authNames = ['api_key'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = {'String': 'Number'};
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/inventory', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -151,8 +133,8 @@
|
||||
* @param {module:api/StoreApi~getOrderByIdCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Order}
|
||||
*/
|
||||
this.getOrderById = function(orderId, callback) {
|
||||
var postBody = null;
|
||||
getOrderById(orderId, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
@@ -160,26 +142,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'order_id': orderId
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = Order;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Order;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{order_id}', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -199,8 +179,8 @@
|
||||
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Order}
|
||||
*/
|
||||
this.placeOrder = function(body, callback) {
|
||||
var postBody = body;
|
||||
placeOrder(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -208,29 +188,26 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = Order;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Order;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/order', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
@@ -7,45 +7,31 @@
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/User'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/User'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstore) {
|
||||
root.SwaggerPetstore = {};
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import User from '../model/User';
|
||||
|
||||
/**
|
||||
* User service.
|
||||
* @module api/UserApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class UserApi {
|
||||
|
||||
/**
|
||||
* Constructs a new UserApi.
|
||||
* @alias module:api/UserApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
root.SwaggerPetstore.UserApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.User);
|
||||
}
|
||||
}(this, function(ApiClient, User) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* User service.
|
||||
* @module api/UserApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new UserApi.
|
||||
* @alias module:api/UserApi
|
||||
* @class
|
||||
* @param {module:ApiClient} apiClient Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
*/
|
||||
var exports = function(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
@@ -62,8 +48,8 @@
|
||||
* @param {module:model/User} body Created user object
|
||||
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.createUser = function(body, callback) {
|
||||
var postBody = body;
|
||||
createUser(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -71,25 +57,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -108,8 +92,8 @@
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.createUsersWithArrayInput = function(body, callback) {
|
||||
var postBody = body;
|
||||
createUsersWithArrayInput(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -117,25 +101,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithArray', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -154,8 +136,8 @@
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.createUsersWithListInput = function(body, callback) {
|
||||
var postBody = body;
|
||||
createUsersWithListInput(body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
@@ -163,25 +145,23 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithList', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -200,8 +180,8 @@
|
||||
* @param {String} username The name that needs to be deleted
|
||||
* @param {module:api/UserApi~deleteUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.deleteUser = function(username, callback) {
|
||||
var postBody = null;
|
||||
deleteUser(username, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -209,26 +189,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'DELETE',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -248,8 +226,8 @@
|
||||
* @param {module:api/UserApi~getUserByNameCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/User}
|
||||
*/
|
||||
this.getUserByName = function(username, callback) {
|
||||
var postBody = null;
|
||||
getUserByName(username, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -257,26 +235,24 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = User;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = User;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -297,8 +273,8 @@
|
||||
* @param {module:api/UserApi~loginUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link 'String'}
|
||||
*/
|
||||
this.loginUser = function(username, password, callback) {
|
||||
var postBody = null;
|
||||
loginUser(username, password, callback) {
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -311,27 +287,25 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
'username': username,
|
||||
'password': password,
|
||||
'password': password
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = 'String';
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = 'String';
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/login', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -349,29 +323,27 @@
|
||||
*
|
||||
* @param {module:api/UserApi~logoutUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.logoutUser = function(callback) {
|
||||
var postBody = null;
|
||||
logoutUser(callback) {
|
||||
let postBody = null;
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/logout', 'GET',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
@@ -391,8 +363,8 @@
|
||||
* @param {module:model/User} body Updated user object
|
||||
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.updateUser = function(username, body, callback) {
|
||||
var postBody = body;
|
||||
updateUser(username, body, callback) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -405,30 +377,27 @@
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
let pathParams = {
|
||||
'username': username
|
||||
};
|
||||
var queryParams = {
|
||||
let queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
let headerParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = [];
|
||||
var accepts = ['application/xml', 'application/json'];
|
||||
var returnType = null;
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'PUT',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user