Add multiple servers support to JS API client (#1974)

* add multiple servers support to JS ES6

* multiple server support in js es5

* using exports in es5

* fix index check

* add oas v3 js es6 client to travis
This commit is contained in:
William Cheng
2019-01-29 11:19:21 +08:00
committed by GitHub
parent 046db19a85
commit 83d34bd8d7
222 changed files with 24380 additions and 6 deletions

View File

@@ -0,0 +1,675 @@
/**
* 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 superagent from "superagent";
import querystring from "querystring";
/**
* @module ApiClient
* @version 1.0.0
*/
/**
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
* application to use this class directly - the *Api and model classes provide the public API for the service. The
* contents of this file should be regarded as internal but are documented for completeness.
* @alias module:ApiClient
* @class
*/
class ApiClient {
constructor() {
/**
* The base URL against which to resolve every API call's (relative) path.
* @type {String}
* @default http://petstore.swagger.io:80/v2
*/
this.basePath = 'http://petstore.swagger.io:80/v2'.replace(/\/+$/, '');
/**
* The authentication methods to be included for all API calls.
* @type {Array.<String>}
*/
this.authentications = {
'api_key': {type: 'apiKey', 'in': 'header', name: 'api_key'},
'api_key_query': {type: 'apiKey', 'in': 'query', name: 'api_key_query'},
'http_basic_test': {type: 'basic'},
'petstore_auth': {type: 'oauth2'}
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @default {}
*/
this.defaultHeaders = {};
/**
* The default HTTP timeout for all API calls.
* @type {Number}
* @default 60000
*/
this.timeout = 60000;
/**
* If set to false an additional timestamp parameter is added to all API GET calls to
* prevent browser caching
* @type {Boolean}
* @default true
*/
this.cache = true;
/**
* If set to true, the client will save the cookies from each server
* response, and return them in the next request.
* @default false
*/
this.enableCookies = false;
/*
* Used to save and return cookies in a node.js (non-browser) setting,
* if this.enableCookies is set to true.
*/
if (typeof window === 'undefined') {
this.agent = new superagent.agent();
}
/*
* Allow user to override superagent agent
*/
this.requestAgent = null;
/*
* Allow user to add superagent plugins
*/
this.plugins = null;
}
/**
* Returns a string representation for an actual parameter.
* @param param The actual parameter.
* @returns {String} The string representation of <code>param</code>.
*/
paramToString(param) {
if (param == undefined || param == null) {
return '';
}
if (param instanceof Date) {
return param.toJSON();
}
return param.toString();
}
/**
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
* NOTE: query parameters are not handled here.
* @param {String} path The path to append to the base URL.
* @param {Object} pathParams The parameter values to append.
* @returns {String} The encoded path with parameter values substituted.
*/
buildUrl(path, pathParams) {
if (!path.match(/^\//)) {
path = '/' + path;
}
var url = this.basePath + path;
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
var value;
if (pathParams.hasOwnProperty(key)) {
value = this.paramToString(pathParams[key]);
} else {
value = fullMatch;
}
return encodeURIComponent(value);
});
return url;
}
/**
* Checks whether the given content type represents JSON.<br>
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
* @param {String} contentType The MIME content type to check.
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
isJsonMime(contentType) {
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
}
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
* @param {Array.<String>} contentTypes
* @returns {String} The chosen content type, preferring JSON.
*/
jsonPreferredMime(contentTypes) {
for (var i = 0; i < contentTypes.length; i++) {
if (this.isJsonMime(contentTypes[i])) {
return contentTypes[i];
}
}
return contentTypes[0];
}
/**
* Checks whether the given parameter value represents file-like content.
* @param param The parameter to check.
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
*/
isFileParam(param) {
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
if (typeof require === 'function') {
let fs;
try {
fs = require('fs');
} catch (err) {}
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
return true;
}
}
// Buffer in Node.js
if (typeof Buffer === 'function' && param instanceof Buffer) {
return true;
}
// Blob in browser
if (typeof Blob === 'function' && param instanceof Blob) {
return true;
}
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
if (typeof File === 'function' && param instanceof File) {
return true;
}
return false;
}
/**
* Normalizes parameter values:
* <ul>
* <li>remove nils</li>
* <li>keep files and arrays</li>
* <li>format to string with `paramToString` for other cases</li>
* </ul>
* @param {Object.<String, Object>} params The parameters as object properties.
* @returns {Object.<String, Object>} normalized parameters.
*/
normalizeParams(params) {
var newParams = {};
for (var key in params) {
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
var value = params[key];
if (this.isFileParam(value) || Array.isArray(value)) {
newParams[key] = value;
} else {
newParams[key] = this.paramToString(value);
}
}
}
return newParams;
}
/**
* Builds a string representation of an array-type actual parameter, according to the given collection format.
* @param {Array} param An array parameter.
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
buildCollectionParam(param, collectionFormat) {
if (param == null) {
return null;
}
switch (collectionFormat) {
case 'csv':
return param.map(this.paramToString).join(',');
case 'ssv':
return param.map(this.paramToString).join(' ');
case 'tsv':
return param.map(this.paramToString).join('\t');
case 'pipes':
return param.map(this.paramToString).join('|');
case 'multi':
//return the array directly as SuperAgent will handle it as expected
return param.map(this.paramToString);
default:
throw new Error('Unknown collection format: ' + collectionFormat);
}
}
/**
* Applies authentication headers to the request.
* @param {Object} request The request object created by a <code>superagent()</code> call.
* @param {Array.<String>} authNames An array of authentication method names.
*/
applyAuthToRequest(request, authNames) {
authNames.forEach((authName) => {
var auth = this.authentications[authName];
switch (auth.type) {
case 'basic':
if (auth.username || auth.password) {
request.auth(auth.username || '', auth.password || '');
}
break;
case 'apiKey':
if (auth.apiKey) {
var data = {};
if (auth.apiKeyPrefix) {
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
} else {
data[auth.name] = auth.apiKey;
}
if (auth['in'] === 'header') {
request.set(data);
} else {
request.query(data);
}
}
break;
case 'oauth2':
if (auth.accessToken) {
request.set({'Authorization': 'Bearer ' + auth.accessToken});
}
break;
default:
throw new Error('Unknown authentication type: ' + auth.type);
}
});
}
/**
* Deserializes an HTTP response body into a value of the specified type.
* @param {Object} response A SuperAgent response object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns A value of the specified type.
*/
deserialize(response, returnType) {
if (response == null || returnType == null || response.status == 204) {
return null;
}
// Rely on SuperAgent for parsing response body.
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
var data = response.body;
if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
// SuperAgent does not always produce a body; use the unparsed response as a fallback
data = response.text;
}
return ApiClient.convertToType(data, returnType);
}
/**
* Callback function to receive the result of the operation.
* @callback module:ApiClient~callApiCallback
* @param {String} error Error message, if any.
* @param data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Invokes the REST service using the supplied settings and parameters.
* @param {String} path The base URL to invoke.
* @param {String} httpMethod The HTTP method to use.
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
* @param {Object} bodyParam The value to pass as the request body.
* @param {Array.<String>} authNames An array of authentication type names.
* @param {Array.<String>} contentTypes An array of request MIME types.
* @param {Array.<String>} accepts An array of acceptable response MIME types.
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
* constructor for a complex type.
* @param {module:ApiClient~callApiCallback} callback The callback function.
* @returns {Object} The SuperAgent request object.
*/
callApi(path, httpMethod, pathParams,
queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,
returnType, callback) {
var url = this.buildUrl(path, pathParams);
var request = superagent(httpMethod, url);
if (this.plugins !== null) {
for (var index in this.plugins) {
if (this.plugins.hasOwnProperty(index)) {
request.use(this.plugins[index])
}
}
}
// apply authentications
this.applyAuthToRequest(request, authNames);
// set query parameters
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
queryParams['_'] = new Date().getTime();
}
request.query(this.normalizeParams(queryParams));
// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
// set requestAgent if it is set by user
if (this.requestAgent) {
request.agent(this.requestAgent);
}
// set request timeout
request.timeout(this.timeout);
var contentType = this.jsonPreferredMime(contentTypes);
if (contentType) {
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
if(contentType != 'multipart/form-data') {
request.type(contentType);
}
} else if (!request.header['Content-Type']) {
request.type('application/json');
}
if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
if (_formParams.hasOwnProperty(key)) {
if (this.isFileParam(_formParams[key])) {
// file field
request.attach(key, _formParams[key]);
} else {
request.field(key, _formParams[key]);
}
}
}
} else if (bodyParam !== null && bodyParam !== undefined) {
request.send(bodyParam);
}
var accept = this.jsonPreferredMime(accepts);
if (accept) {
request.accept(accept);
}
if (returnType === 'Blob') {
request.responseType('blob');
} else if (returnType === 'String') {
request.responseType('string');
}
// Attach previously saved cookies, if enabled
if (this.enableCookies){
if (typeof window === 'undefined') {
this.agent._attachCookies(request);
}
else {
request.withCredentials();
}
}
request.end((error, response) => {
if (callback) {
var data = null;
if (!error) {
try {
data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent._saveCookies(response);
}
} catch (err) {
error = err;
}
}
callback(error, data, response);
}
});
return request;
}
/**
* Parses an ISO-8601 string representation of a date value.
* @param {String} str The date value as a string.
* @returns {Date} The parsed date object.
*/
static parseDate(str) {
return new Date(str);
}
/**
* Converts a value to the specified type.
* @param {(String|Object)} data The data to convert, as a string or object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns An instance of the specified type or null or undefined if data is null or undefined.
*/
static convertToType(data, type) {
if (data === null || data === undefined)
return data
switch (type) {
case 'Boolean':
return Boolean(data);
case 'Integer':
return parseInt(data, 10);
case 'Number':
return parseFloat(data);
case 'String':
return String(data);
case 'Date':
return ApiClient.parseDate(String(data));
case 'Blob':
return data;
default:
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type.constructFromObject === 'function') {
// for model type like User and enum class
return type.constructFromObject(data);
} else if (Array.isArray(type)) {
// for array type like: ['String']
var itemType = type[0];
return data.map((item) => {
return ApiClient.convertToType(item, itemType);
});
} else if (typeof type === 'object') {
// for plain object type like: {'String': 'Integer'}
var keyType, valueType;
for (var k in type) {
if (type.hasOwnProperty(k)) {
keyType = k;
valueType = type[k];
break;
}
}
var result = {};
for (var k in data) {
if (data.hasOwnProperty(k)) {
var key = ApiClient.convertToType(k, keyType);
var value = ApiClient.convertToType(data[k], valueType);
result[key] = value;
}
}
return result;
} else {
// for unknown type, return the data directly
return data;
}
}
}
/**
* Gets an array of host settings
* @returns An array of host settings
*/
hostSettings() {
return [
{
'url': "http://{server}.swagger.io:{port}/v2",
'description': "petstore server",
'variables': {
server: {
'description': "No description provided",
'default_value': "petstore",
'enum_values': [
"petstore",
"qa-petstore",
"dev-petstore"
]
},
port: {
'description': "No description provided",
'default_value': "80",
'enum_values': [
"80",
"8080"
]
}
}
},
{
'url': "https://localhost:8080/{version}",
'description': "The local server",
'variables': {
version: {
'description': "No description provided",
'default_value': "v2",
'enum_values': [
"v1",
"v2"
]
}
}
}
];
}
getBasePathFromSettings(index, variables={}) {
var servers = this.hostSettings();
// check array index out of bound
if (index < 0 || index >= servers.length) {
throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
}
var server = servers[index];
var url = server['url'];
// go through variable and assign a value
for (var variable_name in server['variables']) {
if (variable_name in variables) {
if (server['variables'][variable_name]['enum_values'].includes(variables[variable_name])) {
url = url.replace("{" + variable_name + "}", variables[variable_name]);
} else {
throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + ".");
}
} else {
// use default value
url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value'])
}
}
return url;
}
/**
* Constructs a new map or array model from REST data.
* @param data {Object|Array} The REST data.
* @param obj {Object|Array} The target object or array.
*/
static constructFromObject(data, obj, itemType) {
if (Array.isArray(data)) {
for (var i = 0; i < data.length; i++) {
if (data.hasOwnProperty(i))
obj[i] = ApiClient.convertToType(data[i], itemType);
}
} else {
for (var k in data) {
if (data.hasOwnProperty(k))
obj[k] = ApiClient.convertToType(data[k], itemType);
}
}
};
}
/**
* Enumeration of collection format separator strategies.
* @enum {String}
* @readonly
*/
ApiClient.CollectionFormatEnum = {
/**
* Comma-separated values. Value: <code>csv</code>
* @const
*/
CSV: ',',
/**
* Space-separated values. Value: <code>ssv</code>
* @const
*/
SSV: ' ',
/**
* Tab-separated values. Value: <code>tsv</code>
* @const
*/
TSV: '\t',
/**
* Pipe(|)-separated values. Value: <code>pipes</code>
* @const
*/
PIPES: '|',
/**
* Native array. Value: <code>multi</code>
* @const
*/
MULTI: 'multi'
};
/**
* The default API client implementation.
* @type {module:ApiClient}
*/
ApiClient.instance = new ApiClient();
export default ApiClient;

View File

@@ -0,0 +1,83 @@
/**
* 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;
}
/**
* Callback function to receive the result of the call123testSpecialTags operation.
* @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
* @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 and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
call123testSpecialTags(client, callback) {
let postBody = client;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' 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, callback
);
}
}

View File

@@ -0,0 +1,75 @@
/**
* 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 InlineResponseDefault from '../model/InlineResponseDefault';
/**
* 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/InlineResponseDefault} 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/InlineResponseDefault}
*/
fooGet(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = InlineResponseDefault;
return this.apiClient.callApi(
'/foo', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,647 @@
/**
* 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';
import FileSchemaTestClass from '../model/FileSchemaTestClass';
import OuterComposite from '../model/OuterComposite';
import User from '../model/User';
/**
* 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;
}
/**
* Callback function to receive the result of the fakeOuterBooleanSerialize operation.
* @callback module:api/FakeApi~fakeOuterBooleanSerializeCallback
* @param {String} error Error message, if any.
* @param {Boolean} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Test serialization of outer boolean types
* @param {Object} opts Optional parameters
* @param {Boolean} opts.body Input boolean as post body
* @param {module:api/FakeApi~fakeOuterBooleanSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Boolean}
*/
fakeOuterBooleanSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['body'];
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['*/*'];
let returnType = 'Boolean';
return this.apiClient.callApi(
'/fake/outer/boolean', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the fakeOuterCompositeSerialize operation.
* @callback module:api/FakeApi~fakeOuterCompositeSerializeCallback
* @param {String} error Error message, if any.
* @param {module:model/OuterComposite} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterComposite}
*/
fakeOuterCompositeSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['outerComposite'];
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['*/*'];
let returnType = OuterComposite;
return this.apiClient.callApi(
'/fake/outer/composite', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the fakeOuterNumberSerialize operation.
* @callback module:api/FakeApi~fakeOuterNumberSerializeCallback
* @param {String} error Error message, if any.
* @param {Number} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Test serialization of outer number types
* @param {Object} opts Optional parameters
* @param {Number} opts.body Input number as post body
* @param {module:api/FakeApi~fakeOuterNumberSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Number}
*/
fakeOuterNumberSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['body'];
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['*/*'];
let returnType = 'Number';
return this.apiClient.callApi(
'/fake/outer/number', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the fakeOuterStringSerialize operation.
* @callback module:api/FakeApi~fakeOuterStringSerializeCallback
* @param {String} error Error message, if any.
* @param {String} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Test serialization of outer string types
* @param {Object} opts Optional parameters
* @param {String} opts.body Input string as post body
* @param {module:api/FakeApi~fakeOuterStringSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link String}
*/
fakeOuterStringSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['body'];
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['*/*'];
let returnType = 'String';
return this.apiClient.callApi(
'/fake/outer/string', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testBodyWithFileSchema operation.
* @callback module:api/FakeApi~testBodyWithFileSchemaCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithFileSchema(fileSchemaTestClass, callback) {
let postBody = fileSchemaTestClass;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake/body-with-file-schema', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testBodyWithQueryParams operation.
* @callback module:api/FakeApi~testBodyWithQueryParamsCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithQueryParams(query, user, callback) {
let postBody = user;
// verify the required parameter 'query' is set
if (query === undefined || query === null) {
throw new Error("Missing the required parameter 'query' when calling testBodyWithQueryParams");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling testBodyWithQueryParams");
}
let pathParams = {
};
let queryParams = {
'query': query
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake/body-with-query-params', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testClientModel operation.
* @callback module:api/FakeApi~testClientModelCallback
* @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 \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClientModel(client, callback) {
let postBody = client;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
}
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(
'/fake', 'PATCH',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testEndpointParameters operation.
* @callback module:api/FakeApi~testEndpointParametersCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param {Number} _number None
* @param {Number} _double None
* @param {String} patternWithoutDelimiter None
* @param {Blob} _byte None
* @param {Object} opts Optional parameters
* @param {Number} opts.integer None
* @param {Number} opts.int32 None
* @param {Number} opts.int64 None
* @param {Number} opts._float None
* @param {String} opts._string None
* @param {File} opts.binary None
* @param {Date} opts._date None
* @param {Date} opts.dateTime None
* @param {String} opts.password None
* @param {String} opts.callback None
* @param {module:api/FakeApi~testEndpointParametersCallback} callback The callback function, accepting three arguments: error, data, response
*/
testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter '_number' is set
if (_number === undefined || _number === null) {
throw new Error("Missing the required parameter '_number' when calling testEndpointParameters");
}
// verify the required parameter '_double' is set
if (_double === undefined || _double === null) {
throw new Error("Missing the required parameter '_double' when calling testEndpointParameters");
}
// verify the required parameter 'patternWithoutDelimiter' is set
if (patternWithoutDelimiter === undefined || patternWithoutDelimiter === null) {
throw new Error("Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
}
// verify the required parameter '_byte' is set
if (_byte === undefined || _byte === null) {
throw new Error("Missing the required parameter '_byte' when calling testEndpointParameters");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
'integer': opts['integer'],
'int32': opts['int32'],
'int64': opts['int64'],
'number': _number,
'float': opts['_float'],
'double': _double,
'string': opts['_string'],
'pattern_without_delimiter': patternWithoutDelimiter,
'byte': _byte,
'binary': opts['binary'],
'date': opts['_date'],
'dateTime': opts['dateTime'],
'password': opts['password'],
'callback': opts['callback']
};
let authNames = ['http_basic_test'];
let contentTypes = ['application/x-www-form-urlencoded'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testEnumParameters operation.
* @callback module:api/FakeApi~testEnumParametersCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* To test enum parameters
* To test enum parameters
* @param {Object} opts Optional parameters
* @param {Array.<module:model/String>} opts.enumHeaderStringArray Header parameter enum test (string array)
* @param {module:model/String} opts.enumHeaderString Header parameter enum test (string) (default to &#39;-efg&#39;)
* @param {Array.<module:model/String>} opts.enumQueryStringArray Query parameter enum test (string array)
* @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to &#39;-efg&#39;)
* @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double)
* @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double)
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array) (default to &#39;$&#39;)
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to &#39;-efg&#39;)
* @param {module:api/FakeApi~testEnumParametersCallback} callback The callback function, accepting three arguments: error, data, response
*/
testEnumParameters(opts, callback) {
opts = opts || {};
let postBody = null;
let pathParams = {
};
let queryParams = {
'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'multi'),
'enum_query_string': opts['enumQueryString'],
'enum_query_integer': opts['enumQueryInteger'],
'enum_query_double': opts['enumQueryDouble']
};
let headerParams = {
'enum_header_string_array': opts['enumHeaderStringArray'],
'enum_header_string': opts['enumHeaderString']
};
let formParams = {
'enum_form_string_array': this.apiClient.buildCollectionParam(opts['enumFormStringArray'], 'csv'),
'enum_form_string': opts['enumFormString']
};
let authNames = [];
let contentTypes = ['application/x-www-form-urlencoded'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testGroupParameters operation.
* @callback module:api/FakeApi~testGroupParametersCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* @param {Number} requiredStringGroup Required String in group parameters
* @param {Boolean} requiredBooleanGroup Required Boolean in group parameters
* @param {Number} requiredInt64Group Required Integer in group parameters
* @param {Object} opts Optional parameters
* @param {Number} opts.stringGroup String in group parameters
* @param {Boolean} opts.booleanGroup Boolean in group parameters
* @param {Number} opts.int64Group Integer in group parameters
* @param {module:api/FakeApi~testGroupParametersCallback} callback The callback function, accepting three arguments: error, data, response
*/
testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'requiredStringGroup' is set
if (requiredStringGroup === undefined || requiredStringGroup === null) {
throw new Error("Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
}
// verify the required parameter 'requiredBooleanGroup' is set
if (requiredBooleanGroup === undefined || requiredBooleanGroup === null) {
throw new Error("Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
}
// verify the required parameter 'requiredInt64Group' is set
if (requiredInt64Group === undefined || requiredInt64Group === null) {
throw new Error("Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
}
let pathParams = {
};
let queryParams = {
'required_string_group': requiredStringGroup,
'required_int64_group': requiredInt64Group,
'string_group': opts['stringGroup'],
'int64_group': opts['int64Group']
};
let headerParams = {
'required_boolean_group': requiredBooleanGroup,
'boolean_group': opts['booleanGroup']
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testInlineAdditionalProperties operation.
* @callback module:api/FakeApi~testInlineAdditionalPropertiesCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
*/
testInlineAdditionalProperties(requestBody, callback) {
let postBody = requestBody;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake/inline-additionalProperties', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* 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/x-www-form-urlencoded'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake/jsonFormData', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,83 @@
/**
* 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';
/**
* FakeClassnameTags123 service.
* @module api/FakeClassnameTags123Api
* @version 1.0.0
*/
export default class FakeClassnameTags123Api {
/**
* Constructs a new FakeClassnameTags123Api.
* @alias module:api/FakeClassnameTags123Api
* @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 testClassname operation.
* @callback module:api/FakeClassnameTags123Api~testClassnameCallback
* @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 class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClassname(client, callback) {
let postBody = client;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['api_key_query'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Client;
return this.apiClient.callApi(
'/fake_classname_test', 'PATCH',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,468 @@
/**
* 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 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;
}
/**
* Callback function to receive the result of the addPet operation.
* @callback module:api/PetApi~addPetCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Add a new pet to the store
* @param {module:model/Pet} pet 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
*/
addPet(pet, callback) {
let postBody = pet;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['petstore_auth'];
let contentTypes = ['application/json', 'application/xml'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/pet', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the deletePet operation.
* @callback module:api/PetApi~deletePetCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Deletes a pet
* @param {Number} petId Pet id to delete
* @param {Object} opts Optional parameters
* @param {String} opts.apiKey
* @param {module:api/PetApi~deletePetCallback} callback The callback function, accepting three arguments: error, data, response
*/
deletePet(petId, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'petId' is set
if (petId === undefined || petId === null) {
throw new Error("Missing the required parameter 'petId' when calling deletePet");
}
let pathParams = {
'petId': petId
};
let queryParams = {
};
let headerParams = {
'api_key': opts['apiKey']
};
let formParams = {
};
let authNames = ['petstore_auth'];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/pet/{petId}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the findPetsByStatus operation.
* @callback module:api/PetApi~findPetsByStatusCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/Pet>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param {Array.<module:model/String>} status Status values that need to be considered for filter
* @param {module:api/PetApi~findPetsByStatusCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/Pet>}
*/
findPetsByStatus(status, callback) {
let postBody = null;
// verify the required parameter 'status' is set
if (status === undefined || status === null) {
throw new Error("Missing the required parameter 'status' when calling findPetsByStatus");
}
let pathParams = {
};
let queryParams = {
'status': this.apiClient.buildCollectionParam(status, 'csv')
};
let headerParams = {
};
let formParams = {
};
let authNames = ['petstore_auth'];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = [Pet];
return this.apiClient.callApi(
'/pet/findByStatus', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the findPetsByTags operation.
* @callback module:api/PetApi~findPetsByTagsCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/Pet>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param {Array.<String>} tags Tags to filter by
* @param {module:api/PetApi~findPetsByTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/Pet>}
*/
findPetsByTags(tags, callback) {
let postBody = null;
// verify the required parameter 'tags' is set
if (tags === undefined || tags === null) {
throw new Error("Missing the required parameter 'tags' when calling findPetsByTags");
}
let pathParams = {
};
let queryParams = {
'tags': this.apiClient.buildCollectionParam(tags, 'csv')
};
let headerParams = {
};
let formParams = {
};
let authNames = ['petstore_auth'];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = [Pet];
return this.apiClient.callApi(
'/pet/findByTags', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getPetById operation.
* @callback module:api/PetApi~getPetByIdCallback
* @param {String} error Error message, if any.
* @param {module:model/Pet} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Find pet by ID
* Returns a single pet
* @param {Number} petId ID of pet to return
* @param {module:api/PetApi~getPetByIdCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Pet}
*/
getPetById(petId, callback) {
let postBody = null;
// verify the required parameter 'petId' is set
if (petId === undefined || petId === null) {
throw new Error("Missing the required parameter 'petId' when calling getPetById");
}
let pathParams = {
'petId': petId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['api_key'];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = Pet;
return this.apiClient.callApi(
'/pet/{petId}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the updatePet operation.
* @callback module:api/PetApi~updatePetCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Update an existing pet
* @param {module:model/Pet} pet 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
*/
updatePet(pet, callback) {
let postBody = pet;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['petstore_auth'];
let contentTypes = ['application/json', 'application/xml'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/pet', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the updatePetWithForm operation.
* @callback module:api/PetApi~updatePetWithFormCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Updates a pet in the store with form data
* @param {Number} petId ID of pet that needs to be updated
* @param {Object} opts Optional parameters
* @param {String} opts.name Updated name of the pet
* @param {String} opts.status Updated status of the pet
* @param {module:api/PetApi~updatePetWithFormCallback} callback The callback function, accepting three arguments: error, data, response
*/
updatePetWithForm(petId, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'petId' is set
if (petId === undefined || petId === null) {
throw new Error("Missing the required parameter 'petId' when calling updatePetWithForm");
}
let pathParams = {
'petId': petId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
'name': opts['name'],
'status': opts['status']
};
let authNames = ['petstore_auth'];
let contentTypes = ['application/x-www-form-urlencoded'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/pet/{petId}', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the uploadFile operation.
* @callback module:api/PetApi~uploadFileCallback
* @param {String} error Error message, if any.
* @param {module:model/ApiResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* uploads an image
* @param {Number} petId ID of pet to update
* @param {Object} opts Optional parameters
* @param {String} opts.additionalMetadata Additional data to pass to server
* @param {File} opts.file file to upload
* @param {module:api/PetApi~uploadFileCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/ApiResponse}
*/
uploadFile(petId, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'petId' is set
if (petId === undefined || petId === null) {
throw new Error("Missing the required parameter 'petId' when calling uploadFile");
}
let pathParams = {
'petId': petId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
'additionalMetadata': opts['additionalMetadata'],
'file': opts['file']
};
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, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the uploadFileWithRequiredFile operation.
* @callback module:api/PetApi~uploadFileWithRequiredFileCallback
* @param {String} error Error message, if any.
* @param {module:model/ApiResponse} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* uploads an image (required)
* @param {Number} petId ID of pet to update
* @param {File} requiredFile file to upload
* @param {Object} opts Optional parameters
* @param {String} opts.additionalMetadata Additional data to pass to server
* @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/ApiResponse}
*/
uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
opts = opts || {};
let postBody = null;
// verify the required parameter 'petId' is set
if (petId === undefined || petId === null) {
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
}
// verify the required parameter 'requiredFile' is set
if (requiredFile === undefined || requiredFile === null) {
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
}
let pathParams = {
'petId': petId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
'additionalMetadata': opts['additionalMetadata'],
'requiredFile': requiredFile
};
let authNames = ['petstore_auth'];
let contentTypes = ['multipart/form-data'];
let accepts = ['application/json'];
let returnType = ApiResponse;
return this.apiClient.callApi(
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,212 @@
/**
* 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 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;
}
/**
* Callback function to receive the result of the deleteOrder operation.
* @callback module:api/StoreApi~deleteOrderCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @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
*/
deleteOrder(orderId, callback) {
let postBody = null;
// verify the required parameter 'orderId' is set
if (orderId === undefined || orderId === null) {
throw new Error("Missing the required parameter 'orderId' when calling deleteOrder");
}
let pathParams = {
'order_id': orderId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/store/order/{order_id}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getInventory operation.
* @callback module:api/StoreApi~getInventoryCallback
* @param {String} error Error message, if any.
* @param {Object.<String, {String: Number}>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @param {module:api/StoreApi~getInventoryCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Object.<String, {String: Number}>}
*/
getInventory(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['api_key'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = {'String': 'Number'};
return this.apiClient.callApi(
'/store/inventory', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getOrderById operation.
* @callback module:api/StoreApi~getOrderByIdCallback
* @param {String} error Error message, if any.
* @param {module:model/Order} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param {Number} orderId ID of pet that needs to be fetched
* @param {module:api/StoreApi~getOrderByIdCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
getOrderById(orderId, callback) {
let postBody = null;
// verify the required parameter 'orderId' is set
if (orderId === undefined || orderId === null) {
throw new Error("Missing the required parameter 'orderId' when calling getOrderById");
}
let pathParams = {
'order_id': orderId
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = Order;
return this.apiClient.callApi(
'/store/order/{order_id}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the placeOrder operation.
* @callback module:api/StoreApi~placeOrderCallback
* @param {String} error Error message, if any.
* @param {module:model/Order} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
placeOrder(order, callback) {
let postBody = order;
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/xml', 'application/json'];
let returnType = Order;
return this.apiClient.callApi(
'/store/order', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,398 @@
/**
* 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 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;
}
/**
* Callback function to receive the result of the createUser operation.
* @callback module:api/UserApi~createUserCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUser(user, callback) {
let postBody = user;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the createUsersWithArrayInput operation.
* @callback module:api/UserApi~createUsersWithArrayInputCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithArrayInput(user, callback) {
let postBody = user;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user/createWithArray', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the createUsersWithListInput operation.
* @callback module:api/UserApi~createUsersWithListInputCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithListInput(user, callback) {
let postBody = user;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user/createWithList', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the deleteUser operation.
* @callback module:api/UserApi~deleteUserCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Delete user
* This can only be done by the logged in user.
* @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
*/
deleteUser(username, callback) {
let postBody = null;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling deleteUser");
}
let pathParams = {
'username': username
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user/{username}', 'DELETE',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the getUserByName operation.
* @callback module:api/UserApi~getUserByNameCallback
* @param {String} error Error message, if any.
* @param {module:model/User} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Get user by user name
* @param {String} username The name that needs to be fetched. Use user1 for testing.
* @param {module:api/UserApi~getUserByNameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/User}
*/
getUserByName(username, callback) {
let postBody = null;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling getUserByName");
}
let pathParams = {
'username': username
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = User;
return this.apiClient.callApi(
'/user/{username}', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the loginUser operation.
* @callback module:api/UserApi~loginUserCallback
* @param {String} error Error message, if any.
* @param {String} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Logs user into the system
* @param {String} username The user name for login
* @param {String} password The password for login in clear text
* @param {module:api/UserApi~loginUserCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link String}
*/
loginUser(username, password, callback) {
let postBody = null;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling loginUser");
}
// verify the required parameter 'password' is set
if (password === undefined || password === null) {
throw new Error("Missing the required parameter 'password' when calling loginUser");
}
let pathParams = {
};
let queryParams = {
'username': username,
'password': password
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = ['application/xml', 'application/json'];
let returnType = 'String';
return this.apiClient.callApi(
'/user/login', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the logoutUser operation.
* @callback module:api/UserApi~logoutUserCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Logs out current logged in user session
* @param {module:api/UserApi~logoutUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
logoutUser(callback) {
let postBody = null;
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = [];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user/logout', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the updateUser operation.
* @callback module:api/UserApi~updateUserCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* Updated user
* This can only be done by the logged in user.
* @param {String} username name that need to be deleted
* @param {module:model/User} user Updated user object
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
updateUser(username, user, callback) {
let postBody = user;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
}
let pathParams = {
'username': username
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/json'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/user/{username}', 'PUT',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}

View File

@@ -0,0 +1,398 @@
/**
* 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 AdditionalPropertiesClass from './model/AdditionalPropertiesClass';
import Animal from './model/Animal';
import ApiResponse from './model/ApiResponse';
import ArrayOfArrayOfNumberOnly from './model/ArrayOfArrayOfNumberOnly';
import ArrayOfNumberOnly from './model/ArrayOfNumberOnly';
import ArrayTest from './model/ArrayTest';
import Capitalization from './model/Capitalization';
import Cat from './model/Cat';
import Category from './model/Category';
import ClassModel from './model/ClassModel';
import Client from './model/Client';
import Dog from './model/Dog';
import EnumArrays from './model/EnumArrays';
import EnumClass from './model/EnumClass';
import EnumTest from './model/EnumTest';
import File from './model/File';
import FileSchemaTestClass from './model/FileSchemaTestClass';
import Foo from './model/Foo';
import FormatTest from './model/FormatTest';
import HasOnlyReadOnly from './model/HasOnlyReadOnly';
import InlineObject from './model/InlineObject';
import InlineObject1 from './model/InlineObject1';
import InlineObject2 from './model/InlineObject2';
import InlineObject3 from './model/InlineObject3';
import InlineObject4 from './model/InlineObject4';
import InlineObject5 from './model/InlineObject5';
import InlineResponseDefault from './model/InlineResponseDefault';
import List from './model/List';
import MapTest from './model/MapTest';
import MixedPropertiesAndAdditionalPropertiesClass from './model/MixedPropertiesAndAdditionalPropertiesClass';
import Model200Response from './model/Model200Response';
import ModelReturn from './model/ModelReturn';
import Name from './model/Name';
import NumberOnly from './model/NumberOnly';
import Order from './model/Order';
import OuterComposite from './model/OuterComposite';
import OuterEnum from './model/OuterEnum';
import Pet from './model/Pet';
import ReadOnlyFirst from './model/ReadOnlyFirst';
import SpecialModelName from './model/SpecialModelName';
import Tag from './model/Tag';
import User from './model/User';
import AnotherFakeApi from './api/AnotherFakeApi';
import DefaultApi from './api/DefaultApi';
import FakeApi from './api/FakeApi';
import FakeClassnameTags123Api from './api/FakeClassnameTags123Api';
import PetApi from './api/PetApi';
import StoreApi from './api/StoreApi';
import UserApi from './api/UserApi';
/**
* This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters__.<br>
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
* <p>
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
* <pre>
* var OpenApiPetstore = require('index'); // See note below*.
* var xxxSvc = new OpenApiPetstore.XxxApi(); // Allocate the API class we're going to use.
* var yyyModel = new OpenApiPetstore.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
* and put the application logic within the callback function.</em>
* </p>
* <p>
* A non-AMD browser application (discouraged) might do something like this:
* <pre>
* var xxxSvc = new OpenApiPetstore.XxxApi(); // Allocate the API class we're going to use.
* var yyy = new OpenApiPetstore.Yyy(); // Construct a model instance.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* </p>
* @module index
* @version 1.0.0
*/
export {
/**
* The ApiClient constructor.
* @property {module:ApiClient}
*/
ApiClient,
/**
* The AdditionalPropertiesClass model constructor.
* @property {module:model/AdditionalPropertiesClass}
*/
AdditionalPropertiesClass,
/**
* The Animal model constructor.
* @property {module:model/Animal}
*/
Animal,
/**
* The ApiResponse model constructor.
* @property {module:model/ApiResponse}
*/
ApiResponse,
/**
* The ArrayOfArrayOfNumberOnly model constructor.
* @property {module:model/ArrayOfArrayOfNumberOnly}
*/
ArrayOfArrayOfNumberOnly,
/**
* The ArrayOfNumberOnly model constructor.
* @property {module:model/ArrayOfNumberOnly}
*/
ArrayOfNumberOnly,
/**
* The ArrayTest model constructor.
* @property {module:model/ArrayTest}
*/
ArrayTest,
/**
* The Capitalization model constructor.
* @property {module:model/Capitalization}
*/
Capitalization,
/**
* The Cat model constructor.
* @property {module:model/Cat}
*/
Cat,
/**
* The Category model constructor.
* @property {module:model/Category}
*/
Category,
/**
* The ClassModel model constructor.
* @property {module:model/ClassModel}
*/
ClassModel,
/**
* The Client model constructor.
* @property {module:model/Client}
*/
Client,
/**
* The Dog model constructor.
* @property {module:model/Dog}
*/
Dog,
/**
* The EnumArrays model constructor.
* @property {module:model/EnumArrays}
*/
EnumArrays,
/**
* The EnumClass model constructor.
* @property {module:model/EnumClass}
*/
EnumClass,
/**
* The EnumTest model constructor.
* @property {module:model/EnumTest}
*/
EnumTest,
/**
* The File model constructor.
* @property {module:model/File}
*/
File,
/**
* The FileSchemaTestClass model constructor.
* @property {module:model/FileSchemaTestClass}
*/
FileSchemaTestClass,
/**
* The Foo model constructor.
* @property {module:model/Foo}
*/
Foo,
/**
* The FormatTest model constructor.
* @property {module:model/FormatTest}
*/
FormatTest,
/**
* The HasOnlyReadOnly model constructor.
* @property {module:model/HasOnlyReadOnly}
*/
HasOnlyReadOnly,
/**
* The InlineObject model constructor.
* @property {module:model/InlineObject}
*/
InlineObject,
/**
* The InlineObject1 model constructor.
* @property {module:model/InlineObject1}
*/
InlineObject1,
/**
* The InlineObject2 model constructor.
* @property {module:model/InlineObject2}
*/
InlineObject2,
/**
* The InlineObject3 model constructor.
* @property {module:model/InlineObject3}
*/
InlineObject3,
/**
* The InlineObject4 model constructor.
* @property {module:model/InlineObject4}
*/
InlineObject4,
/**
* The InlineObject5 model constructor.
* @property {module:model/InlineObject5}
*/
InlineObject5,
/**
* The InlineResponseDefault model constructor.
* @property {module:model/InlineResponseDefault}
*/
InlineResponseDefault,
/**
* The List model constructor.
* @property {module:model/List}
*/
List,
/**
* The MapTest model constructor.
* @property {module:model/MapTest}
*/
MapTest,
/**
* The MixedPropertiesAndAdditionalPropertiesClass model constructor.
* @property {module:model/MixedPropertiesAndAdditionalPropertiesClass}
*/
MixedPropertiesAndAdditionalPropertiesClass,
/**
* The Model200Response model constructor.
* @property {module:model/Model200Response}
*/
Model200Response,
/**
* The ModelReturn model constructor.
* @property {module:model/ModelReturn}
*/
ModelReturn,
/**
* The Name model constructor.
* @property {module:model/Name}
*/
Name,
/**
* The NumberOnly model constructor.
* @property {module:model/NumberOnly}
*/
NumberOnly,
/**
* The Order model constructor.
* @property {module:model/Order}
*/
Order,
/**
* The OuterComposite model constructor.
* @property {module:model/OuterComposite}
*/
OuterComposite,
/**
* The OuterEnum model constructor.
* @property {module:model/OuterEnum}
*/
OuterEnum,
/**
* The Pet model constructor.
* @property {module:model/Pet}
*/
Pet,
/**
* The ReadOnlyFirst model constructor.
* @property {module:model/ReadOnlyFirst}
*/
ReadOnlyFirst,
/**
* The SpecialModelName model constructor.
* @property {module:model/SpecialModelName}
*/
SpecialModelName,
/**
* The Tag model constructor.
* @property {module:model/Tag}
*/
Tag,
/**
* The User model constructor.
* @property {module:model/User}
*/
User,
/**
* The AnotherFakeApi service constructor.
* @property {module:api/AnotherFakeApi}
*/
AnotherFakeApi,
/**
* The DefaultApi service constructor.
* @property {module:api/DefaultApi}
*/
DefaultApi,
/**
* The FakeApi service constructor.
* @property {module:api/FakeApi}
*/
FakeApi,
/**
* The FakeClassnameTags123Api service constructor.
* @property {module:api/FakeClassnameTags123Api}
*/
FakeClassnameTags123Api,
/**
* The PetApi service constructor.
* @property {module:api/PetApi}
*/
PetApi,
/**
* The StoreApi service constructor.
* @property {module:api/StoreApi}
*/
StoreApi,
/**
* The UserApi service constructor.
* @property {module:api/UserApi}
*/
UserApi
};

View File

@@ -0,0 +1,79 @@
/**
* 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';
/**
* The AdditionalPropertiesClass model module.
* @module model/AdditionalPropertiesClass
* @version 1.0.0
*/
class AdditionalPropertiesClass {
/**
* Constructs a new <code>AdditionalPropertiesClass</code>.
* @alias module:model/AdditionalPropertiesClass
*/
constructor() {
AdditionalPropertiesClass.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>AdditionalPropertiesClass</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AdditionalPropertiesClass} obj Optional instance to populate.
* @return {module:model/AdditionalPropertiesClass} The populated <code>AdditionalPropertiesClass</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AdditionalPropertiesClass();
if (data.hasOwnProperty('map_property')) {
obj['map_property'] = ApiClient.convertToType(data['map_property'], {'String': 'String'});
}
if (data.hasOwnProperty('map_of_map_property')) {
obj['map_of_map_property'] = ApiClient.convertToType(data['map_of_map_property'], {'String': {'String': 'String'}});
}
}
return obj;
}
}
/**
* @member {Object.<String, String>} map_property
*/
AdditionalPropertiesClass.prototype['map_property'] = undefined;
/**
* @member {Object.<String, Object.<String, String>>} map_of_map_property
*/
AdditionalPropertiesClass.prototype['map_of_map_property'] = undefined;
export default AdditionalPropertiesClass;

View File

@@ -0,0 +1,82 @@
/**
* 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';
/**
* The Animal model module.
* @module model/Animal
* @version 1.0.0
*/
class Animal {
/**
* Constructs a new <code>Animal</code>.
* @alias module:model/Animal
* @param className {String}
*/
constructor(className) {
Animal.initialize(this, className);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, className) {
obj['className'] = className;
}
/**
* Constructs a <code>Animal</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Animal} obj Optional instance to populate.
* @return {module:model/Animal} The populated <code>Animal</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Animal();
if (data.hasOwnProperty('className')) {
obj['className'] = ApiClient.convertToType(data['className'], 'String');
}
if (data.hasOwnProperty('color')) {
obj['color'] = ApiClient.convertToType(data['color'], 'String');
}
}
return obj;
}
}
/**
* @member {String} className
*/
Animal.prototype['className'] = undefined;
/**
* @member {String} color
* @default 'red'
*/
Animal.prototype['color'] = 'red';
export default Animal;

View File

@@ -0,0 +1,70 @@
/**
* 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 Animal from './Animal';
/**
* The AnimalFarm model module.
* @module model/AnimalFarm
* @version 1.0.0
*/
class AnimalFarm extends Array {
/**
* Constructs a new <code>AnimalFarm</code>.
* @alias module:model/AnimalFarm
* @extends Array
*/
constructor() {
super();
AnimalFarm.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>AnimalFarm</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/AnimalFarm} obj Optional instance to populate.
* @return {module:model/AnimalFarm} The populated <code>AnimalFarm</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new AnimalFarm();
ApiClient.constructFromObject(data, obj, 'Animal');
}
return obj;
}
}
export default AnimalFarm;

View File

@@ -0,0 +1,87 @@
/**
* 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';
/**
* The ApiResponse model module.
* @module model/ApiResponse
* @version 1.0.0
*/
class ApiResponse {
/**
* Constructs a new <code>ApiResponse</code>.
* @alias module:model/ApiResponse
*/
constructor() {
ApiResponse.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ApiResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ApiResponse} obj Optional instance to populate.
* @return {module:model/ApiResponse} The populated <code>ApiResponse</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ApiResponse();
if (data.hasOwnProperty('code')) {
obj['code'] = ApiClient.convertToType(data['code'], 'Number');
}
if (data.hasOwnProperty('type')) {
obj['type'] = ApiClient.convertToType(data['type'], 'String');
}
if (data.hasOwnProperty('message')) {
obj['message'] = ApiClient.convertToType(data['message'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} code
*/
ApiResponse.prototype['code'] = undefined;
/**
* @member {String} type
*/
ApiResponse.prototype['type'] = undefined;
/**
* @member {String} message
*/
ApiResponse.prototype['message'] = undefined;
export default ApiResponse;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The ArrayOfArrayOfNumberOnly model module.
* @module model/ArrayOfArrayOfNumberOnly
* @version 1.0.0
*/
class ArrayOfArrayOfNumberOnly {
/**
* Constructs a new <code>ArrayOfArrayOfNumberOnly</code>.
* @alias module:model/ArrayOfArrayOfNumberOnly
*/
constructor() {
ArrayOfArrayOfNumberOnly.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ArrayOfArrayOfNumberOnly</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ArrayOfArrayOfNumberOnly} obj Optional instance to populate.
* @return {module:model/ArrayOfArrayOfNumberOnly} The populated <code>ArrayOfArrayOfNumberOnly</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ArrayOfArrayOfNumberOnly();
if (data.hasOwnProperty('ArrayArrayNumber')) {
obj['ArrayArrayNumber'] = ApiClient.convertToType(data['ArrayArrayNumber'], [['Number']]);
}
}
return obj;
}
}
/**
* @member {Array.<Array.<Number>>} ArrayArrayNumber
*/
ArrayOfArrayOfNumberOnly.prototype['ArrayArrayNumber'] = undefined;
export default ArrayOfArrayOfNumberOnly;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The ArrayOfNumberOnly model module.
* @module model/ArrayOfNumberOnly
* @version 1.0.0
*/
class ArrayOfNumberOnly {
/**
* Constructs a new <code>ArrayOfNumberOnly</code>.
* @alias module:model/ArrayOfNumberOnly
*/
constructor() {
ArrayOfNumberOnly.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ArrayOfNumberOnly</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ArrayOfNumberOnly} obj Optional instance to populate.
* @return {module:model/ArrayOfNumberOnly} The populated <code>ArrayOfNumberOnly</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ArrayOfNumberOnly();
if (data.hasOwnProperty('ArrayNumber')) {
obj['ArrayNumber'] = ApiClient.convertToType(data['ArrayNumber'], ['Number']);
}
}
return obj;
}
}
/**
* @member {Array.<Number>} ArrayNumber
*/
ArrayOfNumberOnly.prototype['ArrayNumber'] = undefined;
export default ArrayOfNumberOnly;

View File

@@ -0,0 +1,88 @@
/**
* 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 ReadOnlyFirst from './ReadOnlyFirst';
/**
* The ArrayTest model module.
* @module model/ArrayTest
* @version 1.0.0
*/
class ArrayTest {
/**
* Constructs a new <code>ArrayTest</code>.
* @alias module:model/ArrayTest
*/
constructor() {
ArrayTest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ArrayTest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ArrayTest} obj Optional instance to populate.
* @return {module:model/ArrayTest} The populated <code>ArrayTest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ArrayTest();
if (data.hasOwnProperty('array_of_string')) {
obj['array_of_string'] = ApiClient.convertToType(data['array_of_string'], ['String']);
}
if (data.hasOwnProperty('array_array_of_integer')) {
obj['array_array_of_integer'] = ApiClient.convertToType(data['array_array_of_integer'], [['Number']]);
}
if (data.hasOwnProperty('array_array_of_model')) {
obj['array_array_of_model'] = ApiClient.convertToType(data['array_array_of_model'], [[ReadOnlyFirst]]);
}
}
return obj;
}
}
/**
* @member {Array.<String>} array_of_string
*/
ArrayTest.prototype['array_of_string'] = undefined;
/**
* @member {Array.<Array.<Number>>} array_array_of_integer
*/
ArrayTest.prototype['array_array_of_integer'] = undefined;
/**
* @member {Array.<Array.<module:model/ReadOnlyFirst>>} array_array_of_model
*/
ArrayTest.prototype['array_array_of_model'] = undefined;
export default ArrayTest;

View File

@@ -0,0 +1,112 @@
/**
* 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';
/**
* The Capitalization model module.
* @module model/Capitalization
* @version 1.0.0
*/
class Capitalization {
/**
* Constructs a new <code>Capitalization</code>.
* @alias module:model/Capitalization
*/
constructor() {
Capitalization.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Capitalization</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Capitalization} obj Optional instance to populate.
* @return {module:model/Capitalization} The populated <code>Capitalization</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Capitalization();
if (data.hasOwnProperty('smallCamel')) {
obj['smallCamel'] = ApiClient.convertToType(data['smallCamel'], 'String');
}
if (data.hasOwnProperty('CapitalCamel')) {
obj['CapitalCamel'] = ApiClient.convertToType(data['CapitalCamel'], 'String');
}
if (data.hasOwnProperty('small_Snake')) {
obj['small_Snake'] = ApiClient.convertToType(data['small_Snake'], 'String');
}
if (data.hasOwnProperty('Capital_Snake')) {
obj['Capital_Snake'] = ApiClient.convertToType(data['Capital_Snake'], 'String');
}
if (data.hasOwnProperty('SCA_ETH_Flow_Points')) {
obj['SCA_ETH_Flow_Points'] = ApiClient.convertToType(data['SCA_ETH_Flow_Points'], 'String');
}
if (data.hasOwnProperty('ATT_NAME')) {
obj['ATT_NAME'] = ApiClient.convertToType(data['ATT_NAME'], 'String');
}
}
return obj;
}
}
/**
* @member {String} smallCamel
*/
Capitalization.prototype['smallCamel'] = undefined;
/**
* @member {String} CapitalCamel
*/
Capitalization.prototype['CapitalCamel'] = undefined;
/**
* @member {String} small_Snake
*/
Capitalization.prototype['small_Snake'] = undefined;
/**
* @member {String} Capital_Snake
*/
Capitalization.prototype['Capital_Snake'] = undefined;
/**
* @member {String} SCA_ETH_Flow_Points
*/
Capitalization.prototype['SCA_ETH_Flow_Points'] = undefined;
/**
* Name of the pet
* @member {String} ATT_NAME
*/
Capitalization.prototype['ATT_NAME'] = undefined;
export default Capitalization;

View File

@@ -0,0 +1,87 @@
/**
* 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 Animal from './Animal';
/**
* The Cat model module.
* @module model/Cat
* @version 1.0.0
*/
class Cat {
/**
* Constructs a new <code>Cat</code>.
* @alias module:model/Cat
* @extends module:model/Animal
* @implements module:model/Animal
* @param className {String}
*/
constructor(className) {
Animal.initialize(this, className);
Cat.initialize(this, className);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, className) {
}
/**
* Constructs a <code>Cat</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Cat} obj Optional instance to populate.
* @return {module:model/Cat} The populated <code>Cat</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Cat();
Animal.constructFromObject(data, obj);
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('declawed')) {
obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Boolean} declawed
*/
Cat.prototype['declawed'] = undefined;
// Implement Animal interface:
/**
* @member {String} className
*/
Animal.prototype['className'] = undefined;
/**
* @member {String} color
* @default 'red'
*/
Animal.prototype['color'] = 'red';
export default Cat;

View File

@@ -0,0 +1,82 @@
/**
* 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';
/**
* The Category model module.
* @module model/Category
* @version 1.0.0
*/
class Category {
/**
* Constructs a new <code>Category</code>.
* @alias module:model/Category
* @param name {String}
*/
constructor(name) {
Category.initialize(this, name);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name) {
obj['name'] = name;
}
/**
* Constructs a <code>Category</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Category} obj Optional instance to populate.
* @return {module:model/Category} The populated <code>Category</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Category();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} id
*/
Category.prototype['id'] = undefined;
/**
* @member {String} name
* @default 'default-name'
*/
Category.prototype['name'] = 'default-name';
export default Category;

View File

@@ -0,0 +1,72 @@
/**
* 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';
/**
* The ClassModel model module.
* @module model/ClassModel
* @version 1.0.0
*/
class ClassModel {
/**
* Constructs a new <code>ClassModel</code>.
* Model for testing model with \&quot;_class\&quot; property
* @alias module:model/ClassModel
*/
constructor() {
ClassModel.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ClassModel</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ClassModel} obj Optional instance to populate.
* @return {module:model/ClassModel} The populated <code>ClassModel</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ClassModel();
if (data.hasOwnProperty('_class')) {
obj['_class'] = ApiClient.convertToType(data['_class'], 'String');
}
}
return obj;
}
}
/**
* @member {String} _class
*/
ClassModel.prototype['_class'] = undefined;
export default ClassModel;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The Client model module.
* @module model/Client
* @version 1.0.0
*/
class Client {
/**
* Constructs a new <code>Client</code>.
* @alias module:model/Client
*/
constructor() {
Client.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Client</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Client} obj Optional instance to populate.
* @return {module:model/Client} The populated <code>Client</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Client();
if (data.hasOwnProperty('client')) {
obj['client'] = ApiClient.convertToType(data['client'], 'String');
}
}
return obj;
}
}
/**
* @member {String} client
*/
Client.prototype['client'] = undefined;
export default Client;

View File

@@ -0,0 +1,87 @@
/**
* 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 Animal from './Animal';
/**
* The Dog model module.
* @module model/Dog
* @version 1.0.0
*/
class Dog {
/**
* Constructs a new <code>Dog</code>.
* @alias module:model/Dog
* @extends module:model/Animal
* @implements module:model/Animal
* @param className {String}
*/
constructor(className) {
Animal.initialize(this, className);
Dog.initialize(this, className);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, className) {
}
/**
* Constructs a <code>Dog</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Dog} obj Optional instance to populate.
* @return {module:model/Dog} The populated <code>Dog</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Dog();
Animal.constructFromObject(data, obj);
Animal.constructFromObject(data, obj);
if (data.hasOwnProperty('breed')) {
obj['breed'] = ApiClient.convertToType(data['breed'], 'String');
}
}
return obj;
}
}
/**
* @member {String} breed
*/
Dog.prototype['breed'] = undefined;
// Implement Animal interface:
/**
* @member {String} className
*/
Animal.prototype['className'] = undefined;
/**
* @member {String} color
* @default 'red'
*/
Animal.prototype['color'] = 'red';
export default Dog;

View File

@@ -0,0 +1,121 @@
/**
* 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';
/**
* The EnumArrays model module.
* @module model/EnumArrays
* @version 1.0.0
*/
class EnumArrays {
/**
* Constructs a new <code>EnumArrays</code>.
* @alias module:model/EnumArrays
*/
constructor() {
EnumArrays.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>EnumArrays</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/EnumArrays} obj Optional instance to populate.
* @return {module:model/EnumArrays} The populated <code>EnumArrays</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new EnumArrays();
if (data.hasOwnProperty('just_symbol')) {
obj['just_symbol'] = ApiClient.convertToType(data['just_symbol'], 'String');
}
if (data.hasOwnProperty('array_enum')) {
obj['array_enum'] = ApiClient.convertToType(data['array_enum'], ['String']);
}
}
return obj;
}
}
/**
* @member {module:model/EnumArrays.JustSymbolEnum} just_symbol
*/
EnumArrays.prototype['just_symbol'] = undefined;
/**
* @member {Array.<module:model/EnumArrays.ArrayEnumEnum>} array_enum
*/
EnumArrays.prototype['array_enum'] = undefined;
/**
* Allowed values for the <code>just_symbol</code> property.
* @enum {String}
* @readonly
*/
EnumArrays['JustSymbolEnum'] = {
/**
* value: ">="
* @const
*/
"GREATER_THAN_OR_EQUAL_TO": ">=",
/**
* value: "$"
* @const
*/
"DOLLAR": "$"
};
/**
* Allowed values for the <code>arrayEnum</code> property.
* @enum {String}
* @readonly
*/
EnumArrays['ArrayEnumEnum'] = {
/**
* value: "fish"
* @const
*/
"fish": "fish",
/**
* value: "crab"
* @const
*/
"crab": "crab"
};
export default EnumArrays;

View File

@@ -0,0 +1,53 @@
/**
* 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';
/**
* Enum class EnumClass.
* @enum {}
* @readonly
*/
export default class EnumClass {
/**
* value: "_abc"
* @const
*/
"_abc" = "_abc";
/**
* value: "-efg"
* @const
*/
"-efg" = "-efg";
/**
* value: "(xyz)"
* @const
*/
"(xyz)" = "(xyz)";
/**
* Returns a <code>EnumClass</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/EnumClass} The enum <code>EnumClass</code> value.
*/
static constructFromObject(object) {
return object;
}
}

View File

@@ -0,0 +1,202 @@
/**
* 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 OuterEnum from './OuterEnum';
/**
* The EnumTest model module.
* @module model/EnumTest
* @version 1.0.0
*/
class EnumTest {
/**
* Constructs a new <code>EnumTest</code>.
* @alias module:model/EnumTest
* @param enumStringRequired {module:model/EnumTest.EnumStringRequiredEnum}
*/
constructor(enumStringRequired) {
EnumTest.initialize(this, enumStringRequired);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, enumStringRequired) {
obj['enum_string_required'] = enumStringRequired;
}
/**
* Constructs a <code>EnumTest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/EnumTest} obj Optional instance to populate.
* @return {module:model/EnumTest} The populated <code>EnumTest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new EnumTest();
if (data.hasOwnProperty('enum_string')) {
obj['enum_string'] = ApiClient.convertToType(data['enum_string'], 'String');
}
if (data.hasOwnProperty('enum_string_required')) {
obj['enum_string_required'] = ApiClient.convertToType(data['enum_string_required'], 'String');
}
if (data.hasOwnProperty('enum_integer')) {
obj['enum_integer'] = ApiClient.convertToType(data['enum_integer'], 'Number');
}
if (data.hasOwnProperty('enum_number')) {
obj['enum_number'] = ApiClient.convertToType(data['enum_number'], 'Number');
}
if (data.hasOwnProperty('outerEnum')) {
obj['outerEnum'] = OuterEnum.constructFromObject(data['outerEnum']);
}
}
return obj;
}
}
/**
* @member {module:model/EnumTest.EnumStringEnum} enum_string
*/
EnumTest.prototype['enum_string'] = undefined;
/**
* @member {module:model/EnumTest.EnumStringRequiredEnum} enum_string_required
*/
EnumTest.prototype['enum_string_required'] = undefined;
/**
* @member {module:model/EnumTest.EnumIntegerEnum} enum_integer
*/
EnumTest.prototype['enum_integer'] = undefined;
/**
* @member {module:model/EnumTest.EnumNumberEnum} enum_number
*/
EnumTest.prototype['enum_number'] = undefined;
/**
* @member {module:model/OuterEnum} outerEnum
*/
EnumTest.prototype['outerEnum'] = undefined;
/**
* Allowed values for the <code>enum_string</code> property.
* @enum {String}
* @readonly
*/
EnumTest['EnumStringEnum'] = {
/**
* value: "UPPER"
* @const
*/
"UPPER": "UPPER",
/**
* value: "lower"
* @const
*/
"lower": "lower",
/**
* value: ""
* @const
*/
"empty": ""
};
/**
* Allowed values for the <code>enum_string_required</code> property.
* @enum {String}
* @readonly
*/
EnumTest['EnumStringRequiredEnum'] = {
/**
* value: "UPPER"
* @const
*/
"UPPER": "UPPER",
/**
* value: "lower"
* @const
*/
"lower": "lower",
/**
* value: ""
* @const
*/
"empty": ""
};
/**
* Allowed values for the <code>enum_integer</code> property.
* @enum {Number}
* @readonly
*/
EnumTest['EnumIntegerEnum'] = {
/**
* value: 1
* @const
*/
"1": 1,
/**
* value: -1
* @const
*/
"-1": -1
};
/**
* Allowed values for the <code>enum_number</code> property.
* @enum {Number}
* @readonly
*/
EnumTest['EnumNumberEnum'] = {
/**
* value: 1.1
* @const
*/
"1.1": 1.1,
/**
* value: -1.2
* @const
*/
"-1.2": -1.2
};
export default EnumTest;

View File

@@ -0,0 +1,73 @@
/**
* 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';
/**
* The File model module.
* @module model/File
* @version 1.0.0
*/
class File {
/**
* Constructs a new <code>File</code>.
* Must be named &#x60;File&#x60; for test.
* @alias module:model/File
*/
constructor() {
File.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/File} obj Optional instance to populate.
* @return {module:model/File} The populated <code>File</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new File();
if (data.hasOwnProperty('sourceURI')) {
obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
}
}
return obj;
}
}
/**
* Test capitalization
* @member {String} sourceURI
*/
File.prototype['sourceURI'] = undefined;
export default File;

View File

@@ -0,0 +1,79 @@
/**
* 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';
/**
* The FileSchemaTestClass model module.
* @module model/FileSchemaTestClass
* @version 1.0.0
*/
class FileSchemaTestClass {
/**
* Constructs a new <code>FileSchemaTestClass</code>.
* @alias module:model/FileSchemaTestClass
*/
constructor() {
FileSchemaTestClass.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>FileSchemaTestClass</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
* @return {module:model/FileSchemaTestClass} The populated <code>FileSchemaTestClass</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new FileSchemaTestClass();
if (data.hasOwnProperty('file')) {
obj['file'] = File.constructFromObject(data['file']);
}
if (data.hasOwnProperty('files')) {
obj['files'] = ApiClient.convertToType(data['files'], [File]);
}
}
return obj;
}
}
/**
* @member {File} file
*/
FileSchemaTestClass.prototype['file'] = undefined;
/**
* @member {Array.<File>} files
*/
FileSchemaTestClass.prototype['files'] = undefined;
export default FileSchemaTestClass;

View File

@@ -0,0 +1,72 @@
/**
* 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';
/**
* The Foo model module.
* @module model/Foo
* @version 1.0.0
*/
class Foo {
/**
* Constructs a new <code>Foo</code>.
* @alias module:model/Foo
*/
constructor() {
Foo.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Foo</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Foo} obj Optional instance to populate.
* @return {module:model/Foo} The populated <code>Foo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Foo();
if (data.hasOwnProperty('bar')) {
obj['bar'] = ApiClient.convertToType(data['bar'], 'String');
}
}
return obj;
}
}
/**
* @member {String} bar
* @default 'bar'
*/
Foo.prototype['bar'] = 'bar';
export default Foo;

View File

@@ -0,0 +1,193 @@
/**
* 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';
/**
* The FormatTest model module.
* @module model/FormatTest
* @version 1.0.0
*/
class FormatTest {
/**
* Constructs a new <code>FormatTest</code>.
* @alias module:model/FormatTest
* @param _number {Number}
* @param _byte {Blob}
* @param _date {Date}
* @param password {String}
*/
constructor(_number, _byte, _date, password) {
FormatTest.initialize(this, _number, _byte, _date, password);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, _number, _byte, _date, password) {
obj['number'] = _number;
obj['byte'] = _byte;
obj['date'] = _date;
obj['password'] = password;
}
/**
* Constructs a <code>FormatTest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/FormatTest} obj Optional instance to populate.
* @return {module:model/FormatTest} The populated <code>FormatTest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new FormatTest();
if (data.hasOwnProperty('integer')) {
obj['integer'] = ApiClient.convertToType(data['integer'], 'Number');
}
if (data.hasOwnProperty('int32')) {
obj['int32'] = ApiClient.convertToType(data['int32'], 'Number');
}
if (data.hasOwnProperty('int64')) {
obj['int64'] = ApiClient.convertToType(data['int64'], 'Number');
}
if (data.hasOwnProperty('number')) {
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
}
if (data.hasOwnProperty('float')) {
obj['float'] = ApiClient.convertToType(data['float'], 'Number');
}
if (data.hasOwnProperty('double')) {
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
}
if (data.hasOwnProperty('string')) {
obj['string'] = ApiClient.convertToType(data['string'], 'String');
}
if (data.hasOwnProperty('byte')) {
obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob');
}
if (data.hasOwnProperty('binary')) {
obj['binary'] = ApiClient.convertToType(data['binary'], File);
}
if (data.hasOwnProperty('date')) {
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
}
if (data.hasOwnProperty('dateTime')) {
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
}
if (data.hasOwnProperty('uuid')) {
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
}
if (data.hasOwnProperty('password')) {
obj['password'] = ApiClient.convertToType(data['password'], 'String');
}
if (data.hasOwnProperty('pattern_with_digits')) {
obj['pattern_with_digits'] = ApiClient.convertToType(data['pattern_with_digits'], 'String');
}
if (data.hasOwnProperty('pattern_with_digits_and_delimiter')) {
obj['pattern_with_digits_and_delimiter'] = ApiClient.convertToType(data['pattern_with_digits_and_delimiter'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} integer
*/
FormatTest.prototype['integer'] = undefined;
/**
* @member {Number} int32
*/
FormatTest.prototype['int32'] = undefined;
/**
* @member {Number} int64
*/
FormatTest.prototype['int64'] = undefined;
/**
* @member {Number} number
*/
FormatTest.prototype['number'] = undefined;
/**
* @member {Number} float
*/
FormatTest.prototype['float'] = undefined;
/**
* @member {Number} double
*/
FormatTest.prototype['double'] = undefined;
/**
* @member {String} string
*/
FormatTest.prototype['string'] = undefined;
/**
* @member {Blob} byte
*/
FormatTest.prototype['byte'] = undefined;
/**
* @member {File} binary
*/
FormatTest.prototype['binary'] = undefined;
/**
* @member {Date} date
*/
FormatTest.prototype['date'] = undefined;
/**
* @member {Date} dateTime
*/
FormatTest.prototype['dateTime'] = undefined;
/**
* @member {String} uuid
*/
FormatTest.prototype['uuid'] = undefined;
/**
* @member {String} password
*/
FormatTest.prototype['password'] = undefined;
/**
* A string that is a 10 digit number. Can have leading zeros.
* @member {String} pattern_with_digits
*/
FormatTest.prototype['pattern_with_digits'] = undefined;
/**
* A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
* @member {String} pattern_with_digits_and_delimiter
*/
FormatTest.prototype['pattern_with_digits_and_delimiter'] = undefined;
export default FormatTest;

View File

@@ -0,0 +1,79 @@
/**
* 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';
/**
* The HasOnlyReadOnly model module.
* @module model/HasOnlyReadOnly
* @version 1.0.0
*/
class HasOnlyReadOnly {
/**
* Constructs a new <code>HasOnlyReadOnly</code>.
* @alias module:model/HasOnlyReadOnly
*/
constructor() {
HasOnlyReadOnly.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>HasOnlyReadOnly</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/HasOnlyReadOnly} obj Optional instance to populate.
* @return {module:model/HasOnlyReadOnly} The populated <code>HasOnlyReadOnly</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new HasOnlyReadOnly();
if (data.hasOwnProperty('bar')) {
obj['bar'] = ApiClient.convertToType(data['bar'], 'String');
}
if (data.hasOwnProperty('foo')) {
obj['foo'] = ApiClient.convertToType(data['foo'], 'String');
}
}
return obj;
}
}
/**
* @member {String} bar
*/
HasOnlyReadOnly.prototype['bar'] = undefined;
/**
* @member {String} foo
*/
HasOnlyReadOnly.prototype['foo'] = undefined;
export default HasOnlyReadOnly;

View File

@@ -0,0 +1,81 @@
/**
* 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';
/**
* The InlineObject model module.
* @module model/InlineObject
* @version 1.0.0
*/
class InlineObject {
/**
* Constructs a new <code>InlineObject</code>.
* @alias module:model/InlineObject
*/
constructor() {
InlineObject.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>InlineObject</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject} obj Optional instance to populate.
* @return {module:model/InlineObject} The populated <code>InlineObject</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
}
return obj;
}
}
/**
* Updated name of the pet
* @member {String} name
*/
InlineObject.prototype['name'] = undefined;
/**
* Updated status of the pet
* @member {String} status
*/
InlineObject.prototype['status'] = undefined;
export default InlineObject;

View File

@@ -0,0 +1,81 @@
/**
* 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';
/**
* The InlineObject1 model module.
* @module model/InlineObject1
* @version 1.0.0
*/
class InlineObject1 {
/**
* Constructs a new <code>InlineObject1</code>.
* @alias module:model/InlineObject1
*/
constructor() {
InlineObject1.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>InlineObject1</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject1} obj Optional instance to populate.
* @return {module:model/InlineObject1} The populated <code>InlineObject1</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject1();
if (data.hasOwnProperty('additionalMetadata')) {
obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String');
}
if (data.hasOwnProperty('file')) {
obj['file'] = ApiClient.convertToType(data['file'], File);
}
}
return obj;
}
}
/**
* Additional data to pass to server
* @member {String} additionalMetadata
*/
InlineObject1.prototype['additionalMetadata'] = undefined;
/**
* file to upload
* @member {File} file
*/
InlineObject1.prototype['file'] = undefined;
export default InlineObject1;

View File

@@ -0,0 +1,130 @@
/**
* 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';
/**
* The InlineObject2 model module.
* @module model/InlineObject2
* @version 1.0.0
*/
class InlineObject2 {
/**
* Constructs a new <code>InlineObject2</code>.
* @alias module:model/InlineObject2
*/
constructor() {
InlineObject2.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>InlineObject2</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject2} obj Optional instance to populate.
* @return {module:model/InlineObject2} The populated <code>InlineObject2</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject2();
if (data.hasOwnProperty('enum_form_string_array')) {
obj['enum_form_string_array'] = ApiClient.convertToType(data['enum_form_string_array'], ['String']);
}
if (data.hasOwnProperty('enum_form_string')) {
obj['enum_form_string'] = ApiClient.convertToType(data['enum_form_string'], 'String');
}
}
return obj;
}
}
/**
* Form parameter enum test (string array)
* @member {Array.<module:model/InlineObject2.EnumFormStringArrayEnum>} enum_form_string_array
*/
InlineObject2.prototype['enum_form_string_array'] = undefined;
/**
* Form parameter enum test (string)
* @member {module:model/InlineObject2.EnumFormStringEnum} enum_form_string
* @default '-efg'
*/
InlineObject2.prototype['enum_form_string'] = '-efg';
/**
* Allowed values for the <code>enumFormStringArray</code> property.
* @enum {String}
* @readonly
*/
InlineObject2['EnumFormStringArrayEnum'] = {
/**
* value: ">"
* @const
*/
"GREATER_THAN": ">",
/**
* value: "$"
* @const
*/
"DOLLAR": "$"
};
/**
* Allowed values for the <code>enum_form_string</code> property.
* @enum {String}
* @readonly
*/
InlineObject2['EnumFormStringEnum'] = {
/**
* value: "_abc"
* @const
*/
"_abc": "_abc",
/**
* value: "-efg"
* @const
*/
"-efg": "-efg",
/**
* value: "(xyz)"
* @const
*/
"(xyz)": "(xyz)"
};
export default InlineObject2;

View File

@@ -0,0 +1,197 @@
/**
* 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';
/**
* The InlineObject3 model module.
* @module model/InlineObject3
* @version 1.0.0
*/
class InlineObject3 {
/**
* Constructs a new <code>InlineObject3</code>.
* @alias module:model/InlineObject3
* @param _number {Number} None
* @param _double {Number} None
* @param patternWithoutDelimiter {String} None
* @param _byte {Blob} None
*/
constructor(_number, _double, patternWithoutDelimiter, _byte) {
InlineObject3.initialize(this, _number, _double, patternWithoutDelimiter, _byte);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, _number, _double, patternWithoutDelimiter, _byte) {
obj['number'] = _number;
obj['double'] = _double;
obj['pattern_without_delimiter'] = patternWithoutDelimiter;
obj['byte'] = _byte;
}
/**
* Constructs a <code>InlineObject3</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject3} obj Optional instance to populate.
* @return {module:model/InlineObject3} The populated <code>InlineObject3</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject3();
if (data.hasOwnProperty('integer')) {
obj['integer'] = ApiClient.convertToType(data['integer'], 'Number');
}
if (data.hasOwnProperty('int32')) {
obj['int32'] = ApiClient.convertToType(data['int32'], 'Number');
}
if (data.hasOwnProperty('int64')) {
obj['int64'] = ApiClient.convertToType(data['int64'], 'Number');
}
if (data.hasOwnProperty('number')) {
obj['number'] = ApiClient.convertToType(data['number'], 'Number');
}
if (data.hasOwnProperty('float')) {
obj['float'] = ApiClient.convertToType(data['float'], 'Number');
}
if (data.hasOwnProperty('double')) {
obj['double'] = ApiClient.convertToType(data['double'], 'Number');
}
if (data.hasOwnProperty('string')) {
obj['string'] = ApiClient.convertToType(data['string'], 'String');
}
if (data.hasOwnProperty('pattern_without_delimiter')) {
obj['pattern_without_delimiter'] = ApiClient.convertToType(data['pattern_without_delimiter'], 'String');
}
if (data.hasOwnProperty('byte')) {
obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob');
}
if (data.hasOwnProperty('binary')) {
obj['binary'] = ApiClient.convertToType(data['binary'], File);
}
if (data.hasOwnProperty('date')) {
obj['date'] = ApiClient.convertToType(data['date'], 'Date');
}
if (data.hasOwnProperty('dateTime')) {
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
}
if (data.hasOwnProperty('password')) {
obj['password'] = ApiClient.convertToType(data['password'], 'String');
}
if (data.hasOwnProperty('callback')) {
obj['callback'] = ApiClient.convertToType(data['callback'], 'String');
}
}
return obj;
}
}
/**
* None
* @member {Number} integer
*/
InlineObject3.prototype['integer'] = undefined;
/**
* None
* @member {Number} int32
*/
InlineObject3.prototype['int32'] = undefined;
/**
* None
* @member {Number} int64
*/
InlineObject3.prototype['int64'] = undefined;
/**
* None
* @member {Number} number
*/
InlineObject3.prototype['number'] = undefined;
/**
* None
* @member {Number} float
*/
InlineObject3.prototype['float'] = undefined;
/**
* None
* @member {Number} double
*/
InlineObject3.prototype['double'] = undefined;
/**
* None
* @member {String} string
*/
InlineObject3.prototype['string'] = undefined;
/**
* None
* @member {String} pattern_without_delimiter
*/
InlineObject3.prototype['pattern_without_delimiter'] = undefined;
/**
* None
* @member {Blob} byte
*/
InlineObject3.prototype['byte'] = undefined;
/**
* None
* @member {File} binary
*/
InlineObject3.prototype['binary'] = undefined;
/**
* None
* @member {Date} date
*/
InlineObject3.prototype['date'] = undefined;
/**
* None
* @member {Date} dateTime
*/
InlineObject3.prototype['dateTime'] = undefined;
/**
* None
* @member {String} password
*/
InlineObject3.prototype['password'] = undefined;
/**
* None
* @member {String} callback
*/
InlineObject3.prototype['callback'] = undefined;
export default InlineObject3;

View File

@@ -0,0 +1,85 @@
/**
* 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';
/**
* The InlineObject4 model module.
* @module model/InlineObject4
* @version 1.0.0
*/
class InlineObject4 {
/**
* Constructs a new <code>InlineObject4</code>.
* @alias module:model/InlineObject4
* @param param {String} field1
* @param param2 {String} field2
*/
constructor(param, param2) {
InlineObject4.initialize(this, param, param2);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, param, param2) {
obj['param'] = param;
obj['param2'] = param2;
}
/**
* Constructs a <code>InlineObject4</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject4} obj Optional instance to populate.
* @return {module:model/InlineObject4} The populated <code>InlineObject4</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject4();
if (data.hasOwnProperty('param')) {
obj['param'] = ApiClient.convertToType(data['param'], 'String');
}
if (data.hasOwnProperty('param2')) {
obj['param2'] = ApiClient.convertToType(data['param2'], 'String');
}
}
return obj;
}
}
/**
* field1
* @member {String} param
*/
InlineObject4.prototype['param'] = undefined;
/**
* field2
* @member {String} param2
*/
InlineObject4.prototype['param2'] = undefined;
export default InlineObject4;

View File

@@ -0,0 +1,83 @@
/**
* 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';
/**
* The InlineObject5 model module.
* @module model/InlineObject5
* @version 1.0.0
*/
class InlineObject5 {
/**
* Constructs a new <code>InlineObject5</code>.
* @alias module:model/InlineObject5
* @param requiredFile {File} file to upload
*/
constructor(requiredFile) {
InlineObject5.initialize(this, requiredFile);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, requiredFile) {
obj['requiredFile'] = requiredFile;
}
/**
* Constructs a <code>InlineObject5</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineObject5} obj Optional instance to populate.
* @return {module:model/InlineObject5} The populated <code>InlineObject5</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineObject5();
if (data.hasOwnProperty('additionalMetadata')) {
obj['additionalMetadata'] = ApiClient.convertToType(data['additionalMetadata'], 'String');
}
if (data.hasOwnProperty('requiredFile')) {
obj['requiredFile'] = ApiClient.convertToType(data['requiredFile'], File);
}
}
return obj;
}
}
/**
* Additional data to pass to server
* @member {String} additionalMetadata
*/
InlineObject5.prototype['additionalMetadata'] = undefined;
/**
* file to upload
* @member {File} requiredFile
*/
InlineObject5.prototype['requiredFile'] = undefined;
export default InlineObject5;

View File

@@ -0,0 +1,72 @@
/**
* 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 Foo from './Foo';
/**
* The InlineResponseDefault model module.
* @module model/InlineResponseDefault
* @version 1.0.0
*/
class InlineResponseDefault {
/**
* Constructs a new <code>InlineResponseDefault</code>.
* @alias module:model/InlineResponseDefault
*/
constructor() {
InlineResponseDefault.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>InlineResponseDefault</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/InlineResponseDefault} obj Optional instance to populate.
* @return {module:model/InlineResponseDefault} The populated <code>InlineResponseDefault</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new InlineResponseDefault();
if (data.hasOwnProperty('string')) {
obj['string'] = Foo.constructFromObject(data['string']);
}
}
return obj;
}
}
/**
* @member {module:model/Foo} string
*/
InlineResponseDefault.prototype['string'] = undefined;
export default InlineResponseDefault;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The List model module.
* @module model/List
* @version 1.0.0
*/
class List {
/**
* Constructs a new <code>List</code>.
* @alias module:model/List
*/
constructor() {
List.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>List</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/List} obj Optional instance to populate.
* @return {module:model/List} The populated <code>List</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new List();
if (data.hasOwnProperty('123-list')) {
obj['123-list'] = ApiClient.convertToType(data['123-list'], 'String');
}
}
return obj;
}
}
/**
* @member {String} 123-list
*/
List.prototype['123-list'] = undefined;
export default List;

View File

@@ -0,0 +1,116 @@
/**
* 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';
/**
* The MapTest model module.
* @module model/MapTest
* @version 1.0.0
*/
class MapTest {
/**
* Constructs a new <code>MapTest</code>.
* @alias module:model/MapTest
*/
constructor() {
MapTest.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>MapTest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/MapTest} obj Optional instance to populate.
* @return {module:model/MapTest} The populated <code>MapTest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new MapTest();
if (data.hasOwnProperty('map_map_of_string')) {
obj['map_map_of_string'] = ApiClient.convertToType(data['map_map_of_string'], {'String': {'String': 'String'}});
}
if (data.hasOwnProperty('map_of_enum_string')) {
obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
}
if (data.hasOwnProperty('direct_map')) {
obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
}
if (data.hasOwnProperty('indirect_map')) {
obj['indirect_map'] = ApiClient.convertToType(data['indirect_map'], {'String': 'Boolean'});
}
}
return obj;
}
}
/**
* @member {Object.<String, Object.<String, String>>} map_map_of_string
*/
MapTest.prototype['map_map_of_string'] = undefined;
/**
* @member {Object.<String, module:model/MapTest.InnerEnum>} map_of_enum_string
*/
MapTest.prototype['map_of_enum_string'] = undefined;
/**
* @member {Object.<String, Boolean>} direct_map
*/
MapTest.prototype['direct_map'] = undefined;
/**
* @member {Object.<String, Boolean>} indirect_map
*/
MapTest.prototype['indirect_map'] = undefined;
/**
* Allowed values for the <code>inner</code> property.
* @enum {String}
* @readonly
*/
MapTest['InnerEnum'] = {
/**
* value: "UPPER"
* @const
*/
"UPPER": "UPPER",
/**
* value: "lower"
* @const
*/
"lower": "lower"
};
export default MapTest;

View File

@@ -0,0 +1,88 @@
/**
* 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 Animal from './Animal';
/**
* The MixedPropertiesAndAdditionalPropertiesClass model module.
* @module model/MixedPropertiesAndAdditionalPropertiesClass
* @version 1.0.0
*/
class MixedPropertiesAndAdditionalPropertiesClass {
/**
* Constructs a new <code>MixedPropertiesAndAdditionalPropertiesClass</code>.
* @alias module:model/MixedPropertiesAndAdditionalPropertiesClass
*/
constructor() {
MixedPropertiesAndAdditionalPropertiesClass.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>MixedPropertiesAndAdditionalPropertiesClass</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/MixedPropertiesAndAdditionalPropertiesClass} obj Optional instance to populate.
* @return {module:model/MixedPropertiesAndAdditionalPropertiesClass} The populated <code>MixedPropertiesAndAdditionalPropertiesClass</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new MixedPropertiesAndAdditionalPropertiesClass();
if (data.hasOwnProperty('uuid')) {
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
}
if (data.hasOwnProperty('dateTime')) {
obj['dateTime'] = ApiClient.convertToType(data['dateTime'], 'Date');
}
if (data.hasOwnProperty('map')) {
obj['map'] = ApiClient.convertToType(data['map'], {'String': Animal});
}
}
return obj;
}
}
/**
* @member {String} uuid
*/
MixedPropertiesAndAdditionalPropertiesClass.prototype['uuid'] = undefined;
/**
* @member {Date} dateTime
*/
MixedPropertiesAndAdditionalPropertiesClass.prototype['dateTime'] = undefined;
/**
* @member {Object.<String, module:model/Animal>} map
*/
MixedPropertiesAndAdditionalPropertiesClass.prototype['map'] = undefined;
export default MixedPropertiesAndAdditionalPropertiesClass;

View File

@@ -0,0 +1,80 @@
/**
* 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';
/**
* The Model200Response model module.
* @module model/Model200Response
* @version 1.0.0
*/
class Model200Response {
/**
* Constructs a new <code>Model200Response</code>.
* Model for testing model name starting with number
* @alias module:model/Model200Response
*/
constructor() {
Model200Response.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Model200Response</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Model200Response} obj Optional instance to populate.
* @return {module:model/Model200Response} The populated <code>Model200Response</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Model200Response();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'Number');
}
if (data.hasOwnProperty('class')) {
obj['class'] = ApiClient.convertToType(data['class'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} name
*/
Model200Response.prototype['name'] = undefined;
/**
* @member {String} class
*/
Model200Response.prototype['class'] = undefined;
export default Model200Response;

View File

@@ -0,0 +1,72 @@
/**
* 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';
/**
* The ModelReturn model module.
* @module model/ModelReturn
* @version 1.0.0
*/
class ModelReturn {
/**
* Constructs a new <code>ModelReturn</code>.
* Model for testing reserved words
* @alias module:model/ModelReturn
*/
constructor() {
ModelReturn.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ModelReturn</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ModelReturn} obj Optional instance to populate.
* @return {module:model/ModelReturn} The populated <code>ModelReturn</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ModelReturn();
if (data.hasOwnProperty('return')) {
obj['return'] = ApiClient.convertToType(data['return'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} return
*/
ModelReturn.prototype['return'] = undefined;
export default ModelReturn;

View File

@@ -0,0 +1,98 @@
/**
* 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';
/**
* The Name model module.
* @module model/Name
* @version 1.0.0
*/
class Name {
/**
* Constructs a new <code>Name</code>.
* Model for testing model name same as property name
* @alias module:model/Name
* @param name {Number}
*/
constructor(name) {
Name.initialize(this, name);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name) {
obj['name'] = name;
}
/**
* Constructs a <code>Name</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Name} obj Optional instance to populate.
* @return {module:model/Name} The populated <code>Name</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Name();
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'Number');
}
if (data.hasOwnProperty('snake_case')) {
obj['snake_case'] = ApiClient.convertToType(data['snake_case'], 'Number');
}
if (data.hasOwnProperty('property')) {
obj['property'] = ApiClient.convertToType(data['property'], 'String');
}
if (data.hasOwnProperty('123Number')) {
obj['123Number'] = ApiClient.convertToType(data['123Number'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} name
*/
Name.prototype['name'] = undefined;
/**
* @member {Number} snake_case
*/
Name.prototype['snake_case'] = undefined;
/**
* @member {String} property
*/
Name.prototype['property'] = undefined;
/**
* @member {Number} 123Number
*/
Name.prototype['123Number'] = undefined;
export default Name;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The NumberOnly model module.
* @module model/NumberOnly
* @version 1.0.0
*/
class NumberOnly {
/**
* Constructs a new <code>NumberOnly</code>.
* @alias module:model/NumberOnly
*/
constructor() {
NumberOnly.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>NumberOnly</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/NumberOnly} obj Optional instance to populate.
* @return {module:model/NumberOnly} The populated <code>NumberOnly</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NumberOnly();
if (data.hasOwnProperty('JustNumber')) {
obj['JustNumber'] = ApiClient.convertToType(data['JustNumber'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} JustNumber
*/
NumberOnly.prototype['JustNumber'] = undefined;
export default NumberOnly;

View File

@@ -0,0 +1,140 @@
/**
* 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';
/**
* The Order model module.
* @module model/Order
* @version 1.0.0
*/
class Order {
/**
* Constructs a new <code>Order</code>.
* @alias module:model/Order
*/
constructor() {
Order.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Order</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Order} obj Optional instance to populate.
* @return {module:model/Order} The populated <code>Order</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Order();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('petId')) {
obj['petId'] = ApiClient.convertToType(data['petId'], 'Number');
}
if (data.hasOwnProperty('quantity')) {
obj['quantity'] = ApiClient.convertToType(data['quantity'], 'Number');
}
if (data.hasOwnProperty('shipDate')) {
obj['shipDate'] = ApiClient.convertToType(data['shipDate'], 'Date');
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
if (data.hasOwnProperty('complete')) {
obj['complete'] = ApiClient.convertToType(data['complete'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Number} id
*/
Order.prototype['id'] = undefined;
/**
* @member {Number} petId
*/
Order.prototype['petId'] = undefined;
/**
* @member {Number} quantity
*/
Order.prototype['quantity'] = undefined;
/**
* @member {Date} shipDate
*/
Order.prototype['shipDate'] = undefined;
/**
* Order Status
* @member {module:model/Order.StatusEnum} status
*/
Order.prototype['status'] = undefined;
/**
* @member {Boolean} complete
* @default false
*/
Order.prototype['complete'] = false;
/**
* Allowed values for the <code>status</code> property.
* @enum {String}
* @readonly
*/
Order['StatusEnum'] = {
/**
* value: "placed"
* @const
*/
"placed": "placed",
/**
* value: "approved"
* @const
*/
"approved": "approved",
/**
* value: "delivered"
* @const
*/
"delivered": "delivered"
};
export default Order;

View File

@@ -0,0 +1,87 @@
/**
* 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';
/**
* The OuterComposite model module.
* @module model/OuterComposite
* @version 1.0.0
*/
class OuterComposite {
/**
* Constructs a new <code>OuterComposite</code>.
* @alias module:model/OuterComposite
*/
constructor() {
OuterComposite.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>OuterComposite</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/OuterComposite} obj Optional instance to populate.
* @return {module:model/OuterComposite} The populated <code>OuterComposite</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new OuterComposite();
if (data.hasOwnProperty('my_number')) {
obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
}
if (data.hasOwnProperty('my_string')) {
obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
}
if (data.hasOwnProperty('my_boolean')) {
obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
}
}
return obj;
}
}
/**
* @member {Number} my_number
*/
OuterComposite.prototype['my_number'] = undefined;
/**
* @member {String} my_string
*/
OuterComposite.prototype['my_string'] = undefined;
/**
* @member {Boolean} my_boolean
*/
OuterComposite.prototype['my_boolean'] = undefined;
export default OuterComposite;

View File

@@ -0,0 +1,53 @@
/**
* 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';
/**
* Enum class OuterEnum.
* @enum {}
* @readonly
*/
export default class OuterEnum {
/**
* value: "placed"
* @const
*/
"placed" = "placed";
/**
* value: "approved"
* @const
*/
"approved" = "approved";
/**
* value: "delivered"
* @const
*/
"delivered" = "delivered";
/**
* Returns a <code>OuterEnum</code> enum value from a Javascript object name.
* @param {Object} data The plain JavaScript object containing the name of the enum value.
* @return {module:model/OuterEnum} The enum <code>OuterEnum</code> value.
*/
static constructFromObject(object) {
return object;
}
}

View File

@@ -0,0 +1,145 @@
/**
* 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 Category from './Category';
import Tag from './Tag';
/**
* The Pet model module.
* @module model/Pet
* @version 1.0.0
*/
class Pet {
/**
* Constructs a new <code>Pet</code>.
* @alias module:model/Pet
* @param name {String}
* @param photoUrls {Array.<String>}
*/
constructor(name, photoUrls) {
Pet.initialize(this, name, photoUrls);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, name, photoUrls) {
obj['name'] = name;
obj['photoUrls'] = photoUrls;
}
/**
* Constructs a <code>Pet</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Pet} obj Optional instance to populate.
* @return {module:model/Pet} The populated <code>Pet</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Pet();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('category')) {
obj['category'] = Category.constructFromObject(data['category']);
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
if (data.hasOwnProperty('photoUrls')) {
obj['photoUrls'] = ApiClient.convertToType(data['photoUrls'], ['String']);
}
if (data.hasOwnProperty('tags')) {
obj['tags'] = ApiClient.convertToType(data['tags'], [Tag]);
}
if (data.hasOwnProperty('status')) {
obj['status'] = ApiClient.convertToType(data['status'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} id
*/
Pet.prototype['id'] = undefined;
/**
* @member {module:model/Category} category
*/
Pet.prototype['category'] = undefined;
/**
* @member {String} name
*/
Pet.prototype['name'] = undefined;
/**
* @member {Array.<String>} photoUrls
*/
Pet.prototype['photoUrls'] = undefined;
/**
* @member {Array.<module:model/Tag>} tags
*/
Pet.prototype['tags'] = undefined;
/**
* pet status in the store
* @member {module:model/Pet.StatusEnum} status
*/
Pet.prototype['status'] = undefined;
/**
* Allowed values for the <code>status</code> property.
* @enum {String}
* @readonly
*/
Pet['StatusEnum'] = {
/**
* value: "available"
* @const
*/
"available": "available",
/**
* value: "pending"
* @const
*/
"pending": "pending",
/**
* value: "sold"
* @const
*/
"sold": "sold"
};
export default Pet;

View File

@@ -0,0 +1,79 @@
/**
* 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';
/**
* The ReadOnlyFirst model module.
* @module model/ReadOnlyFirst
* @version 1.0.0
*/
class ReadOnlyFirst {
/**
* Constructs a new <code>ReadOnlyFirst</code>.
* @alias module:model/ReadOnlyFirst
*/
constructor() {
ReadOnlyFirst.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>ReadOnlyFirst</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/ReadOnlyFirst} obj Optional instance to populate.
* @return {module:model/ReadOnlyFirst} The populated <code>ReadOnlyFirst</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new ReadOnlyFirst();
if (data.hasOwnProperty('bar')) {
obj['bar'] = ApiClient.convertToType(data['bar'], 'String');
}
if (data.hasOwnProperty('baz')) {
obj['baz'] = ApiClient.convertToType(data['baz'], 'String');
}
}
return obj;
}
}
/**
* @member {String} bar
*/
ReadOnlyFirst.prototype['bar'] = undefined;
/**
* @member {String} baz
*/
ReadOnlyFirst.prototype['baz'] = undefined;
export default ReadOnlyFirst;

View File

@@ -0,0 +1,71 @@
/**
* 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';
/**
* The SpecialModelName model module.
* @module model/SpecialModelName
* @version 1.0.0
*/
class SpecialModelName {
/**
* Constructs a new <code>SpecialModelName</code>.
* @alias module:model/SpecialModelName
*/
constructor() {
SpecialModelName.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>SpecialModelName</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/SpecialModelName} obj Optional instance to populate.
* @return {module:model/SpecialModelName} The populated <code>SpecialModelName</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new SpecialModelName();
if (data.hasOwnProperty('$special[property.name]')) {
obj['$special[property.name]'] = ApiClient.convertToType(data['$special[property.name]'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} $special[property.name]
*/
SpecialModelName.prototype['$special[property.name]'] = undefined;
export default SpecialModelName;

View File

@@ -0,0 +1,67 @@
/**
* 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';
/**
* The StringBooleanMap model module.
* @module model/StringBooleanMap
* @version 1.0.0
*/
class StringBooleanMap {
/**
* Constructs a new <code>StringBooleanMap</code>.
* @alias module:model/StringBooleanMap
* @extends Object
*/
constructor() {
StringBooleanMap.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>StringBooleanMap</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/StringBooleanMap} obj Optional instance to populate.
* @return {module:model/StringBooleanMap} The populated <code>StringBooleanMap</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new StringBooleanMap();
ApiClient.constructFromObject(data, obj, 'Boolean');
}
return obj;
}
}
export default StringBooleanMap;

View File

@@ -0,0 +1,79 @@
/**
* 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';
/**
* The Tag model module.
* @module model/Tag
* @version 1.0.0
*/
class Tag {
/**
* Constructs a new <code>Tag</code>.
* @alias module:model/Tag
*/
constructor() {
Tag.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>Tag</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/Tag} obj Optional instance to populate.
* @return {module:model/Tag} The populated <code>Tag</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new Tag();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('name')) {
obj['name'] = ApiClient.convertToType(data['name'], 'String');
}
}
return obj;
}
}
/**
* @member {Number} id
*/
Tag.prototype['id'] = undefined;
/**
* @member {String} name
*/
Tag.prototype['name'] = undefined;
export default Tag;

View File

@@ -0,0 +1,115 @@
/**
* 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';
/**
* The TypeHolderDefault model module.
* @module model/TypeHolderDefault
* @version 1.0.0
*/
class TypeHolderDefault {
/**
* Constructs a new <code>TypeHolderDefault</code>.
* @alias module:model/TypeHolderDefault
* @param stringItem {String}
* @param numberItem {Number}
* @param integerItem {Number}
* @param boolItem {Boolean}
* @param arrayItem {Array.<Number>}
*/
constructor(stringItem, numberItem, integerItem, boolItem, arrayItem) {
TypeHolderDefault.initialize(this, stringItem, numberItem, integerItem, boolItem, arrayItem);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, stringItem, numberItem, integerItem, boolItem, arrayItem) {
obj['string_item'] = stringItem;
obj['number_item'] = numberItem;
obj['integer_item'] = integerItem;
obj['bool_item'] = boolItem;
obj['array_item'] = arrayItem;
}
/**
* Constructs a <code>TypeHolderDefault</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/TypeHolderDefault} obj Optional instance to populate.
* @return {module:model/TypeHolderDefault} The populated <code>TypeHolderDefault</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new TypeHolderDefault();
if (data.hasOwnProperty('string_item')) {
obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String');
}
if (data.hasOwnProperty('number_item')) {
obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number');
}
if (data.hasOwnProperty('integer_item')) {
obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number');
}
if (data.hasOwnProperty('bool_item')) {
obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean');
}
if (data.hasOwnProperty('array_item')) {
obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']);
}
}
return obj;
}
}
/**
* @member {String} string_item
* @default 'what'
*/
TypeHolderDefault.prototype['string_item'] = 'what';
/**
* @member {Number} number_item
*/
TypeHolderDefault.prototype['number_item'] = undefined;
/**
* @member {Number} integer_item
*/
TypeHolderDefault.prototype['integer_item'] = undefined;
/**
* @member {Boolean} bool_item
* @default true
*/
TypeHolderDefault.prototype['bool_item'] = true;
/**
* @member {Array.<Number>} array_item
*/
TypeHolderDefault.prototype['array_item'] = undefined;
export default TypeHolderDefault;

View File

@@ -0,0 +1,113 @@
/**
* 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';
/**
* The TypeHolderExample model module.
* @module model/TypeHolderExample
* @version 1.0.0
*/
class TypeHolderExample {
/**
* Constructs a new <code>TypeHolderExample</code>.
* @alias module:model/TypeHolderExample
* @param stringItem {String}
* @param numberItem {Number}
* @param integerItem {Number}
* @param boolItem {Boolean}
* @param arrayItem {Array.<Number>}
*/
constructor(stringItem, numberItem, integerItem, boolItem, arrayItem) {
TypeHolderExample.initialize(this, stringItem, numberItem, integerItem, boolItem, arrayItem);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj, stringItem, numberItem, integerItem, boolItem, arrayItem) {
obj['string_item'] = stringItem;
obj['number_item'] = numberItem;
obj['integer_item'] = integerItem;
obj['bool_item'] = boolItem;
obj['array_item'] = arrayItem;
}
/**
* Constructs a <code>TypeHolderExample</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/TypeHolderExample} obj Optional instance to populate.
* @return {module:model/TypeHolderExample} The populated <code>TypeHolderExample</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new TypeHolderExample();
if (data.hasOwnProperty('string_item')) {
obj['string_item'] = ApiClient.convertToType(data['string_item'], 'String');
}
if (data.hasOwnProperty('number_item')) {
obj['number_item'] = ApiClient.convertToType(data['number_item'], 'Number');
}
if (data.hasOwnProperty('integer_item')) {
obj['integer_item'] = ApiClient.convertToType(data['integer_item'], 'Number');
}
if (data.hasOwnProperty('bool_item')) {
obj['bool_item'] = ApiClient.convertToType(data['bool_item'], 'Boolean');
}
if (data.hasOwnProperty('array_item')) {
obj['array_item'] = ApiClient.convertToType(data['array_item'], ['Number']);
}
}
return obj;
}
}
/**
* @member {String} string_item
*/
TypeHolderExample.prototype['string_item'] = undefined;
/**
* @member {Number} number_item
*/
TypeHolderExample.prototype['number_item'] = undefined;
/**
* @member {Number} integer_item
*/
TypeHolderExample.prototype['integer_item'] = undefined;
/**
* @member {Boolean} bool_item
*/
TypeHolderExample.prototype['bool_item'] = undefined;
/**
* @member {Array.<Number>} array_item
*/
TypeHolderExample.prototype['array_item'] = undefined;
export default TypeHolderExample;

View File

@@ -0,0 +1,128 @@
/**
* 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';
/**
* The User model module.
* @module model/User
* @version 1.0.0
*/
class User {
/**
* Constructs a new <code>User</code>.
* @alias module:model/User
*/
constructor() {
User.initialize(this);
}
/**
* Initializes the fields of this object.
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
* Only for internal use.
*/
static initialize(obj) {
}
/**
* Constructs a <code>User</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/User} obj Optional instance to populate.
* @return {module:model/User} The populated <code>User</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new User();
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
}
if (data.hasOwnProperty('username')) {
obj['username'] = ApiClient.convertToType(data['username'], 'String');
}
if (data.hasOwnProperty('firstName')) {
obj['firstName'] = ApiClient.convertToType(data['firstName'], 'String');
}
if (data.hasOwnProperty('lastName')) {
obj['lastName'] = ApiClient.convertToType(data['lastName'], 'String');
}
if (data.hasOwnProperty('email')) {
obj['email'] = ApiClient.convertToType(data['email'], 'String');
}
if (data.hasOwnProperty('password')) {
obj['password'] = ApiClient.convertToType(data['password'], 'String');
}
if (data.hasOwnProperty('phone')) {
obj['phone'] = ApiClient.convertToType(data['phone'], 'String');
}
if (data.hasOwnProperty('userStatus')) {
obj['userStatus'] = ApiClient.convertToType(data['userStatus'], 'Number');
}
}
return obj;
}
}
/**
* @member {Number} id
*/
User.prototype['id'] = undefined;
/**
* @member {String} username
*/
User.prototype['username'] = undefined;
/**
* @member {String} firstName
*/
User.prototype['firstName'] = undefined;
/**
* @member {String} lastName
*/
User.prototype['lastName'] = undefined;
/**
* @member {String} email
*/
User.prototype['email'] = undefined;
/**
* @member {String} password
*/
User.prototype['password'] = undefined;
/**
* @member {String} phone
*/
User.prototype['phone'] = undefined;
/**
* User Status
* @member {Number} userStatus
*/
User.prototype['userStatus'] = undefined;
export default User;

View File

@@ -0,0 +1,63 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.AnotherFakeApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('AnotherFakeApi', function() {
describe('testSpecialTags', function() {
it('should call testSpecialTags successfully', function(done) {
//uncomment below and update the code to test testSpecialTags
//instance.testSpecialTags(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View File

@@ -0,0 +1,123 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.FakeApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('FakeApi', function() {
describe('fakeOuterBooleanSerialize', function() {
it('should call fakeOuterBooleanSerialize successfully', function(done) {
//uncomment below and update the code to test fakeOuterBooleanSerialize
//instance.fakeOuterBooleanSerialize(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('fakeOuterCompositeSerialize', function() {
it('should call fakeOuterCompositeSerialize successfully', function(done) {
//uncomment below and update the code to test fakeOuterCompositeSerialize
//instance.fakeOuterCompositeSerialize(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('fakeOuterNumberSerialize', function() {
it('should call fakeOuterNumberSerialize successfully', function(done) {
//uncomment below and update the code to test fakeOuterNumberSerialize
//instance.fakeOuterNumberSerialize(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('fakeOuterStringSerialize', function() {
it('should call fakeOuterStringSerialize successfully', function(done) {
//uncomment below and update the code to test fakeOuterStringSerialize
//instance.fakeOuterStringSerialize(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('testClientModel', function() {
it('should call testClientModel successfully', function(done) {
//uncomment below and update the code to test testClientModel
//instance.testClientModel(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('testEndpointParameters', function() {
it('should call testEndpointParameters successfully', function(done) {
//uncomment below and update the code to test testEndpointParameters
//instance.testEndpointParameters(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('testEnumParameters', function() {
it('should call testEnumParameters successfully', function(done) {
//uncomment below and update the code to test testEnumParameters
//instance.testEnumParameters(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View File

@@ -0,0 +1,63 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.FakeClassnameTags123Api();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('FakeClassnameTags123Api', function() {
describe('testClassname', function() {
it('should call testClassname successfully', function(done) {
//uncomment below and update the code to test testClassname
//instance.testClassname(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View File

@@ -0,0 +1,133 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.PetApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('PetApi', function() {
describe('addPet', function() {
it('should call addPet successfully', function(done) {
//uncomment below and update the code to test addPet
//instance.addPet(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deletePet', function() {
it('should call deletePet successfully', function(done) {
//uncomment below and update the code to test deletePet
//instance.deletePet(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('findPetsByStatus', function() {
it('should call findPetsByStatus successfully', function(done) {
//uncomment below and update the code to test findPetsByStatus
//instance.findPetsByStatus(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('findPetsByTags', function() {
it('should call findPetsByTags successfully', function(done) {
//uncomment below and update the code to test findPetsByTags
//instance.findPetsByTags(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getPetById', function() {
it('should call getPetById successfully', function(done) {
//uncomment below and update the code to test getPetById
//instance.getPetById(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updatePet', function() {
it('should call updatePet successfully', function(done) {
//uncomment below and update the code to test updatePet
//instance.updatePet(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updatePetWithForm', function() {
it('should call updatePetWithForm successfully', function(done) {
//uncomment below and update the code to test updatePetWithForm
//instance.updatePetWithForm(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('uploadFile', function() {
it('should call uploadFile successfully', function(done) {
//uncomment below and update the code to test uploadFile
//instance.uploadFile(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View File

@@ -0,0 +1,93 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.StoreApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('StoreApi', function() {
describe('deleteOrder', function() {
it('should call deleteOrder successfully', function(done) {
//uncomment below and update the code to test deleteOrder
//instance.deleteOrder(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getInventory', function() {
it('should call getInventory successfully', function(done) {
//uncomment below and update the code to test getInventory
//instance.getInventory(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getOrderById', function() {
it('should call getOrderById successfully', function(done) {
//uncomment below and update the code to test getOrderById
//instance.getOrderById(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('placeOrder', function() {
it('should call placeOrder successfully', function(done) {
//uncomment below and update the code to test placeOrder
//instance.placeOrder(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));

View File

@@ -0,0 +1,133 @@
/**
* Swagger 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
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD.
define(['expect.js', '../../src/index'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
factory(require('expect.js'), require('../../src/index'));
} else {
// Browser globals (root is window)
factory(root.expect, root.SwaggerPetstore);
}
}(this, function(expect, SwaggerPetstore) {
'use strict';
var instance;
beforeEach(function() {
instance = new SwaggerPetstore.UserApi();
});
var getProperty = function(object, getter, property) {
// Use getter method if present; otherwise, get the property directly.
if (typeof object[getter] === 'function')
return object[getter]();
else
return object[property];
}
var setProperty = function(object, setter, property, value) {
// Use setter method if present; otherwise, set the property directly.
if (typeof object[setter] === 'function')
object[setter](value);
else
object[property] = value;
}
describe('UserApi', function() {
describe('createUser', function() {
it('should call createUser successfully', function(done) {
//uncomment below and update the code to test createUser
//instance.createUser(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('createUsersWithArrayInput', function() {
it('should call createUsersWithArrayInput successfully', function(done) {
//uncomment below and update the code to test createUsersWithArrayInput
//instance.createUsersWithArrayInput(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('createUsersWithListInput', function() {
it('should call createUsersWithListInput successfully', function(done) {
//uncomment below and update the code to test createUsersWithListInput
//instance.createUsersWithListInput(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('deleteUser', function() {
it('should call deleteUser successfully', function(done) {
//uncomment below and update the code to test deleteUser
//instance.deleteUser(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('getUserByName', function() {
it('should call getUserByName successfully', function(done) {
//uncomment below and update the code to test getUserByName
//instance.getUserByName(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('loginUser', function() {
it('should call loginUser successfully', function(done) {
//uncomment below and update the code to test loginUser
//instance.loginUser(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('logoutUser', function() {
it('should call logoutUser successfully', function(done) {
//uncomment below and update the code to test logoutUser
//instance.logoutUser(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
describe('updateUser', function() {
it('should call updateUser successfully', function(done) {
//uncomment below and update the code to test updateUser
//instance.updateUser(function(error) {
// if (error) throw error;
//expect().to.be();
//});
done();
});
});
});
}));