forked from loafle/openapi-generator-original
Combine javascript and javascript-apollo generators (#13270)
* Combine javascript and javascript-apollo generator functionality * Combine javascript and javascript-apollo templates * update configs * deprecate javascript-apollo generator * bonus magic string deletion ✨ * update samples * update generator docs * fix: include .babelrc in apollo generation * update samples * update samples * rename javascript-apollo to javascript-apollo-deprecated * fix javascript apollo library template Apollo library now uses the partial_model_generic template file from the ES6 library, as it includes many fixes and improvements (including handling models with ill-named attributes) * update samples * Create javascript-apollo-deprecated.md * Updated javascript generator template's gitignore Updates .gitignore with that from https://github.com/github/gitignore/blob/main/Node.gitignore Main reason for the update is to ignore the 'dist' folder with compiled files by default. * javascript generator: merge api_test template files The only difference is that Apollo is not designed for browser, so having a "if(browser)" check is useless, but doesn't hurt. * update docs * cleanup * avoid possible config clash * update javascript-apollo sample * update javascript-es6 sample I kept the pom.xml from before * update javascript-promise-es6 sample kept pom.xml * update samples
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
|
||||
import RESTDataSource from 'apollo-datasource-rest';
|
||||
import { RESTDataSource } from 'apollo-datasource-rest';
|
||||
|
||||
/**
|
||||
* @module ApiClient
|
||||
@@ -26,15 +26,25 @@ import RESTDataSource from 'apollo-datasource-rest';
|
||||
* @class
|
||||
*/
|
||||
export default class ApiClient extends RESTDataSource {
|
||||
constructor() {
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super()
|
||||
|
||||
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default http://petstore.swagger.io:80/v2
|
||||
*/
|
||||
this.baseURL = baseURL.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'},
|
||||
'bearer_test': {type: 'bearer'}, // JWT
|
||||
'http_basic_test': {type: 'basic'},
|
||||
'petstore_auth': {type: 'oauth2'}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +61,7 @@ export default class ApiClient extends RESTDataSource {
|
||||
}
|
||||
|
||||
parametrizePath(path, pathParams) {
|
||||
return url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
|
||||
return path.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
|
||||
var value;
|
||||
if (pathParams.hasOwnProperty(key)) {
|
||||
value = this.paramToString(pathParams[key]);
|
||||
@@ -174,7 +184,7 @@ export default class ApiClient extends RESTDataSource {
|
||||
|
||||
async callApi(path, httpMethod, pathParams,
|
||||
queryParams, headerParams, formParams, bodyParam, authNames,
|
||||
returnType) {
|
||||
contentTypes, accepts, returnType, requestInit) {
|
||||
|
||||
var parameterizedPath = this.parametrizePath(path, pathParams);
|
||||
var fetchOptions = {
|
||||
@@ -185,7 +195,7 @@ export default class ApiClient extends RESTDataSource {
|
||||
this.applyAuthOptions(fetchOptions, authNames);
|
||||
|
||||
var body = null;
|
||||
|
||||
|
||||
if (bodyParam !== null && bodyParam !== undefined) {
|
||||
body = bodyParam;
|
||||
} else if (formParams !== null && formParams !== undefined) {
|
||||
@@ -201,9 +211,9 @@ export default class ApiClient extends RESTDataSource {
|
||||
var httpMethodFn = httpMethod.toLowerCase();
|
||||
|
||||
if (httpMethodFn == 'get' || httpMethodFn == 'delete') {
|
||||
response = await this[httpMethodFn](parameterizedPath, fetchOptions);
|
||||
response = await this[httpMethodFn](parameterizedPath, [], requestInit);
|
||||
} else {
|
||||
response = await this[httpMethodFn](parameterizedPath, body, fetchOptions)
|
||||
response = await this[httpMethodFn](parameterizedPath, body, requestInit)
|
||||
}
|
||||
|
||||
var convertedResponse = ApiClient.convertToType(response, returnType);
|
||||
@@ -232,7 +242,7 @@ export default class ApiClient extends RESTDataSource {
|
||||
case 'Blob':
|
||||
return data;
|
||||
default:
|
||||
if (type === Object) {
|
||||
if (typeof type === "object") {
|
||||
// generic object, return directly
|
||||
return data;
|
||||
} else if (typeof type.constructFromObject === 'function') {
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
|
||||
/**
|
||||
* AnotherFake service.
|
||||
* @module api/AnotherFakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class AnotherFakeApi extends ApiClient {
|
||||
|
||||
/**
|
||||
* Constructs a new AnotherFakeApi.
|
||||
* @alias module:api/AnotherFakeApi
|
||||
* @class
|
||||
*/
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Client>}
|
||||
*/
|
||||
async call123testSpecialTags(client, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.callApi(
|
||||
'/another-fake/dummy', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import FooGetDefaultResponse from '../model/FooGetDefaultResponse';
|
||||
|
||||
/**
|
||||
* Default service.
|
||||
* @module api/DefaultApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class DefaultApi extends ApiClient {
|
||||
|
||||
/**
|
||||
* Constructs a new DefaultApi.
|
||||
* @alias module:api/DefaultApi
|
||||
* @class
|
||||
*/
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/FooGetDefaultResponse>}
|
||||
*/
|
||||
async fooGet(requestInit) {
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = FooGetDefaultResponse;
|
||||
|
||||
return this.callApi(
|
||||
'/foo', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
762
samples/client/petstore/javascript-apollo/src/api/FakeApi.js
Normal file
762
samples/client/petstore/javascript-apollo/src/api/FakeApi.js
Normal file
@@ -0,0 +1,762 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import EnumClass from '../model/EnumClass';
|
||||
import FileSchemaTestClass from '../model/FileSchemaTestClass';
|
||||
import HealthCheckResult from '../model/HealthCheckResult';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import OuterObjectWithEnumProperty from '../model/OuterObjectWithEnumProperty';
|
||||
import Pet from '../model/Pet';
|
||||
import User from '../model/User';
|
||||
|
||||
/**
|
||||
* Fake service.
|
||||
* @module api/FakeApi
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class FakeApi extends ApiClient {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeApi.
|
||||
* @alias module:api/FakeApi
|
||||
* @class
|
||||
*/
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Health check endpoint
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/HealthCheckResult>}
|
||||
*/
|
||||
async fakeHealthGet(requestInit) {
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = HealthCheckResult;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/health', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test http signature authentication
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.query1 query parameter
|
||||
* @param {String} opts.header1 header parameter
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async fakeHttpSignatureTest(pet, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
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 fakeHttpSignatureTest");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'query_1': opts['query1']
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
'header_1': opts['header1']
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['http_signature_test'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/http-signature-test', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Boolean} opts.body Input boolean as post body
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<Boolean>}
|
||||
*/
|
||||
async fakeOuterBooleanSerialize(opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'Boolean';
|
||||
|
||||
return this.callApi(
|
||||
'/fake/outer/boolean', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/OuterComposite>}
|
||||
*/
|
||||
async fakeOuterCompositeSerialize(opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['outerComposite'];
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = OuterComposite;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/outer/composite', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Number} opts.body Input number as post body
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<Number>}
|
||||
*/
|
||||
async fakeOuterNumberSerialize(opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'Number';
|
||||
|
||||
return this.callApi(
|
||||
'/fake/outer/number', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.body Input string as post body
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<String>}
|
||||
*/
|
||||
async fakeOuterStringSerialize(opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = 'String';
|
||||
|
||||
return this.callApi(
|
||||
'/fake/outer/string', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test serialization of enum (int) properties with examples
|
||||
* @param {module:model/OuterObjectWithEnumProperty} outerObjectWithEnumProperty Input enum (int) as post body
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/OuterObjectWithEnumProperty>}
|
||||
*/
|
||||
async fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, requestInit) {
|
||||
let postBody = outerObjectWithEnumProperty;
|
||||
// verify the required parameter 'outerObjectWithEnumProperty' is set
|
||||
if (outerObjectWithEnumProperty === undefined || outerObjectWithEnumProperty === null) {
|
||||
throw new Error("Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = OuterObjectWithEnumProperty;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/property/enum-int', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body has to be a binary file.
|
||||
* @param {File} body image to upload
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testBodyWithBinary(body, requestInit) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testBodyWithBinary");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['image/png'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/body-with-binary', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testBodyWithFileSchema(fileSchemaTestClass, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testBodyWithQueryParams(query, user, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/body-with-query-params', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} client client model
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Client>}
|
||||
*/
|
||||
async testClientModel(client, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.callApi(
|
||||
'/fake', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, opts, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
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.callApi(
|
||||
'/fake', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 '-efg')
|
||||
* @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 '-efg')
|
||||
* @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/EnumClass>} opts.enumQueryModelArray
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array) (default to '$')
|
||||
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to '-efg')
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testEnumParameters(opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'enum_query_string_array': this.buildCollectionParam(opts['enumQueryStringArray'], 'multi'),
|
||||
'enum_query_string': opts['enumQueryString'],
|
||||
'enum_query_integer': opts['enumQueryInteger'],
|
||||
'enum_query_double': opts['enumQueryDouble'],
|
||||
'enum_query_model_array': this.buildCollectionParam(opts['enumQueryModelArray'], 'multi')
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
'enum_header_string_array': opts['enumHeaderStringArray'],
|
||||
'enum_header_string': opts['enumHeaderString']
|
||||
};
|
||||
let formParams = {
|
||||
'enum_form_string_array': this.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.callApi(
|
||||
'/fake', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, opts, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
'required_boolean_group': requiredBooleanGroup,
|
||||
'boolean_group': opts['booleanGroup']
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['bearer_test'];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testInlineAdditionalProperties(requestBody, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/inline-additionalProperties', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param {String} param field1
|
||||
* @param {String} param2 field2
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testJsonFormData(param, param2, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
'param': param,
|
||||
'param2': param2
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/jsonFormData', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test the collection format in query parameters
|
||||
* @param {Array.<String>} pipe
|
||||
* @param {Array.<String>} ioutil
|
||||
* @param {Array.<String>} http
|
||||
* @param {Array.<String>} url
|
||||
* @param {Array.<String>} context
|
||||
* @param {String} allowEmpty
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Object.<String, {String: String}>} opts.language
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
// verify the required parameter 'pipe' is set
|
||||
if (pipe === undefined || pipe === null) {
|
||||
throw new Error("Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'ioutil' is set
|
||||
if (ioutil === undefined || ioutil === null) {
|
||||
throw new Error("Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'http' is set
|
||||
if (http === undefined || http === null) {
|
||||
throw new Error("Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'url' is set
|
||||
if (url === undefined || url === null) {
|
||||
throw new Error("Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'context' is set
|
||||
if (context === undefined || context === null) {
|
||||
throw new Error("Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
// verify the required parameter 'allowEmpty' is set
|
||||
if (allowEmpty === undefined || allowEmpty === null) {
|
||||
throw new Error("Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'pipe': this.buildCollectionParam(pipe, 'pipes'),
|
||||
'ioutil': this.buildCollectionParam(ioutil, 'csv'),
|
||||
'http': this.buildCollectionParam(http, 'ssv'),
|
||||
'url': this.buildCollectionParam(url, 'csv'),
|
||||
'context': this.buildCollectionParam(context, 'multi'),
|
||||
'language': opts['language'],
|
||||
'allowEmpty': allowEmpty
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/fake/test-query-parameters', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
|
||||
/**
|
||||
* FakeClassnameTags123 service.
|
||||
* @module api/FakeClassnameTags123Api
|
||||
* @version 1.0.0
|
||||
*/
|
||||
export default class FakeClassnameTags123Api extends ApiClient {
|
||||
|
||||
/**
|
||||
* Constructs a new FakeClassnameTags123Api.
|
||||
* @alias module:api/FakeClassnameTags123Api
|
||||
* @class
|
||||
*/
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Client>}
|
||||
*/
|
||||
async testClassname(client, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = ['api_key_query'];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Client;
|
||||
|
||||
return this.callApi(
|
||||
'/fake_classname_test', 'PATCH',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -29,22 +29,24 @@ export default class PetApi extends ApiClient {
|
||||
* @alias module:api/PetApi
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
this.baseURL = null;
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
*
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async addPet(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling addPet");
|
||||
async addPet(pet, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
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 = {
|
||||
@@ -52,6 +54,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -60,22 +63,33 @@ export default class PetApi extends ApiClient {
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
let basePaths = ['http://petstore.swagger.io/v2', 'http://path-server-test.petstore.local/v2'];
|
||||
let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI
|
||||
if (typeof opts['_base_path_index'] !== 'undefined') {
|
||||
if (opts['_base_path_index'] >= basePaths.length || opts['_base_path_index'] < 0) {
|
||||
throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length);
|
||||
}
|
||||
basePath = basePaths[opts['_base_path_index']];
|
||||
}
|
||||
|
||||
|
||||
return this.callApi(
|
||||
'/pet', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param {Number} petId Pet id to delete
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.apiKey
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async deletePet(petId, opts) {
|
||||
async deletePet(petId, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -89,6 +103,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
'api_key': opts['apiKey']
|
||||
};
|
||||
let formParams = {
|
||||
@@ -102,17 +117,18 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/{petId}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param {Array.<String>} status Status values that need to be considered for filter
|
||||
* @return {Promise<Array.<Pet>>}
|
||||
* @param {Array.<module:model/String>} status Status values that need to be considered for filter
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<Array.<module:model/Pet>>}
|
||||
*/
|
||||
async findPetsByStatus(status) {
|
||||
async findPetsByStatus(status, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'status' is set
|
||||
if (status === undefined || status === null) {
|
||||
@@ -125,6 +141,7 @@ export default class PetApi extends ApiClient {
|
||||
'status': this.buildCollectionParam(status, 'csv')
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -137,7 +154,7 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/findByStatus', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
@@ -145,9 +162,10 @@ export default class PetApi extends ApiClient {
|
||||
* 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
|
||||
* @return {Promise<Array.<Pet>>}
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<Array.<module:model/Pet>>}
|
||||
*/
|
||||
async findPetsByTags(tags) {
|
||||
async findPetsByTags(tags, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags === undefined || tags === null) {
|
||||
@@ -160,6 +178,7 @@ export default class PetApi extends ApiClient {
|
||||
'tags': this.buildCollectionParam(tags, 'csv')
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -172,7 +191,7 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/findByTags', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
@@ -180,9 +199,10 @@ export default class PetApi extends ApiClient {
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param {Number} petId ID of pet to return
|
||||
* @return {Promise<Pet>}
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Pet>}
|
||||
*/
|
||||
async getPetById(petId) {
|
||||
async getPetById(petId, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
@@ -195,6 +215,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -207,20 +228,23 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/{petId}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
*
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async updatePet(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling updatePet");
|
||||
async updatePet(pet, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
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 = {
|
||||
@@ -228,6 +252,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -236,23 +261,34 @@ export default class PetApi extends ApiClient {
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
let basePaths = ['http://petstore.swagger.io/v2', 'http://path-server-test.petstore.local/v2'];
|
||||
let basePath = basePaths[0]; // by default use the first one in "servers" defined in OpenAPI
|
||||
if (typeof opts['_base_path_index'] !== 'undefined') {
|
||||
if (opts['_base_path_index'] >= basePaths.length || opts['_base_path_index'] < 0) {
|
||||
throw new Error("Invalid index " + opts['_base_path_index'] + " when selecting the host settings. Must be less than " + basePaths.length);
|
||||
}
|
||||
basePath = basePaths[opts['_base_path_index']];
|
||||
}
|
||||
|
||||
|
||||
return this.callApi(
|
||||
'/pet', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async updatePetWithForm(petId, opts) {
|
||||
async updatePetWithForm(petId, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -266,6 +302,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
'name': opts['name'],
|
||||
@@ -280,19 +317,21 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/{petId}', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @return {Promise<ApiResponse>}
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/ApiResponse>}
|
||||
*/
|
||||
async uploadFile(petId, opts) {
|
||||
async uploadFile(petId, opts, requestInit) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -306,6 +345,7 @@ export default class PetApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
@@ -320,7 +360,54 @@ export default class PetApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/pet/{petId}/uploadImage', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/ApiResponse>}
|
||||
*/
|
||||
async uploadFileWithRequiredFile(petId, requiredFile, opts, requestInit) {
|
||||
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 = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
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.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -28,9 +28,8 @@ export default class StoreApi extends ApiClient {
|
||||
* @alias module:api/StoreApi
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
this.baseURL = null;
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +37,10 @@ export default class StoreApi extends ApiClient {
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param {String} orderId ID of the order that needs to be deleted
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async deleteOrder(orderId) {
|
||||
async deleteOrder(orderId, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
@@ -48,11 +48,12 @@ export default class StoreApi extends ApiClient {
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
'orderId': orderId
|
||||
'order_id': orderId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -63,18 +64,19 @@ export default class StoreApi extends ApiClient {
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/store/order/{orderId}', 'DELETE',
|
||||
'/store/order/{order_id}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<Object.<String, {String: Number}>>}
|
||||
*/
|
||||
async getInventory() {
|
||||
async getInventory(requestInit) {
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
@@ -82,6 +84,7 @@ export default class StoreApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -94,7 +97,7 @@ export default class StoreApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/store/inventory', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
@@ -102,9 +105,10 @@ export default class StoreApi extends ApiClient {
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {Number} orderId ID of pet that needs to be fetched
|
||||
* @return {Promise<Order>}
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Order>}
|
||||
*/
|
||||
async getOrderById(orderId) {
|
||||
async getOrderById(orderId, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId === undefined || orderId === null) {
|
||||
@@ -112,11 +116,12 @@ export default class StoreApi extends ApiClient {
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
'orderId': orderId
|
||||
'order_id': orderId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -127,22 +132,24 @@ export default class StoreApi extends ApiClient {
|
||||
let returnType = Order;
|
||||
|
||||
return this.callApi(
|
||||
'/store/order/{orderId}', 'GET',
|
||||
'/store/order/{order_id}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
* @param {Order} body order placed for purchasing the pet
|
||||
* @return {Promise<Order>}
|
||||
*
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/Order>}
|
||||
*/
|
||||
async placeOrder(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling placeOrder");
|
||||
async placeOrder(order, requestInit) {
|
||||
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 = {
|
||||
@@ -150,19 +157,20 @@ export default class StoreApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = Order;
|
||||
|
||||
return this.callApi(
|
||||
'/store/order', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -28,23 +28,23 @@ export default class UserApi extends ApiClient {
|
||||
* @alias module:api/UserApi
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
this.baseURL = null;
|
||||
constructor(baseURL = 'http://petstore.swagger.io:80/v2') {
|
||||
super(baseURL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {User} body Created user object
|
||||
* @param {module:model/User} user Created user object
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async createUser(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUser");
|
||||
async createUser(user, requestInit) {
|
||||
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 = {
|
||||
@@ -52,32 +52,35 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/user', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} body List of user object
|
||||
*
|
||||
* @param {Array.<module:model/User>} user List of user object
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async createUsersWithArrayInput(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||
async createUsersWithArrayInput(user, requestInit) {
|
||||
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 = {
|
||||
@@ -85,32 +88,35 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/user/createWithArray', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} body List of user object
|
||||
*
|
||||
* @param {Array.<module:model/User>} user List of user object
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async createUsersWithListInput(body) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||
async createUsersWithListInput(user, requestInit) {
|
||||
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 = {
|
||||
@@ -118,19 +124,20 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/user/createWithList', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
@@ -138,9 +145,10 @@ export default class UserApi extends ApiClient {
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username The name that needs to be deleted
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async deleteUser(username) {
|
||||
async deleteUser(username, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -153,6 +161,7 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -165,16 +174,18 @@ export default class UserApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/user/{username}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return {Promise<User>}
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<module:model/User>}
|
||||
*/
|
||||
async getUserByName(username) {
|
||||
async getUserByName(username, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -187,6 +198,7 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -199,17 +211,19 @@ export default class UserApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/user/{username}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param {String} username The user name for login
|
||||
* @param {String} password The password for login in clear text
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise<String>}
|
||||
*/
|
||||
async loginUser(username, password) {
|
||||
async loginUser(username, password, requestInit) {
|
||||
let postBody = null;
|
||||
// verify the required parameter 'username' is set
|
||||
if (username === undefined || username === null) {
|
||||
@@ -227,6 +241,7 @@ export default class UserApi extends ApiClient {
|
||||
'password': password
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -239,15 +254,17 @@ export default class UserApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/user/login', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async logoutUser() {
|
||||
async logoutUser(requestInit) {
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
@@ -255,6 +272,7 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
@@ -267,7 +285,7 @@ export default class UserApi extends ApiClient {
|
||||
return this.callApi(
|
||||
'/user/logout', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
@@ -275,18 +293,19 @@ export default class UserApi extends ApiClient {
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username name that need to be deleted
|
||||
* @param {User} body Updated user object
|
||||
* @param {module:model/User} user Updated user object
|
||||
* @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277}
|
||||
* @return {Promise}
|
||||
*/
|
||||
async updateUser(username, body) {
|
||||
let postBody = body;
|
||||
async updateUser(username, user, requestInit) {
|
||||
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 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' 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 = {
|
||||
@@ -295,19 +314,20 @@ export default class UserApi extends ApiClient {
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript',
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.callApi(
|
||||
'/user/{username}', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
authNames, contentTypes, accepts, returnType, requestInit
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -13,19 +13,63 @@
|
||||
|
||||
|
||||
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 CatAllOf from './model/CatAllOf';
|
||||
import Category from './model/Category';
|
||||
import ClassModel from './model/ClassModel';
|
||||
import Client from './model/Client';
|
||||
import DeprecatedObject from './model/DeprecatedObject';
|
||||
import Dog from './model/Dog';
|
||||
import DogAllOf from './model/DogAllOf';
|
||||
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 FooGetDefaultResponse from './model/FooGetDefaultResponse';
|
||||
import FormatTest from './model/FormatTest';
|
||||
import HasOnlyReadOnly from './model/HasOnlyReadOnly';
|
||||
import HealthCheckResult from './model/HealthCheckResult';
|
||||
import List from './model/List';
|
||||
import MapTest from './model/MapTest';
|
||||
import MixedPropertiesAndAdditionalPropertiesClass from './model/MixedPropertiesAndAdditionalPropertiesClass';
|
||||
import Model200Response from './model/Model200Response';
|
||||
import Name from './model/Name';
|
||||
import NullableClass from './model/NullableClass';
|
||||
import NumberOnly from './model/NumberOnly';
|
||||
import ObjectWithDeprecatedFields from './model/ObjectWithDeprecatedFields';
|
||||
import Order from './model/Order';
|
||||
import OuterComposite from './model/OuterComposite';
|
||||
import OuterEnum from './model/OuterEnum';
|
||||
import OuterEnumDefaultValue from './model/OuterEnumDefaultValue';
|
||||
import OuterEnumInteger from './model/OuterEnumInteger';
|
||||
import OuterEnumIntegerDefaultValue from './model/OuterEnumIntegerDefaultValue';
|
||||
import OuterObjectWithEnumProperty from './model/OuterObjectWithEnumProperty';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import Return from './model/Return';
|
||||
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_is_a_sample_server_Petstore_server__For_this_sample_you_can_use_the_api_key_special_key_to_test_the_authorization_filters_.<br>
|
||||
* 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:
|
||||
@@ -62,30 +106,270 @@ export {
|
||||
*/
|
||||
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 CatAllOf model constructor.
|
||||
* @property {module:model/CatAllOf}
|
||||
*/
|
||||
CatAllOf,
|
||||
|
||||
/**
|
||||
* 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 DeprecatedObject model constructor.
|
||||
* @property {module:model/DeprecatedObject}
|
||||
*/
|
||||
DeprecatedObject,
|
||||
|
||||
/**
|
||||
* The Dog model constructor.
|
||||
* @property {module:model/Dog}
|
||||
*/
|
||||
Dog,
|
||||
|
||||
/**
|
||||
* The DogAllOf model constructor.
|
||||
* @property {module:model/DogAllOf}
|
||||
*/
|
||||
DogAllOf,
|
||||
|
||||
/**
|
||||
* 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 FooGetDefaultResponse model constructor.
|
||||
* @property {module:model/FooGetDefaultResponse}
|
||||
*/
|
||||
FooGetDefaultResponse,
|
||||
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
*/
|
||||
FormatTest,
|
||||
|
||||
/**
|
||||
* The HasOnlyReadOnly model constructor.
|
||||
* @property {module:model/HasOnlyReadOnly}
|
||||
*/
|
||||
HasOnlyReadOnly,
|
||||
|
||||
/**
|
||||
* The HealthCheckResult model constructor.
|
||||
* @property {module:model/HealthCheckResult}
|
||||
*/
|
||||
HealthCheckResult,
|
||||
|
||||
/**
|
||||
* 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 Name model constructor.
|
||||
* @property {module:model/Name}
|
||||
*/
|
||||
Name,
|
||||
|
||||
/**
|
||||
* The NullableClass model constructor.
|
||||
* @property {module:model/NullableClass}
|
||||
*/
|
||||
NullableClass,
|
||||
|
||||
/**
|
||||
* The NumberOnly model constructor.
|
||||
* @property {module:model/NumberOnly}
|
||||
*/
|
||||
NumberOnly,
|
||||
|
||||
/**
|
||||
* The ObjectWithDeprecatedFields model constructor.
|
||||
* @property {module:model/ObjectWithDeprecatedFields}
|
||||
*/
|
||||
ObjectWithDeprecatedFields,
|
||||
|
||||
/**
|
||||
* 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 OuterEnumDefaultValue model constructor.
|
||||
* @property {module:model/OuterEnumDefaultValue}
|
||||
*/
|
||||
OuterEnumDefaultValue,
|
||||
|
||||
/**
|
||||
* The OuterEnumInteger model constructor.
|
||||
* @property {module:model/OuterEnumInteger}
|
||||
*/
|
||||
OuterEnumInteger,
|
||||
|
||||
/**
|
||||
* The OuterEnumIntegerDefaultValue model constructor.
|
||||
* @property {module:model/OuterEnumIntegerDefaultValue}
|
||||
*/
|
||||
OuterEnumIntegerDefaultValue,
|
||||
|
||||
/**
|
||||
* The OuterObjectWithEnumProperty model constructor.
|
||||
* @property {module:model/OuterObjectWithEnumProperty}
|
||||
*/
|
||||
OuterObjectWithEnumProperty,
|
||||
|
||||
/**
|
||||
* The Pet model constructor.
|
||||
* @property {module:model/Pet}
|
||||
*/
|
||||
Pet,
|
||||
|
||||
/**
|
||||
* The ReadOnlyFirst model constructor.
|
||||
* @property {module:model/ReadOnlyFirst}
|
||||
*/
|
||||
ReadOnlyFirst,
|
||||
|
||||
/**
|
||||
* The Return model constructor.
|
||||
* @property {module:model/Return}
|
||||
*/
|
||||
Return,
|
||||
|
||||
/**
|
||||
* The SpecialModelName model constructor.
|
||||
* @property {module:model/SpecialModelName}
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
@@ -98,6 +382,30 @@ export {
|
||||
*/
|
||||
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}
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -19,27 +19,8 @@ import ApiClient from '../ApiClient';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ApiResponse {
|
||||
/**
|
||||
* @member {Number} code
|
||||
* @type {Number}
|
||||
*/
|
||||
code;
|
||||
/**
|
||||
* @member {String} type
|
||||
* @type {String}
|
||||
*/
|
||||
type;
|
||||
/**
|
||||
* @member {String} message
|
||||
* @type {String}
|
||||
*/
|
||||
message;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ApiResponse</code>.
|
||||
* Describes the result of uploading an image resource
|
||||
* @alias module:model/ApiResponse
|
||||
*/
|
||||
constructor() {
|
||||
@@ -78,8 +59,28 @@ class ApiResponse {
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
95
samples/client/petstore/javascript-apollo/src/model/Cat.js
Normal file
95
samples/client/petstore/javascript-apollo/src/model/Cat.js
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Animal from './Animal';
|
||||
import CatAllOf from './CatAllOf';
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @implements module:model/CatAllOf
|
||||
* @param className {String}
|
||||
*/
|
||||
constructor(className) {
|
||||
Animal.initialize(this, className);CatAllOf.initialize(this);
|
||||
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);
|
||||
CatAllOf.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';
|
||||
// Implement CatAllOf interface:
|
||||
/**
|
||||
* @member {Boolean} declawed
|
||||
*/
|
||||
CatAllOf.prototype['declawed'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
export default Cat;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The CatAllOf model module.
|
||||
* @module model/CatAllOf
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class CatAllOf {
|
||||
/**
|
||||
* Constructs a new <code>CatAllOf</code>.
|
||||
* @alias module:model/CatAllOf
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
CatAllOf.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>CatAllOf</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/CatAllOf} obj Optional instance to populate.
|
||||
* @return {module:model/CatAllOf} The populated <code>CatAllOf</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new CatAllOf();
|
||||
|
||||
if (data.hasOwnProperty('declawed')) {
|
||||
obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Boolean} declawed
|
||||
*/
|
||||
CatAllOf.prototype['declawed'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default CatAllOf;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -19,27 +19,14 @@ import ApiClient from '../ApiClient';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Category {
|
||||
/**
|
||||
* @member {Number} id
|
||||
* @type {Number}
|
||||
*/
|
||||
id;
|
||||
/**
|
||||
* @member {String} name
|
||||
* @type {String}
|
||||
*/
|
||||
name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Category</code>.
|
||||
* A category for a pet
|
||||
* @alias module:model/Category
|
||||
* @param name {String}
|
||||
*/
|
||||
constructor() {
|
||||
constructor(name) {
|
||||
|
||||
Category.initialize(this);
|
||||
Category.initialize(this, name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,7 +34,8 @@ class Category {
|
||||
* 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) {
|
||||
static initialize(obj, name) {
|
||||
obj['name'] = name || 'default-name';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,8 +58,24 @@ class Category {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} id
|
||||
*/
|
||||
Category.prototype['id'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
* @default 'default-name'
|
||||
*/
|
||||
Category.prototype['name'] = 'default-name';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Category;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ClassModel model module.
|
||||
* @module model/ClassModel
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ClassModel {
|
||||
/**
|
||||
* Constructs a new <code>ClassModel</code>.
|
||||
* Model for testing model with \"_class\" 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The DeprecatedObject model module.
|
||||
* @module model/DeprecatedObject
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class DeprecatedObject {
|
||||
/**
|
||||
* Constructs a new <code>DeprecatedObject</code>.
|
||||
* @alias module:model/DeprecatedObject
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
DeprecatedObject.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>DeprecatedObject</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/DeprecatedObject} obj Optional instance to populate.
|
||||
* @return {module:model/DeprecatedObject} The populated <code>DeprecatedObject</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new DeprecatedObject();
|
||||
|
||||
if (data.hasOwnProperty('name')) {
|
||||
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
DeprecatedObject.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default DeprecatedObject;
|
||||
|
||||
95
samples/client/petstore/javascript-apollo/src/model/Dog.js
Normal file
95
samples/client/petstore/javascript-apollo/src/model/Dog.js
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Animal from './Animal';
|
||||
import DogAllOf from './DogAllOf';
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @implements module:model/DogAllOf
|
||||
* @param className {String}
|
||||
*/
|
||||
constructor(className) {
|
||||
Animal.initialize(this, className);DogAllOf.initialize(this);
|
||||
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);
|
||||
DogAllOf.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';
|
||||
// Implement DogAllOf interface:
|
||||
/**
|
||||
* @member {String} breed
|
||||
*/
|
||||
DogAllOf.prototype['breed'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
export default Dog;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The DogAllOf model module.
|
||||
* @module model/DogAllOf
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class DogAllOf {
|
||||
/**
|
||||
* Constructs a new <code>DogAllOf</code>.
|
||||
* @alias module:model/DogAllOf
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
DogAllOf.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>DogAllOf</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/DogAllOf} obj Optional instance to populate.
|
||||
* @return {module:model/DogAllOf} The populated <code>DogAllOf</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new DogAllOf();
|
||||
|
||||
if (data.hasOwnProperty('breed')) {
|
||||
obj['breed'] = ApiClient.convertToType(data['breed'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} breed
|
||||
*/
|
||||
DogAllOf.prototype['breed'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default DogAllOf;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
229
samples/client/petstore/javascript-apollo/src/model/EnumTest.js
Normal file
229
samples/client/petstore/javascript-apollo/src/model/EnumTest.js
Normal file
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import OuterEnum from './OuterEnum';
|
||||
import OuterEnumDefaultValue from './OuterEnumDefaultValue';
|
||||
import OuterEnumInteger from './OuterEnumInteger';
|
||||
import OuterEnumIntegerDefaultValue from './OuterEnumIntegerDefaultValue';
|
||||
|
||||
/**
|
||||
* 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']);
|
||||
}
|
||||
if (data.hasOwnProperty('outerEnumInteger')) {
|
||||
obj['outerEnumInteger'] = OuterEnumInteger.constructFromObject(data['outerEnumInteger']);
|
||||
}
|
||||
if (data.hasOwnProperty('outerEnumDefaultValue')) {
|
||||
obj['outerEnumDefaultValue'] = OuterEnumDefaultValue.constructFromObject(data['outerEnumDefaultValue']);
|
||||
}
|
||||
if (data.hasOwnProperty('outerEnumIntegerDefaultValue')) {
|
||||
obj['outerEnumIntegerDefaultValue'] = OuterEnumIntegerDefaultValue.constructFromObject(data['outerEnumIntegerDefaultValue']);
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
/**
|
||||
* @member {module:model/OuterEnumInteger} outerEnumInteger
|
||||
*/
|
||||
EnumTest.prototype['outerEnumInteger'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/OuterEnumDefaultValue} outerEnumDefaultValue
|
||||
*/
|
||||
EnumTest.prototype['outerEnumDefaultValue'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/OuterEnumIntegerDefaultValue} outerEnumIntegerDefaultValue
|
||||
*/
|
||||
EnumTest.prototype['outerEnumIntegerDefaultValue'] = 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;
|
||||
|
||||
73
samples/client/petstore/javascript-apollo/src/model/File.js
Normal file
73
samples/client/petstore/javascript-apollo/src/model/File.js
Normal 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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The File model module.
|
||||
* @module model/File
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class File {
|
||||
/**
|
||||
* Constructs a new <code>File</code>.
|
||||
* Must be named `File` 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
72
samples/client/petstore/javascript-apollo/src/model/Foo.js
Normal file
72
samples/client/petstore/javascript-apollo/src/model/Foo.js
Normal 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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import Foo from './Foo';
|
||||
|
||||
/**
|
||||
* The FooGetDefaultResponse model module.
|
||||
* @module model/FooGetDefaultResponse
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class FooGetDefaultResponse {
|
||||
/**
|
||||
* Constructs a new <code>FooGetDefaultResponse</code>.
|
||||
* @alias module:model/FooGetDefaultResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
FooGetDefaultResponse.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>FooGetDefaultResponse</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/FooGetDefaultResponse} obj Optional instance to populate.
|
||||
* @return {module:model/FooGetDefaultResponse} The populated <code>FooGetDefaultResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new FooGetDefaultResponse();
|
||||
|
||||
if (data.hasOwnProperty('string')) {
|
||||
obj['string'] = Foo.constructFromObject(data['string']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {module:model/Foo} string
|
||||
*/
|
||||
FooGetDefaultResponse.prototype['string'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default FooGetDefaultResponse;
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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('decimal')) {
|
||||
obj['decimal'] = ApiClient.convertToType(data['decimal'], '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 {Number} decimal
|
||||
*/
|
||||
FormatTest.prototype['decimal'] = 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The HealthCheckResult model module.
|
||||
* @module model/HealthCheckResult
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class HealthCheckResult {
|
||||
/**
|
||||
* Constructs a new <code>HealthCheckResult</code>.
|
||||
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
* @alias module:model/HealthCheckResult
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
HealthCheckResult.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>HealthCheckResult</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/HealthCheckResult} obj Optional instance to populate.
|
||||
* @return {module:model/HealthCheckResult} The populated <code>HealthCheckResult</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new HealthCheckResult();
|
||||
|
||||
if (data.hasOwnProperty('NullableMessage')) {
|
||||
obj['NullableMessage'] = ApiClient.convertToType(data['NullableMessage'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} NullableMessage
|
||||
*/
|
||||
HealthCheckResult.prototype['NullableMessage'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default HealthCheckResult;
|
||||
|
||||
71
samples/client/petstore/javascript-apollo/src/model/List.js
Normal file
71
samples/client/petstore/javascript-apollo/src/model/List.js
Normal 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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
116
samples/client/petstore/javascript-apollo/src/model/MapTest.js
Normal file
116
samples/client/petstore/javascript-apollo/src/model/MapTest.js
Normal 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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
98
samples/client/petstore/javascript-apollo/src/model/Name.js
Normal file
98
samples/client/petstore/javascript-apollo/src/model/Name.js
Normal 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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The NullableClass model module.
|
||||
* @module model/NullableClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class NullableClass {
|
||||
/**
|
||||
* Constructs a new <code>NullableClass</code>.
|
||||
* @alias module:model/NullableClass
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
NullableClass.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>NullableClass</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/NullableClass} obj Optional instance to populate.
|
||||
* @return {module:model/NullableClass} The populated <code>NullableClass</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new NullableClass();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Object');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('integer_prop')) {
|
||||
obj['integer_prop'] = ApiClient.convertToType(data['integer_prop'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('number_prop')) {
|
||||
obj['number_prop'] = ApiClient.convertToType(data['number_prop'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('boolean_prop')) {
|
||||
obj['boolean_prop'] = ApiClient.convertToType(data['boolean_prop'], 'Boolean');
|
||||
}
|
||||
if (data.hasOwnProperty('string_prop')) {
|
||||
obj['string_prop'] = ApiClient.convertToType(data['string_prop'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('date_prop')) {
|
||||
obj['date_prop'] = ApiClient.convertToType(data['date_prop'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('datetime_prop')) {
|
||||
obj['datetime_prop'] = ApiClient.convertToType(data['datetime_prop'], 'Date');
|
||||
}
|
||||
if (data.hasOwnProperty('array_nullable_prop')) {
|
||||
obj['array_nullable_prop'] = ApiClient.convertToType(data['array_nullable_prop'], [Object]);
|
||||
}
|
||||
if (data.hasOwnProperty('array_and_items_nullable_prop')) {
|
||||
obj['array_and_items_nullable_prop'] = ApiClient.convertToType(data['array_and_items_nullable_prop'], [Object]);
|
||||
}
|
||||
if (data.hasOwnProperty('array_items_nullable')) {
|
||||
obj['array_items_nullable'] = ApiClient.convertToType(data['array_items_nullable'], [Object]);
|
||||
}
|
||||
if (data.hasOwnProperty('object_nullable_prop')) {
|
||||
obj['object_nullable_prop'] = ApiClient.convertToType(data['object_nullable_prop'], {'String': Object});
|
||||
}
|
||||
if (data.hasOwnProperty('object_and_items_nullable_prop')) {
|
||||
obj['object_and_items_nullable_prop'] = ApiClient.convertToType(data['object_and_items_nullable_prop'], {'String': Object});
|
||||
}
|
||||
if (data.hasOwnProperty('object_items_nullable')) {
|
||||
obj['object_items_nullable'] = ApiClient.convertToType(data['object_items_nullable'], {'String': Object});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} integer_prop
|
||||
*/
|
||||
NullableClass.prototype['integer_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} number_prop
|
||||
*/
|
||||
NullableClass.prototype['number_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Boolean} boolean_prop
|
||||
*/
|
||||
NullableClass.prototype['boolean_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} string_prop
|
||||
*/
|
||||
NullableClass.prototype['string_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} date_prop
|
||||
*/
|
||||
NullableClass.prototype['date_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Date} datetime_prop
|
||||
*/
|
||||
NullableClass.prototype['datetime_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<Object>} array_nullable_prop
|
||||
*/
|
||||
NullableClass.prototype['array_nullable_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<Object>} array_and_items_nullable_prop
|
||||
*/
|
||||
NullableClass.prototype['array_and_items_nullable_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<Object>} array_items_nullable
|
||||
*/
|
||||
NullableClass.prototype['array_items_nullable'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object>} object_nullable_prop
|
||||
*/
|
||||
NullableClass.prototype['object_nullable_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object>} object_and_items_nullable_prop
|
||||
*/
|
||||
NullableClass.prototype['object_and_items_nullable_prop'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Object>} object_items_nullable
|
||||
*/
|
||||
NullableClass.prototype['object_items_nullable'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default NullableClass;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import DeprecatedObject from './DeprecatedObject';
|
||||
|
||||
/**
|
||||
* The ObjectWithDeprecatedFields model module.
|
||||
* @module model/ObjectWithDeprecatedFields
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class ObjectWithDeprecatedFields {
|
||||
/**
|
||||
* Constructs a new <code>ObjectWithDeprecatedFields</code>.
|
||||
* @alias module:model/ObjectWithDeprecatedFields
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ObjectWithDeprecatedFields.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>ObjectWithDeprecatedFields</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/ObjectWithDeprecatedFields} obj Optional instance to populate.
|
||||
* @return {module:model/ObjectWithDeprecatedFields} The populated <code>ObjectWithDeprecatedFields</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ObjectWithDeprecatedFields();
|
||||
|
||||
if (data.hasOwnProperty('uuid')) {
|
||||
obj['uuid'] = ApiClient.convertToType(data['uuid'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('id')) {
|
||||
obj['id'] = ApiClient.convertToType(data['id'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('deprecatedRef')) {
|
||||
obj['deprecatedRef'] = DeprecatedObject.constructFromObject(data['deprecatedRef']);
|
||||
}
|
||||
if (data.hasOwnProperty('bars')) {
|
||||
obj['bars'] = ApiClient.convertToType(data['bars'], ['String']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {String} uuid
|
||||
*/
|
||||
ObjectWithDeprecatedFields.prototype['uuid'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Number} id
|
||||
*/
|
||||
ObjectWithDeprecatedFields.prototype['id'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/DeprecatedObject} deprecatedRef
|
||||
*/
|
||||
ObjectWithDeprecatedFields.prototype['deprecatedRef'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} bars
|
||||
*/
|
||||
ObjectWithDeprecatedFields.prototype['bars'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ObjectWithDeprecatedFields;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -19,43 +19,8 @@ import ApiClient from '../ApiClient';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Order {
|
||||
/**
|
||||
* @member {Number} id
|
||||
* @type {Number}
|
||||
*/
|
||||
id;
|
||||
/**
|
||||
* @member {Number} petId
|
||||
* @type {Number}
|
||||
*/
|
||||
petId;
|
||||
/**
|
||||
* @member {Number} quantity
|
||||
* @type {Number}
|
||||
*/
|
||||
quantity;
|
||||
/**
|
||||
* @member {Date} shipDate
|
||||
* @type {Date}
|
||||
*/
|
||||
shipDate;
|
||||
/**
|
||||
* @member {Order.StatusEnum} status
|
||||
* @type {Order.StatusEnum}
|
||||
*/
|
||||
status;
|
||||
/**
|
||||
* @member {Boolean} complete
|
||||
* @type {Boolean}
|
||||
* @default false
|
||||
*/
|
||||
complete = false;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Order</code>.
|
||||
* An order for a pets from the pet store
|
||||
* @alias module:model/Order
|
||||
*/
|
||||
constructor() {
|
||||
@@ -103,8 +68,45 @@ class Order {
|
||||
}
|
||||
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.
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* Enum class OuterEnumDefaultValue.
|
||||
* @enum {}
|
||||
* @readonly
|
||||
*/
|
||||
export default class OuterEnumDefaultValue {
|
||||
|
||||
/**
|
||||
* value: "placed"
|
||||
* @const
|
||||
*/
|
||||
"placed" = "placed";
|
||||
|
||||
|
||||
/**
|
||||
* value: "approved"
|
||||
* @const
|
||||
*/
|
||||
"approved" = "approved";
|
||||
|
||||
|
||||
/**
|
||||
* value: "delivered"
|
||||
* @const
|
||||
*/
|
||||
"delivered" = "delivered";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a <code>OuterEnumDefaultValue</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/OuterEnumDefaultValue} The enum <code>OuterEnumDefaultValue</code> value.
|
||||
*/
|
||||
static constructFromObject(object) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* Enum class OuterEnumInteger.
|
||||
* @enum {}
|
||||
* @readonly
|
||||
*/
|
||||
export default class OuterEnumInteger {
|
||||
|
||||
/**
|
||||
* value: 0
|
||||
* @const
|
||||
*/
|
||||
"0" = 0;
|
||||
|
||||
|
||||
/**
|
||||
* value: 1
|
||||
* @const
|
||||
*/
|
||||
"1" = 1;
|
||||
|
||||
|
||||
/**
|
||||
* value: 2
|
||||
* @const
|
||||
*/
|
||||
"2" = 2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a <code>OuterEnumInteger</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/OuterEnumInteger} The enum <code>OuterEnumInteger</code> value.
|
||||
*/
|
||||
static constructFromObject(object) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
/**
|
||||
* Enum class OuterEnumIntegerDefaultValue.
|
||||
* @enum {}
|
||||
* @readonly
|
||||
*/
|
||||
export default class OuterEnumIntegerDefaultValue {
|
||||
|
||||
/**
|
||||
* value: 0
|
||||
* @const
|
||||
*/
|
||||
"0" = 0;
|
||||
|
||||
|
||||
/**
|
||||
* value: 1
|
||||
* @const
|
||||
*/
|
||||
"1" = 1;
|
||||
|
||||
|
||||
/**
|
||||
* value: 2
|
||||
* @const
|
||||
*/
|
||||
"2" = 2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a <code>OuterEnumIntegerDefaultValue</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/OuterEnumIntegerDefaultValue} The enum <code>OuterEnumIntegerDefaultValue</code> value.
|
||||
*/
|
||||
static constructFromObject(object) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import OuterEnumInteger from './OuterEnumInteger';
|
||||
|
||||
/**
|
||||
* The OuterObjectWithEnumProperty model module.
|
||||
* @module model/OuterObjectWithEnumProperty
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class OuterObjectWithEnumProperty {
|
||||
/**
|
||||
* Constructs a new <code>OuterObjectWithEnumProperty</code>.
|
||||
* @alias module:model/OuterObjectWithEnumProperty
|
||||
* @param value {module:model/OuterEnumInteger}
|
||||
*/
|
||||
constructor(value) {
|
||||
|
||||
OuterObjectWithEnumProperty.initialize(this, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, value) {
|
||||
obj['value'] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>OuterObjectWithEnumProperty</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/OuterObjectWithEnumProperty} obj Optional instance to populate.
|
||||
* @return {module:model/OuterObjectWithEnumProperty} The populated <code>OuterObjectWithEnumProperty</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new OuterObjectWithEnumProperty();
|
||||
|
||||
if (data.hasOwnProperty('value')) {
|
||||
obj['value'] = OuterEnumInteger.constructFromObject(data['value']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {module:model/OuterEnumInteger} value
|
||||
*/
|
||||
OuterObjectWithEnumProperty.prototype['value'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default OuterObjectWithEnumProperty;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -21,55 +21,11 @@ import Tag from './Tag';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Pet {
|
||||
/**
|
||||
* @member {Number} id
|
||||
* @type {Number}
|
||||
*/
|
||||
id;
|
||||
/**
|
||||
* @member {Category} category
|
||||
* @type {Category}
|
||||
*/
|
||||
category;
|
||||
/**
|
||||
* @member {String} name
|
||||
* @type {String}
|
||||
*/
|
||||
name;
|
||||
/**
|
||||
* @member {Array.<CodegenProperty{openApiType='string', baseName='photoUrls', complexType='null', getter='getPhotoUrls', setter='setPhotoUrls', description='null', dataType='String', datatypeWithEnum='String', dataFormat='null', name='photoUrls', min='null', max='null', defaultValue='null', defaultValueWithParam=' = ApiClient.convertToType(data['photoUrls'], 'String');', baseType='String', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
|
||||
"type" : "string"
|
||||
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='PhotoUrls', nameInSnakeCase='PHOTO_URLS', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false}>} photoUrls
|
||||
* @type {Array.<CodegenProperty{openApiType='string', baseName='photoUrls', complexType='null', getter='getPhotoUrls', setter='setPhotoUrls', description='null', dataType='String', datatypeWithEnum='String', dataFormat='null', name='photoUrls', min='null', max='null', defaultValue='null', defaultValueWithParam=' = ApiClient.convertToType(data['photoUrls'], 'String');', baseType='String', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
|
||||
"type" : "string"
|
||||
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='PhotoUrls', nameInSnakeCase='PHOTO_URLS', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false}>}
|
||||
*/
|
||||
photoUrls;
|
||||
/**
|
||||
* @member {Array.<CodegenProperty{openApiType='Tag', baseName='tags', complexType='Tag', getter='getTags', setter='setTags', description='null', dataType='Tag', datatypeWithEnum='Tag', dataFormat='null', name='tags', min='null', max='null', defaultValue='null', defaultValueWithParam=' = Tag.constructFromObject(data['tags']);', baseType='Tag', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
|
||||
"$ref" : "#/components/schemas/Tag"
|
||||
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='Tags', nameInSnakeCase='TAGS', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false}>} tags
|
||||
* @type {Array.<CodegenProperty{openApiType='Tag', baseName='tags', complexType='Tag', getter='getTags', setter='setTags', description='null', dataType='Tag', datatypeWithEnum='Tag', dataFormat='null', name='tags', min='null', max='null', defaultValue='null', defaultValueWithParam=' = Tag.constructFromObject(data['tags']);', baseType='Tag', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
|
||||
"$ref" : "#/components/schemas/Tag"
|
||||
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=true, isContainer=false, isString=false, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='Tags', nameInSnakeCase='TAGS', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false}>}
|
||||
*/
|
||||
tags;
|
||||
/**
|
||||
* @member {Pet.StatusEnum} status
|
||||
* @type {Pet.StatusEnum}
|
||||
*/
|
||||
status;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Pet</code>.
|
||||
* A pet for sale in the pet store
|
||||
* @alias module:model/Pet
|
||||
* @param name {String}
|
||||
* @param photoUrls {Array.<CodegenProperty{openApiType='string', baseName='photoUrls', complexType='null', getter='getPhotoUrls', setter='setPhotoUrls', description='null', dataType='String', datatypeWithEnum='String', dataFormat='null', name='photoUrls', min='null', max='null', defaultValue='null', defaultValueWithParam=' = ApiClient.convertToType(data['photoUrls'], 'String');', baseType='String', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
|
||||
"type" : "string"
|
||||
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='PhotoUrls', nameInSnakeCase='PHOTO_URLS', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false}>}
|
||||
* @param photoUrls {Array.<String>}
|
||||
*/
|
||||
constructor(name, photoUrls) {
|
||||
|
||||
@@ -118,8 +74,44 @@ class Pet {
|
||||
}
|
||||
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.
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The Return model module.
|
||||
* @module model/Return
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Return {
|
||||
/**
|
||||
* Constructs a new <code>Return</code>.
|
||||
* Model for testing reserved words
|
||||
* @alias module:model/Return
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
Return.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>Return</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/Return} obj Optional instance to populate.
|
||||
* @return {module:model/Return} The populated <code>Return</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new Return();
|
||||
|
||||
if (data.hasOwnProperty('return')) {
|
||||
obj['return'] = ApiClient.convertToType(data['return'], 'Number');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} return
|
||||
*/
|
||||
Return.prototype['return'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Return;
|
||||
|
||||
@@ -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: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -19,22 +19,8 @@ import ApiClient from '../ApiClient';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class Tag {
|
||||
/**
|
||||
* @member {Number} id
|
||||
* @type {Number}
|
||||
*/
|
||||
id;
|
||||
/**
|
||||
* @member {String} name
|
||||
* @type {String}
|
||||
*/
|
||||
name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>Tag</code>.
|
||||
* A tag for a pet
|
||||
* @alias module:model/Tag
|
||||
*/
|
||||
constructor() {
|
||||
@@ -70,8 +56,23 @@ class Tag {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {Number} id
|
||||
*/
|
||||
Tag.prototype['id'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} name
|
||||
*/
|
||||
Tag.prototype['name'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default Tag;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
@@ -19,52 +19,8 @@ import ApiClient from '../ApiClient';
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class User {
|
||||
/**
|
||||
* @member {Number} id
|
||||
* @type {Number}
|
||||
*/
|
||||
id;
|
||||
/**
|
||||
* @member {String} username
|
||||
* @type {String}
|
||||
*/
|
||||
username;
|
||||
/**
|
||||
* @member {String} firstName
|
||||
* @type {String}
|
||||
*/
|
||||
firstName;
|
||||
/**
|
||||
* @member {String} lastName
|
||||
* @type {String}
|
||||
*/
|
||||
lastName;
|
||||
/**
|
||||
* @member {String} email
|
||||
* @type {String}
|
||||
*/
|
||||
email;
|
||||
/**
|
||||
* @member {String} password
|
||||
* @type {String}
|
||||
*/
|
||||
password;
|
||||
/**
|
||||
* @member {String} phone
|
||||
* @type {String}
|
||||
*/
|
||||
phone;
|
||||
/**
|
||||
* @member {Number} userStatus
|
||||
* @type {Number}
|
||||
*/
|
||||
userStatus;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a new <code>User</code>.
|
||||
* A User who is purchasing from the pet store
|
||||
* @alias module:model/User
|
||||
*/
|
||||
constructor() {
|
||||
@@ -118,8 +74,54 @@ class User {
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user