mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-22 01:27:11 +00:00
Add option modelPropertyNaming to javascript generator (#299)
* Add option modelPropertyNaming to javascript generator Fixes 6530 * Update Petstore sample
This commit is contained in:
committed by
William Cheng
parent
7126074f49
commit
24104dac35
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -38,15 +38,15 @@ export default class AnotherFakeApi {
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testSpecialTagsWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
testSpecialTagsWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testSpecialTags");
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ export default class AnotherFakeApi {
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testSpecialTags(body) {
|
||||
return this.testSpecialTagsWithHttpInfo(body)
|
||||
testSpecialTags(client) {
|
||||
return this.testSpecialTagsWithHttpInfo(client)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -14,10 +14,8 @@
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import OuterBoolean from '../model/OuterBoolean';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import OuterNumber from '../model/OuterNumber';
|
||||
import OuterString from '../model/OuterString';
|
||||
import User from '../model/User';
|
||||
|
||||
/**
|
||||
* Fake service.
|
||||
@@ -42,8 +40,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterBoolean} opts.body Input boolean as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OuterBoolean} and HTTP response
|
||||
* @param {Boolean} opts.body Input boolean as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Boolean} and HTTP response
|
||||
*/
|
||||
fakeOuterBooleanSerializeWithHttpInfo(opts) {
|
||||
opts = opts || {};
|
||||
@@ -61,8 +59,8 @@ export default class FakeApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterBoolean;
|
||||
let accepts = ['*/*'];
|
||||
let returnType = Boolean;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/boolean', 'POST',
|
||||
@@ -74,8 +72,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer boolean types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterBoolean} opts.body Input boolean as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterBoolean}
|
||||
* @param {Boolean} opts.body Input boolean as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Boolean}
|
||||
*/
|
||||
fakeOuterBooleanSerialize(opts) {
|
||||
return this.fakeOuterBooleanSerializeWithHttpInfo(opts)
|
||||
@@ -88,12 +86,12 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterComposite} opts.body Input composite as post body
|
||||
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OuterComposite} and HTTP response
|
||||
*/
|
||||
fakeOuterCompositeSerializeWithHttpInfo(opts) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['body'];
|
||||
let postBody = opts['outerComposite'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
@@ -107,7 +105,7 @@ export default class FakeApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let accepts = ['*/*'];
|
||||
let returnType = OuterComposite;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -120,7 +118,7 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterComposite} opts.body Input composite as post body
|
||||
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterComposite}
|
||||
*/
|
||||
fakeOuterCompositeSerialize(opts) {
|
||||
@@ -134,8 +132,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterNumber} opts.body Input number as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OuterNumber} and HTTP response
|
||||
* @param {Number} opts.body Input number as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Number} and HTTP response
|
||||
*/
|
||||
fakeOuterNumberSerializeWithHttpInfo(opts) {
|
||||
opts = opts || {};
|
||||
@@ -153,8 +151,8 @@ export default class FakeApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterNumber;
|
||||
let accepts = ['*/*'];
|
||||
let returnType = Number;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/number', 'POST',
|
||||
@@ -166,8 +164,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer number types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterNumber} opts.body Input number as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterNumber}
|
||||
* @param {Number} opts.body Input number as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Number}
|
||||
*/
|
||||
fakeOuterNumberSerialize(opts) {
|
||||
return this.fakeOuterNumberSerializeWithHttpInfo(opts)
|
||||
@@ -180,8 +178,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterString} opts.body Input string as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OuterString} and HTTP response
|
||||
* @param {String} opts.body Input string as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link String} and HTTP response
|
||||
*/
|
||||
fakeOuterStringSerializeWithHttpInfo(opts) {
|
||||
opts = opts || {};
|
||||
@@ -199,8 +197,8 @@ export default class FakeApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = [];
|
||||
let returnType = OuterString;
|
||||
let accepts = ['*/*'];
|
||||
let returnType = String;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/outer/string', 'POST',
|
||||
@@ -212,8 +210,8 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of outer string types
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterString} opts.body Input string as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterString}
|
||||
* @param {String} opts.body Input string as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link String}
|
||||
*/
|
||||
fakeOuterStringSerialize(opts) {
|
||||
return this.fakeOuterStringSerializeWithHttpInfo(opts)
|
||||
@@ -223,18 +221,72 @@ export default class FakeApi {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testBodyWithQueryParamsWithHttpInfo(query, user) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'query' is set
|
||||
if (query === undefined || query === null) {
|
||||
throw new Error("Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
||||
}
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling testBodyWithQueryParams");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'query': query
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-query-params', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testBodyWithQueryParams(query, user) {
|
||||
return this.testBodyWithQueryParamsWithHttpInfo(query, user)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testClientModelWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
testClientModelWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testClientModel");
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClientModel");
|
||||
}
|
||||
|
||||
|
||||
@@ -262,11 +314,11 @@ export default class FakeApi {
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} body client model
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testClientModel(body) {
|
||||
return this.testClientModelWithHttpInfo(body)
|
||||
testClientModel(client) {
|
||||
return this.testClientModelWithHttpInfo(client)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -286,7 +338,7 @@ export default class FakeApi {
|
||||
* @param {Number} opts.int64 None
|
||||
* @param {Number} opts._float None
|
||||
* @param {String} opts._string None
|
||||
* @param {Blob} opts.binary None
|
||||
* @param {File} opts.binary None
|
||||
* @param {Date} opts._date None
|
||||
* @param {Date} opts.dateTime None
|
||||
* @param {String} opts.password None
|
||||
@@ -342,8 +394,8 @@ export default class FakeApi {
|
||||
};
|
||||
|
||||
let authNames = ['http_basic_test'];
|
||||
let contentTypes = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
let accepts = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -366,7 +418,7 @@ export default class FakeApi {
|
||||
* @param {Number} opts.int64 None
|
||||
* @param {Number} opts._float None
|
||||
* @param {String} opts._string None
|
||||
* @param {Blob} opts.binary None
|
||||
* @param {File} opts.binary None
|
||||
* @param {Date} opts._date None
|
||||
* @param {Date} opts.dateTime None
|
||||
* @param {String} opts.password None
|
||||
@@ -385,14 +437,14 @@ export default class FakeApi {
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array)
|
||||
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to -efg)
|
||||
* @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 {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/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/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')
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testEnumParametersWithHttpInfo(opts) {
|
||||
@@ -405,7 +457,8 @@ export default class FakeApi {
|
||||
let queryParams = {
|
||||
'enum_query_string_array': this.apiClient.buildCollectionParam(opts['enumQueryStringArray'], 'csv'),
|
||||
'enum_query_string': opts['enumQueryString'],
|
||||
'enum_query_integer': opts['enumQueryInteger']
|
||||
'enum_query_integer': opts['enumQueryInteger'],
|
||||
'enum_query_double': opts['enumQueryDouble']
|
||||
};
|
||||
let headerParams = {
|
||||
'enum_header_string_array': opts['enumHeaderStringArray'],
|
||||
@@ -413,13 +466,12 @@ export default class FakeApi {
|
||||
};
|
||||
let formParams = {
|
||||
'enum_form_string_array': this.apiClient.buildCollectionParam(opts['enumFormStringArray'], 'csv'),
|
||||
'enum_form_string': opts['enumFormString'],
|
||||
'enum_query_double': opts['enumQueryDouble']
|
||||
'enum_form_string': opts['enumFormString']
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['*/*'];
|
||||
let accepts = ['*/*'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -433,14 +485,14 @@ export default class FakeApi {
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array)
|
||||
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to -efg)
|
||||
* @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 {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/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/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')
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testEnumParameters(opts) {
|
||||
@@ -453,16 +505,15 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param {Object} param request body
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param) {
|
||||
let postBody = param;
|
||||
testInlineAdditionalPropertiesWithHttpInfo(requestBody) {
|
||||
let postBody = requestBody;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param === undefined || param === null) {
|
||||
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody === undefined || requestBody === null) {
|
||||
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
@@ -489,12 +540,11 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param {Object} param request body
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testInlineAdditionalProperties(param) {
|
||||
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
|
||||
testInlineAdditionalProperties(requestBody) {
|
||||
return this.testInlineAdditionalPropertiesWithHttpInfo(requestBody)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -503,7 +553,6 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param {String} param field1
|
||||
* @param {String} param2 field2
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
@@ -534,7 +583,7 @@ export default class FakeApi {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
@@ -547,7 +596,6 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param {String} param field1
|
||||
* @param {String} param2 field2
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -37,15 +37,16 @@ export default class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} body client model
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testClassnameWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
testClassnameWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testClassname");
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClassname");
|
||||
}
|
||||
|
||||
|
||||
@@ -72,11 +73,12 @@ export default class FakeClassnameTags123Api {
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} body client model
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testClassname(body) {
|
||||
return this.testClassnameWithHttpInfo(body)
|
||||
testClassname(client) {
|
||||
return this.testClassnameWithHttpInfo(client)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -38,16 +38,15 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param {module:model/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
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
addPetWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
addPetWithHttpInfo(pet) {
|
||||
let postBody = pet;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling addPet");
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling addPet");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +61,7 @@ export default class PetApi {
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -74,12 +73,11 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param {module:model/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
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
addPet(body) {
|
||||
return this.addPetWithHttpInfo(body)
|
||||
addPet(pet) {
|
||||
return this.addPetWithHttpInfo(pet)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -88,7 +86,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param {Number} petId Pet id to delete
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.apiKey
|
||||
@@ -117,7 +114,7 @@ export default class PetApi {
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -129,7 +126,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param {Number} petId Pet id to delete
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.apiKey
|
||||
@@ -298,16 +294,15 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param {module:model/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
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
updatePetWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
updatePetWithHttpInfo(pet) {
|
||||
let postBody = pet;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling updatePet");
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling updatePet");
|
||||
}
|
||||
|
||||
|
||||
@@ -322,7 +317,7 @@ export default class PetApi {
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/json', 'application/xml'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -334,12 +329,11 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param {module:model/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
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
updatePet(body) {
|
||||
return this.updatePetWithHttpInfo(body)
|
||||
updatePet(pet) {
|
||||
return this.updatePetWithHttpInfo(pet)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -348,7 +342,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -379,7 +372,7 @@ export default class PetApi {
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['application/x-www-form-urlencoded'];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -391,7 +384,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -408,7 +400,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -451,7 +442,6 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ export default class StoreApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -89,7 +89,7 @@ export default class StoreApi {
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.<String, {'String': 'Number'}>} and HTTP response
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object.<String, {String: Number}>} and HTTP response
|
||||
*/
|
||||
getInventoryWithHttpInfo() {
|
||||
let postBody = null;
|
||||
@@ -107,7 +107,7 @@ export default class StoreApi {
|
||||
let authNames = ['api_key'];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = {'String': 'Number'};
|
||||
let returnType = {String: Number};
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/store/inventory', 'GET',
|
||||
@@ -119,7 +119,7 @@ export default class StoreApi {
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {'String': 'Number'}>}
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object.<String, {String: Number}>}
|
||||
*/
|
||||
getInventory() {
|
||||
return this.getInventoryWithHttpInfo()
|
||||
@@ -182,16 +182,15 @@ export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param {module:model/Order} body order placed for purchasing the pet
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
|
||||
*/
|
||||
placeOrderWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
placeOrderWithHttpInfo(order) {
|
||||
let postBody = order;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling placeOrder");
|
||||
// verify the required parameter 'order' is set
|
||||
if (order === undefined || order === null) {
|
||||
throw new Error("Missing the required parameter 'order' when calling placeOrder");
|
||||
}
|
||||
|
||||
|
||||
@@ -218,12 +217,11 @@ export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param {module:model/Order} body order placed for purchasing the pet
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
|
||||
*/
|
||||
placeOrder(body) {
|
||||
return this.placeOrderWithHttpInfo(body)
|
||||
placeOrder(order) {
|
||||
return this.placeOrderWithHttpInfo(order)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
@@ -38,15 +38,15 @@ export default class UserApi {
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {module:model/User} body Created user object
|
||||
* @param {module:model/User} user Created user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUserWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
createUserWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUser");
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUser");
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -74,11 +74,11 @@ export default class UserApi {
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {module:model/User} body Created user object
|
||||
* @param {module:model/User} user Created user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUser(body) {
|
||||
return this.createUserWithHttpInfo(body)
|
||||
createUser(user) {
|
||||
return this.createUserWithHttpInfo(user)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -87,16 +87,15 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUsersWithArrayInputWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
createUsersWithArrayInputWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +110,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -123,12 +122,11 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUsersWithArrayInput(body) {
|
||||
return this.createUsersWithArrayInputWithHttpInfo(body)
|
||||
createUsersWithArrayInput(user) {
|
||||
return this.createUsersWithArrayInputWithHttpInfo(user)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -137,16 +135,15 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUsersWithListInputWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
createUsersWithListInputWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +158,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -173,12 +170,11 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {Array.<module:model/User>} body List of user object
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUsersWithListInput(body) {
|
||||
return this.createUsersWithListInputWithHttpInfo(body)
|
||||
createUsersWithListInput(user) {
|
||||
return this.createUsersWithListInputWithHttpInfo(user)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -212,7 +208,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -238,8 +234,7 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response
|
||||
*/
|
||||
getUserByNameWithHttpInfo(username) {
|
||||
@@ -275,8 +270,7 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User}
|
||||
*/
|
||||
getUserByName(username) {
|
||||
@@ -289,10 +283,9 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param {String} username The user name for login
|
||||
* @param {String} password The password for login in clear text
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link 'String'} and HTTP response
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link String} and HTTP response
|
||||
*/
|
||||
loginUserWithHttpInfo(username, password) {
|
||||
let postBody = null;
|
||||
@@ -322,7 +315,7 @@ export default class UserApi {
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let returnType = 'String';
|
||||
let returnType = String;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/user/login', 'GET',
|
||||
@@ -333,10 +326,9 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param {String} username The user name for login
|
||||
* @param {String} password The password for login in clear text
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link 'String'}
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link String}
|
||||
*/
|
||||
loginUser(username, password) {
|
||||
return this.loginUserWithHttpInfo(username, password)
|
||||
@@ -348,7 +340,6 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
logoutUserWithHttpInfo() {
|
||||
@@ -366,7 +357,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -378,7 +369,6 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
logoutUser() {
|
||||
@@ -393,20 +383,20 @@ export default class UserApi {
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username name that need to be deleted
|
||||
* @param {module:model/User} body Updated user object
|
||||
* @param {module:model/User} user Updated user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
updateUserWithHttpInfo(username, body) {
|
||||
let postBody = body;
|
||||
updateUserWithHttpInfo(username, user) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
@@ -422,7 +412,7 @@ export default class UserApi {
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/xml', 'application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
@@ -436,11 +426,11 @@ export default class UserApi {
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username name that need to be deleted
|
||||
* @param {module:model/User} body Updated user object
|
||||
* @param {module:model/User} user Updated user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
updateUser(username, body) {
|
||||
return this.updateUserWithHttpInfo(username, body)
|
||||
updateUser(username, user) {
|
||||
return this.updateUserWithHttpInfo(username, user)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user