forked from loafle/openapi-generator-original
100 lines
3.1 KiB
JavaScript
100 lines
3.1 KiB
JavaScript
/**
|
|
* OpenAPI Petstore
|
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
*
|
|
* OpenAPI spec version: 1.0.0
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
*
|
|
* OpenAPI Generator version: 3.0.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.OpenApiPetstore) {
|
|
root.OpenApiPetstore = {};
|
|
}
|
|
root.OpenApiPetstore.AnotherFakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client);
|
|
}
|
|
}(this, function(ApiClient, Client) {
|
|
'use strict';
|
|
|
|
/**
|
|
* AnotherFake service.
|
|
* @module api/AnotherFakeApi
|
|
* @version 1.0.0
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new AnotherFakeApi.
|
|
* @alias module:api/AnotherFakeApi
|
|
* @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;
|
|
|
|
|
|
/**
|
|
* Callback function to receive the result of the testSpecialTags operation.
|
|
* @callback module:api/AnotherFakeApi~testSpecialTagsCallback
|
|
* @param {String} error Error message, if any.
|
|
* @param {module:model/Client} data The data returned by the service call.
|
|
* @param {String} response The complete HTTP response.
|
|
*/
|
|
|
|
/**
|
|
* To test special tags
|
|
* To test special tags
|
|
* @param {module:model/Client} client client model
|
|
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
* data is of type: {@link module:model/Client}
|
|
*/
|
|
this.testSpecialTags = function(client, callback) {
|
|
var postBody = client;
|
|
|
|
// verify the required parameter 'client' is set
|
|
if (client === undefined || client === null) {
|
|
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
|
}
|
|
|
|
|
|
var pathParams = {
|
|
};
|
|
var queryParams = {
|
|
};
|
|
var collectionQueryParams = {
|
|
};
|
|
var headerParams = {
|
|
};
|
|
var formParams = {
|
|
};
|
|
|
|
var authNames = [];
|
|
var contentTypes = ['application/json'];
|
|
var accepts = ['application/json'];
|
|
var returnType = Client;
|
|
|
|
return this.apiClient.callApi(
|
|
'/another-fake/dummy', 'PATCH',
|
|
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
|
authNames, contentTypes, accepts, returnType, callback
|
|
);
|
|
}
|
|
};
|
|
|
|
return exports;
|
|
}));
|