forked from loafle/openapi-generator-original
* better handling of inline response schemas, bug fixes * update samples * add new files * better code format * remove unused ruby files * fix java test * remove unused js spec files * remove inline_response_default_test.dart * fix webclient tests * fix spring tests
74 lines
2.0 KiB
JavaScript
74 lines
2.0 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: \" \\
|
|
*
|
|
* The version of the OpenAPI document: 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 FooGetDefaultResponse from '../model/FooGetDefaultResponse';
|
|
|
|
/**
|
|
* Default service.
|
|
* @module api/DefaultApi
|
|
* @version 1.0.0
|
|
*/
|
|
export default class DefaultApi {
|
|
|
|
/**
|
|
* Constructs a new DefaultApi.
|
|
* @alias module:api/DefaultApi
|
|
* @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;
|
|
}
|
|
|
|
|
|
/**
|
|
* Callback function to receive the result of the fooGet operation.
|
|
* @callback module:api/DefaultApi~fooGetCallback
|
|
* @param {String} error Error message, if any.
|
|
* @param {module:model/FooGetDefaultResponse} data The data returned by the service call.
|
|
* @param {String} response The complete HTTP response.
|
|
*/
|
|
|
|
/**
|
|
* @param {module:api/DefaultApi~fooGetCallback} callback The callback function, accepting three arguments: error, data, response
|
|
* data is of type: {@link module:model/FooGetDefaultResponse}
|
|
*/
|
|
fooGet(callback) {
|
|
let postBody = null;
|
|
|
|
let pathParams = {
|
|
};
|
|
let queryParams = {
|
|
};
|
|
let headerParams = {
|
|
};
|
|
let formParams = {
|
|
};
|
|
|
|
let authNames = [];
|
|
let contentTypes = [];
|
|
let accepts = ['application/json'];
|
|
let returnType = FooGetDefaultResponse;
|
|
return this.apiClient.callApi(
|
|
'/foo', 'GET',
|
|
pathParams, queryParams, headerParams, formParams, postBody,
|
|
authNames, contentTypes, accepts, returnType, null, callback
|
|
);
|
|
}
|
|
|
|
|
|
}
|