William Cheng 348c22c883
Add "servers" support to operation, path in the JS client (#2060)
* add operation, path servers to js es6 client

* add servers support to operation, path in js es5

* fix null check
2019-02-09 22:25:01 +08:00

86 lines
2.5 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
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import Client from '../model/Client';
/**
* AnotherFake service.
* @module api/AnotherFakeApi
* @version 1.0.0
*/
export default class AnotherFakeApi {
/**
* 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.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
call123testSpecialTagsWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Client;
return this.apiClient.callApi(
'/another-fake/dummy', 'PATCH',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
call123testSpecialTags(body) {
return this.call123testSpecialTagsWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
}
}