Use JS ES6 as the default (#1825)

* set JS ES6 as the default

* update doc
This commit is contained in:
William Cheng 2019-01-07 11:43:11 +08:00 committed by GitHub
parent 651395d426
commit f0f214743e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 725 additions and 630 deletions

View File

@ -29,7 +29,6 @@ fi
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \
-i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \
-o samples/client/petstore/javascript-es6 \
--additional-properties useES6=true $@"
-o samples/client/petstore/javascript-es6 $@"
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags

19
docs/generators/c.md Normal file
View File

@ -0,0 +1,19 @@
CONFIG OPTIONS for c
sortParamsByRequiredFlag
Sort method arguments to place required parameters before optional parameters. (Default: true)
ensureUniqueParams
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
allowUnicodeIdentifiers
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
prependFormOrBodyParameters
Add form or body parameters to the beginning of the parameter list. (Default: false)
hideGenerationTimestamp
Hides the generation timestamp when files are generated. (Default: true)
Back to the [generators list](README.md)

View File

@ -0,0 +1,25 @@
CONFIG OPTIONS for cpp-qt5-client
sortParamsByRequiredFlag
Sort method arguments to place required parameters before optional parameters. (Default: true)
ensureUniqueParams
Whether to ensure parameter names are unique in an operation (rename parameters that are not). (Default: true)
allowUnicodeIdentifiers
boolean, toggles whether unicode identifiers are allowed in names or not, default is false (Default: false)
prependFormOrBodyParameters
Add form or body parameters to the beginning of the parameter list. (Default: false)
cppNamespace
C++ namespace (convention: name::space::for::api). (Default: OpenAPI)
cppNamespace
C++ namespace (convention: name::space::for::api). (Default: OpenAPI)
optionalProjectFile
Generate client.pri. (Default: true)
Back to the [generators list](README.md)

View File

@ -0,0 +1,10 @@
CONFIG OPTIONS for erlang-proper
packageName
Erlang application name (convention: lowercase). (Default: openapi)
packageName
Erlang application version (Default: 1.0.0)
Back to the [generators list](README.md)

View File

@ -0,0 +1,13 @@
CONFIG OPTIONS for graphql-schema
packageName
GraphQL package name (convention: lowercase). (Default: openapi2graphql)
packageVersion
GraphQL package version. (Default: 1.0.0)
hideGenerationTimestamp
Hides the generation timestamp when files are generated. (Default: true)
Back to the [generators list](README.md)

View File

@ -0,0 +1,13 @@
CONFIG OPTIONS for graphql-server
packageName
GraphQL express server package name (convention: lowercase). (Default: openapi3graphql-server)
packageVersion
GraphQL express server package version. (Default: 1.0.0)
hideGenerationTimestamp
Hides the generation timestamp when files are generated. (Default: true)
Back to the [generators list](README.md)

View File

@ -59,7 +59,7 @@ CONFIG OPTIONS for javascript
Hides the generation timestamp when files are generated. (Default: true)
useES6
use JavaScript ES6 (ECMAScript 6) (beta). Default is ES5. (Default: false)
use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6. (Default: true)
modelPropertyNaming
Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)

View File

@ -103,7 +103,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
protected String modelDocPath = "docs/";
protected String apiTestPath = "api/";
protected String modelTestPath = "model/";
protected boolean useES6 = false; // default is ES5
protected boolean useES6 = true; // default is ES5
private String modelPropertyNaming = "camelCase";
public JavascriptClientCodegen() {
@ -207,8 +207,8 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString()));
cliOptions.add(new CliOption(USE_ES6,
"use JavaScript ES6 (ECMAScript 6) (beta). Default is ES5.")
.defaultValue(Boolean.FALSE.toString()));
"use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.")
.defaultValue(Boolean.TRUE.toString()));
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));
}

View File

@ -72,7 +72,7 @@ var OpenApiPetstore = require('open_api_petstore');
var api = new OpenApiPetstore.AnotherFakeApi()
var client = new OpenApiPetstore.Client(); // {Client} client model
var body = new OpenApiPetstore.Client(); // {Client} client model
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -80,7 +80,7 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
api.call123testSpecialTags(client, callback);
api.call123testSpecialTags(body, callback);
```

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(client)
> Client call123testSpecialTags(body)
To test special tags
@ -20,8 +20,8 @@ To test special tags and operation ID starting with number
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.AnotherFakeApi();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(client, (error, data, response) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -34,7 +34,7 @@ apiInstance.call123testSpecialTags(client, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -76,7 +76,7 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let opts = {
'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
'body': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
};
apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => {
if (error) {
@ -91,7 +91,7 @@ apiInstance.fakeOuterCompositeSerialize(opts, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -196,7 +196,7 @@ No authorization required
<a name="testBodyWithFileSchema"></a>
# **testBodyWithFileSchema**
> testBodyWithFileSchema(fileSchemaTestClass)
> testBodyWithFileSchema(body)
@ -207,8 +207,8 @@ For this test, the body for this request much reference a schema named &#x60;Fil
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => {
let body = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -221,7 +221,7 @@ apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -238,7 +238,7 @@ No authorization required
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
> testBodyWithQueryParams(query, body)
@ -248,8 +248,8 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let query = "query_example"; // String |
let user = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => {
let body = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -263,7 +263,7 @@ apiInstance.testBodyWithQueryParams(query, user, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**user** | [**User**](User.md)| |
**body** | [**User**](User.md)| |
### Return type
@ -280,7 +280,7 @@ No authorization required
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(client)
> Client testClientModel(body)
To test \&quot;client\&quot; model
@ -291,8 +291,8 @@ To test \&quot;client\&quot; model
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(client, (error, data, response) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -305,7 +305,7 @@ apiInstance.testClientModel(client, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type
@ -510,7 +510,7 @@ No authorization required
<a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties**
> testInlineAdditionalProperties(requestBody)
> testInlineAdditionalProperties(param)
test inline additionalProperties
@ -519,8 +519,8 @@ test inline additionalProperties
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let requestBody = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response) => {
let param = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(param, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -533,7 +533,7 @@ apiInstance.testInlineAdditionalProperties(requestBody, (error, data, response)
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: String}**](String.md)| request body |
**param** | [**{String: String}**](String.md)| request body |
### Return type

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="testClassname"></a>
# **testClassname**
> Client testClassname(client)
> Client testClassname(body)
To test class name in snake case
@ -27,8 +27,8 @@ api_key_query.apiKey = 'YOUR API KEY';
//api_key_query.apiKeyPrefix = 'Token';
let apiInstance = new OpenApiPetstore.FakeClassnameTags123Api();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(client, (error, data, response) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -41,7 +41,7 @@ apiInstance.testClassname(client, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -13,6 +13,10 @@ Name | Type | Description | Notes
## Enum: {String: String}
* `UPPER` (value: `"UPPER"`)
* `lower` (value: `"lower"`)

View File

@ -17,7 +17,7 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(pet)
> addPet(body)
Add a new pet to the store
@ -31,8 +31,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new OpenApiPetstore.PetApi();
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(pet, (error, data, response) => {
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -45,7 +45,7 @@ apiInstance.addPet(pet, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -254,7 +254,7 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(pet)
> updatePet(body)
Update an existing pet
@ -268,8 +268,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new OpenApiPetstore.PetApi();
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(pet, (error, data, response) => {
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -282,7 +282,7 @@ apiInstance.updatePet(pet, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@ -141,7 +141,7 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(order)
> Order placeOrder(body)
Place an order for a pet
@ -150,8 +150,8 @@ Place an order for a pet
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.StoreApi();
let order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(order, (error, data, response) => {
let body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -164,7 +164,7 @@ apiInstance.placeOrder(order, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(user)
> createUser(body)
Create user
@ -27,8 +27,8 @@ This can only be done by the logged in user.
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(user, (error, data, response) => {
let body = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -41,7 +41,7 @@ apiInstance.createUser(user, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@ -58,7 +58,7 @@ No authorization required
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(user)
> createUsersWithArrayInput(body)
Creates list of users with given input array
@ -67,8 +67,8 @@ Creates list of users with given input array
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(user, (error, data, response) => {
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -81,7 +81,7 @@ apiInstance.createUsersWithArrayInput(user, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -98,7 +98,7 @@ No authorization required
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(user)
> createUsersWithListInput(body)
Creates list of users with given input array
@ -107,8 +107,8 @@ Creates list of users with given input array
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(user, (error, data, response) => {
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -121,7 +121,7 @@ apiInstance.createUsersWithListInput(user, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -298,7 +298,7 @@ No authorization required
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, user)
> updateUser(username, body)
Updated user
@ -310,8 +310,8 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let username = "username_example"; // String | name that need to be deleted
let user = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, user, (error, data, response) => {
let body = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, body, (error, data, response) => {
if (error) {
console.error(error);
} else {
@ -325,7 +325,7 @@ apiInstance.updateUser(username, user, (error, data, response) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type

View File

@ -45,16 +45,16 @@ export default class AnotherFakeApi {
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
call123testSpecialTags(client, callback) {
let postBody = client;
call123testSpecialTags(body, callback) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
}

View File

@ -89,13 +89,13 @@ export default class FakeApi {
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body Input composite as post body
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterComposite}
*/
fakeOuterCompositeSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['outerComposite'];
let postBody = opts['body'];
let pathParams = {
@ -211,15 +211,15 @@ export default class FakeApi {
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithFileSchema(fileSchemaTestClass, callback) {
let postBody = fileSchemaTestClass;
testBodyWithFileSchema(body, callback) {
let postBody = body;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithFileSchema");
}
@ -254,20 +254,20 @@ export default class FakeApi {
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithQueryParams(query, user, callback) {
let postBody = user;
testBodyWithQueryParams(query, body, callback) {
let postBody = body;
// 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");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithQueryParams");
}
@ -304,16 +304,16 @@ export default class FakeApi {
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClientModel(client, callback) {
let postBody = client;
testClientModel(body, callback) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClientModel");
}
@ -559,15 +559,15 @@ export default class FakeApi {
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
*/
testInlineAdditionalProperties(requestBody, callback) {
let postBody = requestBody;
testInlineAdditionalProperties(param, callback) {
let postBody = param;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
// verify the required parameter 'param' is set
if (param === undefined || param === null) {
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
}

View File

@ -45,16 +45,16 @@ export default class FakeClassnameTags123Api {
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClassname(client, callback) {
let postBody = client;
testClassname(body, callback) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClassname");
}

View File

@ -45,15 +45,15 @@ export default class PetApi {
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
*/
addPet(pet, callback) {
let postBody = pet;
addPet(body, callback) {
let postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling addPet");
}
@ -274,15 +274,15 @@ export default class PetApi {
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
*/
updatePet(pet, callback) {
let postBody = pet;
updatePet(body, callback) {
let postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updatePet");
}

View File

@ -174,16 +174,16 @@ export default class StoreApi {
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body order placed for purchasing the pet
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
placeOrder(order, callback) {
let postBody = order;
placeOrder(body, callback) {
let postBody = body;
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling placeOrder");
}

View File

@ -45,15 +45,15 @@ export default class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUser(user, callback) {
let postBody = user;
createUser(body, callback) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUser");
}
@ -88,15 +88,15 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithArrayInput(user, callback) {
let postBody = user;
createUsersWithArrayInput(body, callback) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
}
@ -131,15 +131,15 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithListInput(user, callback) {
let postBody = user;
createUsersWithListInput(body, callback) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
}
@ -355,20 +355,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} user Updated user object
* @param {module:model/User} body Updated user object
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
updateUser(username, user, callback) {
let postBody = user;
updateUser(username, body, callback) {
let postBody = body;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updateUser");
}

View File

@ -72,8 +72,8 @@ var OpenApiPetstore = require('open_api_petstore');
var api = new OpenApiPetstore.AnotherFakeApi()
var client = new OpenApiPetstore.Client(); // {Client} client model
api.call123testSpecialTags(client).then(function(data) {
var body = new OpenApiPetstore.Client(); // {Client} client model
api.call123testSpecialTags(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(client)
> Client call123testSpecialTags(body)
To test special tags
@ -20,8 +20,8 @@ To test special tags and operation ID starting with number
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.AnotherFakeApi();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(client).then((data) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -33,7 +33,7 @@ apiInstance.call123testSpecialTags(client).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -75,7 +75,7 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let opts = {
'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
'body': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
};
apiInstance.fakeOuterCompositeSerialize(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
@ -89,7 +89,7 @@ apiInstance.fakeOuterCompositeSerialize(opts).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -192,7 +192,7 @@ No authorization required
<a name="testBodyWithFileSchema"></a>
# **testBodyWithFileSchema**
> testBodyWithFileSchema(fileSchemaTestClass)
> testBodyWithFileSchema(body)
@ -203,8 +203,8 @@ For this test, the body for this request much reference a schema named &#x60;Fil
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(() => {
let body = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -216,7 +216,7 @@ apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -233,7 +233,7 @@ No authorization required
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
> testBodyWithQueryParams(query, body)
@ -243,8 +243,8 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let query = "query_example"; // String |
let user = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, user).then(() => {
let body = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -257,7 +257,7 @@ apiInstance.testBodyWithQueryParams(query, user).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**user** | [**User**](User.md)| |
**body** | [**User**](User.md)| |
### Return type
@ -274,7 +274,7 @@ No authorization required
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(client)
> Client testClientModel(body)
To test \&quot;client\&quot; model
@ -285,8 +285,8 @@ To test \&quot;client\&quot; model
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(client).then((data) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -298,7 +298,7 @@ apiInstance.testClientModel(client).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type
@ -500,7 +500,7 @@ No authorization required
<a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties**
> testInlineAdditionalProperties(requestBody)
> testInlineAdditionalProperties(param)
test inline additionalProperties
@ -509,8 +509,8 @@ test inline additionalProperties
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let requestBody = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(requestBody).then(() => {
let param = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(param).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -522,7 +522,7 @@ apiInstance.testInlineAdditionalProperties(requestBody).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: String}**](String.md)| request body |
**param** | [**{String: String}**](String.md)| request body |
### Return type

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="testClassname"></a>
# **testClassname**
> Client testClassname(client)
> Client testClassname(body)
To test class name in snake case
@ -27,8 +27,8 @@ api_key_query.apiKey = 'YOUR API KEY';
//api_key_query.apiKeyPrefix = 'Token';
let apiInstance = new OpenApiPetstore.FakeClassnameTags123Api();
let client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(client).then((data) => {
let body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -40,7 +40,7 @@ apiInstance.testClassname(client).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -13,6 +13,10 @@ Name | Type | Description | Notes
## Enum: {String: String}
* `UPPER` (value: `"UPPER"`)
* `lower` (value: `"lower"`)

View File

@ -17,7 +17,7 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(pet)
> addPet(body)
Add a new pet to the store
@ -31,8 +31,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new OpenApiPetstore.PetApi();
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(pet).then(() => {
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -44,7 +44,7 @@ apiInstance.addPet(pet).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -249,7 +249,7 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(pet)
> updatePet(body)
Update an existing pet
@ -263,8 +263,8 @@ let petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new OpenApiPetstore.PetApi();
let pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(pet).then(() => {
let body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -276,7 +276,7 @@ apiInstance.updatePet(pet).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@ -138,7 +138,7 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(order)
> Order placeOrder(body)
Place an order for a pet
@ -147,8 +147,8 @@ Place an order for a pet
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.StoreApi();
let order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(order).then((data) => {
let body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(body).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
@ -160,7 +160,7 @@ apiInstance.placeOrder(order).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(user)
> createUser(body)
Create user
@ -27,8 +27,8 @@ This can only be done by the logged in user.
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(user).then(() => {
let body = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -40,7 +40,7 @@ apiInstance.createUser(user).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@ -57,7 +57,7 @@ No authorization required
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(user)
> createUsersWithArrayInput(body)
Creates list of users with given input array
@ -66,8 +66,8 @@ Creates list of users with given input array
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(user).then(() => {
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -79,7 +79,7 @@ apiInstance.createUsersWithArrayInput(user).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -96,7 +96,7 @@ No authorization required
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(user)
> createUsersWithListInput(body)
Creates list of users with given input array
@ -105,8 +105,8 @@ Creates list of users with given input array
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(user).then(() => {
let body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -118,7 +118,7 @@ apiInstance.createUsersWithListInput(user).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -291,7 +291,7 @@ No authorization required
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, user)
> updateUser(username, body)
Updated user
@ -303,8 +303,8 @@ import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.UserApi();
let username = "username_example"; // String | name that need to be deleted
let user = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, user).then(() => {
let body = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, body).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
@ -317,7 +317,7 @@ apiInstance.updateUser(username, user).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type

View File

@ -38,15 +38,15 @@ export default class AnotherFakeApi {
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
call123testSpecialTagsWithHttpInfo(client) {
let postBody = client;
call123testSpecialTagsWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
}
@ -74,11 +74,11 @@ export default class AnotherFakeApi {
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
call123testSpecialTags(client) {
return this.call123testSpecialTagsWithHttpInfo(client)
call123testSpecialTags(body) {
return this.call123testSpecialTagsWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -87,12 +87,12 @@ export default class FakeApi {
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body 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['outerComposite'];
let postBody = opts['body'];
let pathParams = {
@ -119,7 +119,7 @@ export default class FakeApi {
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body Input composite as post body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterComposite}
*/
fakeOuterCompositeSerialize(opts) {
@ -224,15 +224,15 @@ export default class FakeApi {
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) {
let postBody = fileSchemaTestClass;
testBodyWithFileSchemaWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithFileSchema");
}
@ -259,11 +259,11 @@ export default class FakeApi {
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
testBodyWithFileSchema(fileSchemaTestClass) {
return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
testBodyWithFileSchema(body) {
return this.testBodyWithFileSchemaWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -272,20 +272,20 @@ export default class FakeApi {
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
testBodyWithQueryParamsWithHttpInfo(query, user) {
let postBody = user;
testBodyWithQueryParamsWithHttpInfo(query, body) {
let postBody = body;
// 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");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithQueryParams");
}
@ -313,11 +313,11 @@ export default class FakeApi {
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
testBodyWithQueryParams(query, user) {
return this.testBodyWithQueryParamsWithHttpInfo(query, user)
testBodyWithQueryParams(query, body) {
return this.testBodyWithQueryParamsWithHttpInfo(query, body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -327,15 +327,15 @@ export default class FakeApi {
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
testClientModelWithHttpInfo(client) {
let postBody = client;
testClientModelWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClientModel");
}
@ -363,11 +363,11 @@ export default class FakeApi {
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
testClientModel(client) {
return this.testClientModelWithHttpInfo(client)
testClientModel(body) {
return this.testClientModelWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -633,15 +633,15 @@ export default class FakeApi {
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
testInlineAdditionalPropertiesWithHttpInfo(requestBody) {
let postBody = requestBody;
testInlineAdditionalPropertiesWithHttpInfo(param) {
let postBody = param;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
// verify the required parameter 'param' is set
if (param === undefined || param === null) {
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
}
@ -668,11 +668,11 @@ export default class FakeApi {
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
testInlineAdditionalProperties(requestBody) {
return this.testInlineAdditionalPropertiesWithHttpInfo(requestBody)
testInlineAdditionalProperties(param) {
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -38,15 +38,15 @@ export default class FakeClassnameTags123Api {
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
testClassnameWithHttpInfo(client) {
let postBody = client;
testClassnameWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClassname");
}
@ -74,11 +74,11 @@ export default class FakeClassnameTags123Api {
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
testClassname(client) {
return this.testClassnameWithHttpInfo(client)
testClassname(body) {
return this.testClassnameWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -38,15 +38,15 @@ export default class PetApi {
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body 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(pet) {
let postBody = pet;
addPetWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling addPet");
}
@ -73,11 +73,11 @@ export default class PetApi {
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
addPet(pet) {
return this.addPetWithHttpInfo(pet)
addPet(body) {
return this.addPetWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -294,15 +294,15 @@ export default class PetApi {
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body 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(pet) {
let postBody = pet;
updatePetWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updatePet");
}
@ -329,11 +329,11 @@ export default class PetApi {
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
updatePet(pet) {
return this.updatePetWithHttpInfo(pet)
updatePet(body) {
return this.updatePetWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -182,15 +182,15 @@ export default class StoreApi {
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body 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(order) {
let postBody = order;
placeOrderWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling placeOrder");
}
@ -217,11 +217,11 @@ export default class StoreApi {
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body order placed for purchasing the pet
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
*/
placeOrder(order) {
return this.placeOrderWithHttpInfo(order)
placeOrder(body) {
return this.placeOrderWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -38,15 +38,15 @@ export default class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
createUserWithHttpInfo(user) {
let postBody = user;
createUserWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUser");
}
@ -74,11 +74,11 @@ export default class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
createUser(user) {
return this.createUserWithHttpInfo(user)
createUser(body) {
return this.createUserWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -87,15 +87,15 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
createUsersWithArrayInputWithHttpInfo(user) {
let postBody = user;
createUsersWithArrayInputWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
}
@ -122,11 +122,11 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
createUsersWithArrayInput(user) {
return this.createUsersWithArrayInputWithHttpInfo(user)
createUsersWithArrayInput(body) {
return this.createUsersWithArrayInputWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -135,15 +135,15 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
createUsersWithListInputWithHttpInfo(user) {
let postBody = user;
createUsersWithListInputWithHttpInfo(body) {
let postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
}
@ -170,11 +170,11 @@ export default class UserApi {
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
createUsersWithListInput(user) {
return this.createUsersWithListInputWithHttpInfo(user)
createUsersWithListInput(body) {
return this.createUsersWithListInputWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -383,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} user Updated user object
* @param {module:model/User} body Updated user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
updateUserWithHttpInfo(username, user) {
let postBody = user;
updateUserWithHttpInfo(username, body) {
let postBody = body;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updateUser");
}
@ -426,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} user Updated user object
* @param {module:model/User} body Updated user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
updateUser(username, user) {
return this.updateUserWithHttpInfo(username, user)
updateUser(username, body) {
return this.updateUserWithHttpInfo(username, body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -96,8 +96,8 @@ Please follow the [installation](#installation) instruction and execute the foll
var OpenApiPetstore = require('open_api_petstore');
var api = new OpenApiPetstore.AnotherFakeApi()
var client = new OpenApiPetstore.Client(); // {Client} client model
api.call123testSpecialTags(client).then(function(data) {
var body = new OpenApiPetstore.Client(); // {Client} client model
api.call123testSpecialTags(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(client)
> Client call123testSpecialTags(body)
To test special tags
@ -20,8 +20,8 @@ To test special tags and operation ID starting with number
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.AnotherFakeApi();
var client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(client).then(function(data) {
var body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.call123testSpecialTags(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
@ -33,7 +33,7 @@ apiInstance.call123testSpecialTags(client).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -75,7 +75,7 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var opts = {
'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
'body': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
};
apiInstance.fakeOuterCompositeSerialize(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
@ -89,7 +89,7 @@ apiInstance.fakeOuterCompositeSerialize(opts).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -192,7 +192,7 @@ No authorization required
<a name="testBodyWithFileSchema"></a>
# **testBodyWithFileSchema**
> testBodyWithFileSchema(fileSchemaTestClass)
> testBodyWithFileSchema(body)
@ -203,8 +203,8 @@ For this test, the body for this request much reference a schema named &#x60;Fil
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(function() {
var body = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
apiInstance.testBodyWithFileSchema(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -216,7 +216,7 @@ apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -233,7 +233,7 @@ No authorization required
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
> testBodyWithQueryParams(query, body)
@ -243,8 +243,8 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var query = "query_example"; // String |
var user = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, user).then(function() {
var body = new OpenApiPetstore.User(); // User |
apiInstance.testBodyWithQueryParams(query, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -257,7 +257,7 @@ apiInstance.testBodyWithQueryParams(query, user).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**user** | [**User**](User.md)| |
**body** | [**User**](User.md)| |
### Return type
@ -274,7 +274,7 @@ No authorization required
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(client)
> Client testClientModel(body)
To test \&quot;client\&quot; model
@ -285,8 +285,8 @@ To test \&quot;client\&quot; model
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(client).then(function(data) {
var body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClientModel(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
@ -298,7 +298,7 @@ apiInstance.testClientModel(client).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type
@ -500,7 +500,7 @@ No authorization required
<a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties**
> testInlineAdditionalProperties(requestBody)
> testInlineAdditionalProperties(param)
test inline additionalProperties
@ -509,8 +509,8 @@ test inline additionalProperties
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var requestBody = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(requestBody).then(function() {
var param = {key: "null"}; // {String: String} | request body
apiInstance.testInlineAdditionalProperties(param).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -522,7 +522,7 @@ apiInstance.testInlineAdditionalProperties(requestBody).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: String}**](String.md)| request body |
**param** | [**{String: String}**](String.md)| request body |
### Return type

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="testClassname"></a>
# **testClassname**
> Client testClassname(client)
> Client testClassname(body)
To test class name in snake case
@ -26,8 +26,8 @@ api_key_query.apiKey = 'YOUR API KEY';
//api_key_query.apiKeyPrefix = 'Token';
var apiInstance = new OpenApiPetstore.FakeClassnameTags123Api();
var client = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(client).then(function(data) {
var body = new OpenApiPetstore.Client(); // Client | client model
apiInstance.testClassname(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
@ -39,7 +39,7 @@ apiInstance.testClassname(client).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -13,6 +13,10 @@ Name | Type | Description | Notes
## Enum: {String: String}
* `UPPER` (value: `"UPPER"`)
* `lower` (value: `"lower"`)

View File

@ -17,7 +17,7 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(pet)
> addPet(body)
Add a new pet to the store
@ -30,8 +30,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OpenApiPetstore.PetApi();
var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(pet).then(function() {
var body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.addPet(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -43,7 +43,7 @@ apiInstance.addPet(pet).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -244,7 +244,7 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(pet)
> updatePet(body)
Update an existing pet
@ -257,8 +257,8 @@ var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OpenApiPetstore.PetApi();
var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(pet).then(function() {
var body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
apiInstance.updatePet(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -270,7 +270,7 @@ apiInstance.updatePet(pet).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@ -137,7 +137,7 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(order)
> Order placeOrder(body)
Place an order for a pet
@ -146,8 +146,8 @@ Place an order for a pet
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.StoreApi();
var order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(order).then(function(data) {
var body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
apiInstance.placeOrder(body).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
@ -159,7 +159,7 @@ apiInstance.placeOrder(order).then(function(data) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(user)
> createUser(body)
Create user
@ -27,8 +27,8 @@ This can only be done by the logged in user.
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(user).then(function() {
var body = new OpenApiPetstore.User(); // User | Created user object
apiInstance.createUser(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -40,7 +40,7 @@ apiInstance.createUser(user).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@ -57,7 +57,7 @@ No authorization required
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(user)
> createUsersWithArrayInput(body)
Creates list of users with given input array
@ -66,8 +66,8 @@ Creates list of users with given input array
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(user).then(function() {
var body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithArrayInput(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -79,7 +79,7 @@ apiInstance.createUsersWithArrayInput(user).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -96,7 +96,7 @@ No authorization required
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(user)
> createUsersWithListInput(body)
Creates list of users with given input array
@ -105,8 +105,8 @@ Creates list of users with given input array
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(user).then(function() {
var body = [new OpenApiPetstore.User()]; // [User] | List of user object
apiInstance.createUsersWithListInput(body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -118,7 +118,7 @@ apiInstance.createUsersWithListInput(user).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -291,7 +291,7 @@ No authorization required
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, user)
> updateUser(username, body)
Updated user
@ -303,8 +303,8 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var username = "username_example"; // String | name that need to be deleted
var user = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, user).then(function() {
var body = new OpenApiPetstore.User(); // User | Updated user object
apiInstance.updateUser(username, body).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
@ -317,7 +317,7 @@ apiInstance.updateUser(username, user).then(function() {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type

View File

@ -51,15 +51,15 @@
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
this.call123testSpecialTagsWithHttpInfo = function(client) {
var postBody = client;
this.call123testSpecialTagsWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
}
@ -89,11 +89,11 @@
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
this.call123testSpecialTags = function(client) {
return this.call123testSpecialTagsWithHttpInfo(client)
this.call123testSpecialTags = function(body) {
return this.call123testSpecialTagsWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -99,12 +99,12 @@
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body 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
*/
this.fakeOuterCompositeSerializeWithHttpInfo = function(opts) {
opts = opts || {};
var postBody = opts['outerComposite'];
var postBody = opts['body'];
var pathParams = {
@ -133,7 +133,7 @@
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body Input composite as post body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterComposite}
*/
this.fakeOuterCompositeSerialize = function(opts) {
@ -242,15 +242,15 @@
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.testBodyWithFileSchemaWithHttpInfo = function(fileSchemaTestClass) {
var postBody = fileSchemaTestClass;
this.testBodyWithFileSchemaWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithFileSchema");
}
@ -279,11 +279,11 @@
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.testBodyWithFileSchema = function(fileSchemaTestClass) {
return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
this.testBodyWithFileSchema = function(body) {
return this.testBodyWithFileSchemaWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -292,20 +292,20 @@
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.testBodyWithQueryParamsWithHttpInfo = function(query, user) {
var postBody = user;
this.testBodyWithQueryParamsWithHttpInfo = function(query, body) {
var postBody = body;
// 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");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithQueryParams");
}
@ -335,11 +335,11 @@
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.testBodyWithQueryParams = function(query, user) {
return this.testBodyWithQueryParamsWithHttpInfo(query, user)
this.testBodyWithQueryParams = function(query, body) {
return this.testBodyWithQueryParamsWithHttpInfo(query, body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -349,15 +349,15 @@
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
this.testClientModelWithHttpInfo = function(client) {
var postBody = client;
this.testClientModelWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClientModel");
}
@ -387,11 +387,11 @@
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
this.testClientModel = function(client) {
return this.testClientModelWithHttpInfo(client)
this.testClientModel = function(body) {
return this.testClientModelWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -666,15 +666,15 @@
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.testInlineAdditionalPropertiesWithHttpInfo = function(requestBody) {
var postBody = requestBody;
this.testInlineAdditionalPropertiesWithHttpInfo = function(param) {
var postBody = param;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
// verify the required parameter 'param' is set
if (param === undefined || param === null) {
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
}
@ -703,11 +703,11 @@
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.testInlineAdditionalProperties = function(requestBody) {
return this.testInlineAdditionalPropertiesWithHttpInfo(requestBody)
this.testInlineAdditionalProperties = function(param) {
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -51,15 +51,15 @@
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
*/
this.testClassnameWithHttpInfo = function(client) {
var postBody = client;
this.testClassnameWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClassname");
}
@ -89,11 +89,11 @@
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
*/
this.testClassname = function(client) {
return this.testClassnameWithHttpInfo(client)
this.testClassname = function(body) {
return this.testClassnameWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -50,15 +50,15 @@
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body 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
*/
this.addPetWithHttpInfo = function(pet) {
var postBody = pet;
this.addPetWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling addPet");
}
@ -87,11 +87,11 @@
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.addPet = function(pet) {
return this.addPetWithHttpInfo(pet)
this.addPet = function(body) {
return this.addPetWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -322,15 +322,15 @@
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body 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
*/
this.updatePetWithHttpInfo = function(pet) {
var postBody = pet;
this.updatePetWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updatePet");
}
@ -359,11 +359,11 @@
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.updatePet = function(pet) {
return this.updatePetWithHttpInfo(pet)
this.updatePet = function(body) {
return this.updatePetWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -201,15 +201,15 @@
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body 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
*/
this.placeOrderWithHttpInfo = function(order) {
var postBody = order;
this.placeOrderWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling placeOrder");
}
@ -238,11 +238,11 @@
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body order placed for purchasing the pet
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
*/
this.placeOrder = function(order) {
return this.placeOrderWithHttpInfo(order)
this.placeOrder = function(body) {
return this.placeOrderWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -51,15 +51,15 @@
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.createUserWithHttpInfo = function(user) {
var postBody = user;
this.createUserWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUser");
}
@ -89,11 +89,11 @@
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.createUser = function(user) {
return this.createUserWithHttpInfo(user)
this.createUser = function(body) {
return this.createUserWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -102,15 +102,15 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.createUsersWithArrayInputWithHttpInfo = function(user) {
var postBody = user;
this.createUsersWithArrayInputWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
}
@ -139,11 +139,11 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.createUsersWithArrayInput = function(user) {
return this.createUsersWithArrayInputWithHttpInfo(user)
this.createUsersWithArrayInput = function(body) {
return this.createUsersWithArrayInputWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -152,15 +152,15 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.createUsersWithListInputWithHttpInfo = function(user) {
var postBody = user;
this.createUsersWithListInputWithHttpInfo = function(body) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
}
@ -189,11 +189,11 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.createUsersWithListInput = function(user) {
return this.createUsersWithListInputWithHttpInfo(user)
this.createUsersWithListInput = function(body) {
return this.createUsersWithListInputWithHttpInfo(body)
.then(function(response_and_data) {
return response_and_data.data;
});
@ -410,20 +410,20 @@
* Updated user
* This can only be done by the logged in user.
* @param {String} username name that need to be deleted
* @param {module:model/User} user Updated user object
* @param {module:model/User} body Updated user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
*/
this.updateUserWithHttpInfo = function(username, user) {
var postBody = user;
this.updateUserWithHttpInfo = function(username, body) {
var postBody = body;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updateUser");
}
@ -455,11 +455,11 @@
* Updated user
* This can only be done by the logged in user.
* @param {String} username name that need to be deleted
* @param {module:model/User} user Updated user object
* @param {module:model/User} body Updated user object
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
*/
this.updateUser = function(username, user) {
return this.updateUserWithHttpInfo(username, user)
this.updateUser = function(username, body) {
return this.updateUserWithHttpInfo(username, body)
.then(function(response_and_data) {
return response_and_data.data;
});

View File

@ -96,7 +96,7 @@ Please follow the [installation](#installation) instruction and execute the foll
var OpenApiPetstore = require('open_api_petstore');
var api = new OpenApiPetstore.AnotherFakeApi()
var client = new OpenApiPetstore.Client(); // {Client} client model
var body = new OpenApiPetstore.Client(); // {Client} client model
var callback = function(error, data, response) {
if (error) {
@ -105,7 +105,7 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
api.call123testSpecialTags(client, callback);
api.call123testSpecialTags(body, callback);
```

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(client)
> Client call123testSpecialTags(body)
To test special tags
@ -20,7 +20,7 @@ To test special tags and operation ID starting with number
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.AnotherFakeApi();
var client = new OpenApiPetstore.Client(); // Client | client model
var body = new OpenApiPetstore.Client(); // Client | client model
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -28,14 +28,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.call123testSpecialTags(client, callback);
apiInstance.call123testSpecialTags(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -77,7 +77,7 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var opts = {
'outerComposite': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
'body': new OpenApiPetstore.OuterComposite() // OuterComposite | Input composite as post body
};
var callback = function(error, data, response) {
if (error) {
@ -93,7 +93,7 @@ apiInstance.fakeOuterCompositeSerialize(opts, callback);
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type
@ -200,7 +200,7 @@ No authorization required
<a name="testBodyWithFileSchema"></a>
# **testBodyWithFileSchema**
> testBodyWithFileSchema(fileSchemaTestClass)
> testBodyWithFileSchema(body)
@ -211,7 +211,7 @@ For this test, the body for this request much reference a schema named &#x60;Fil
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
var body = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -219,14 +219,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.testBodyWithFileSchema(fileSchemaTestClass, callback);
apiInstance.testBodyWithFileSchema(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type
@ -243,7 +243,7 @@ No authorization required
<a name="testBodyWithQueryParams"></a>
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, user)
> testBodyWithQueryParams(query, body)
@ -253,7 +253,7 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var query = "query_example"; // String |
var user = new OpenApiPetstore.User(); // User |
var body = new OpenApiPetstore.User(); // User |
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -261,7 +261,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.testBodyWithQueryParams(query, user, callback);
apiInstance.testBodyWithQueryParams(query, body, callback);
```
### Parameters
@ -269,7 +269,7 @@ apiInstance.testBodyWithQueryParams(query, user, callback);
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**user** | [**User**](User.md)| |
**body** | [**User**](User.md)| |
### Return type
@ -286,7 +286,7 @@ No authorization required
<a name="testClientModel"></a>
# **testClientModel**
> Client testClientModel(client)
> Client testClientModel(body)
To test \&quot;client\&quot; model
@ -297,7 +297,7 @@ To test \&quot;client\&quot; model
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var client = new OpenApiPetstore.Client(); // Client | client model
var body = new OpenApiPetstore.Client(); // Client | client model
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -305,14 +305,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.testClientModel(client, callback);
apiInstance.testClientModel(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type
@ -520,7 +520,7 @@ No authorization required
<a name="testInlineAdditionalProperties"></a>
# **testInlineAdditionalProperties**
> testInlineAdditionalProperties(requestBody)
> testInlineAdditionalProperties(param)
test inline additionalProperties
@ -529,7 +529,7 @@ test inline additionalProperties
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.FakeApi();
var requestBody = {key: "null"}; // {String: String} | request body
var param = {key: "null"}; // {String: String} | request body
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -537,14 +537,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.testInlineAdditionalProperties(requestBody, callback);
apiInstance.testInlineAdditionalProperties(param, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**requestBody** | [**{String: String}**](String.md)| request body |
**param** | [**{String: String}**](String.md)| request body |
### Return type

View File

@ -9,7 +9,7 @@ Method | HTTP request | Description
<a name="testClassname"></a>
# **testClassname**
> Client testClassname(client)
> Client testClassname(body)
To test class name in snake case
@ -26,7 +26,7 @@ api_key_query.apiKey = 'YOUR API KEY';
//api_key_query.apiKeyPrefix = 'Token';
var apiInstance = new OpenApiPetstore.FakeClassnameTags123Api();
var client = new OpenApiPetstore.Client(); // Client | client model
var body = new OpenApiPetstore.Client(); // Client | client model
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -34,14 +34,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.testClassname(client, callback);
apiInstance.testClassname(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**client** | [**Client**](Client.md)| client model |
**body** | [**Client**](Client.md)| client model |
### Return type

View File

@ -13,6 +13,10 @@ Name | Type | Description | Notes
## Enum: {String: String}
* `UPPER` (value: `"UPPER"`)
* `lower` (value: `"lower"`)

View File

@ -17,7 +17,7 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(pet)
> addPet(body)
Add a new pet to the store
@ -30,7 +30,7 @@ var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OpenApiPetstore.PetApi();
var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
var body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -38,14 +38,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.addPet(pet, callback);
apiInstance.addPet(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@ -254,7 +254,7 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(pet)
> updatePet(body)
Update an existing pet
@ -267,7 +267,7 @@ var petstore_auth = defaultClient.authentications['petstore_auth'];
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new OpenApiPetstore.PetApi();
var pet = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
var body = new OpenApiPetstore.Pet(); // Pet | Pet object that needs to be added to the store
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -275,14 +275,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.updatePet(pet, callback);
apiInstance.updatePet(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type

View File

@ -143,7 +143,7 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(order)
> Order placeOrder(body)
Place an order for a pet
@ -152,7 +152,7 @@ Place an order for a pet
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.StoreApi();
var order = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
var body = new OpenApiPetstore.Order(); // Order | order placed for purchasing the pet
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -160,14 +160,14 @@ var callback = function(error, data, response) {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.placeOrder(order, callback);
apiInstance.placeOrder(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(user)
> createUser(body)
Create user
@ -27,7 +27,7 @@ This can only be done by the logged in user.
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = new OpenApiPetstore.User(); // User | Created user object
var body = new OpenApiPetstore.User(); // User | Created user object
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -35,14 +35,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.createUser(user, callback);
apiInstance.createUser(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@ -59,7 +59,7 @@ No authorization required
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(user)
> createUsersWithArrayInput(body)
Creates list of users with given input array
@ -68,7 +68,7 @@ Creates list of users with given input array
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = [new OpenApiPetstore.User()]; // [User] | List of user object
var body = [new OpenApiPetstore.User()]; // [User] | List of user object
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -76,14 +76,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.createUsersWithArrayInput(user, callback);
apiInstance.createUsersWithArrayInput(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -100,7 +100,7 @@ No authorization required
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(user)
> createUsersWithListInput(body)
Creates list of users with given input array
@ -109,7 +109,7 @@ Creates list of users with given input array
var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var user = [new OpenApiPetstore.User()]; // [User] | List of user object
var body = [new OpenApiPetstore.User()]; // [User] | List of user object
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -117,14 +117,14 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.createUsersWithListInput(user, callback);
apiInstance.createUsersWithListInput(body, callback);
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**[User]**](Array.md)| List of user object |
**body** | [**[User]**](Array.md)| List of user object |
### Return type
@ -305,7 +305,7 @@ No authorization required
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, user)
> updateUser(username, body)
Updated user
@ -317,7 +317,7 @@ var OpenApiPetstore = require('open_api_petstore');
var apiInstance = new OpenApiPetstore.UserApi();
var username = "username_example"; // String | name that need to be deleted
var user = new OpenApiPetstore.User(); // User | Updated user object
var body = new OpenApiPetstore.User(); // User | Updated user object
var callback = function(error, data, response) {
if (error) {
console.error(error);
@ -325,7 +325,7 @@ var callback = function(error, data, response) {
console.log('API called successfully.');
}
};
apiInstance.updateUser(username, user, callback);
apiInstance.updateUser(username, body, callback);
```
### Parameters
@ -333,7 +333,7 @@ apiInstance.updateUser(username, user, callback);
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type

View File

@ -58,16 +58,16 @@
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.call123testSpecialTags = function(client, callback) {
var postBody = client;
this.call123testSpecialTags = function(body, callback) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
}

View File

@ -101,13 +101,13 @@
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:model/OuterComposite} opts.body Input composite as post body
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterComposite}
*/
this.fakeOuterCompositeSerialize = function(opts, callback) {
opts = opts || {};
var postBody = opts['outerComposite'];
var postBody = opts['body'];
var pathParams = {
@ -229,15 +229,15 @@
/**
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
* @param {module:model/FileSchemaTestClass} body
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testBodyWithFileSchema = function(fileSchemaTestClass, callback) {
var postBody = fileSchemaTestClass;
this.testBodyWithFileSchema = function(body, callback) {
var postBody = body;
// verify the required parameter 'fileSchemaTestClass' is set
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithFileSchema");
}
@ -274,20 +274,20 @@
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testBodyWithQueryParams = function(query, user, callback) {
var postBody = user;
this.testBodyWithQueryParams = function(query, body, callback) {
var postBody = body;
// 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");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testBodyWithQueryParams");
}
@ -326,16 +326,16 @@
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.testClientModel = function(client, callback) {
var postBody = client;
this.testClientModel = function(body, callback) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClientModel");
}
@ -592,15 +592,15 @@
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testInlineAdditionalProperties = function(requestBody, callback) {
var postBody = requestBody;
this.testInlineAdditionalProperties = function(param, callback) {
var postBody = param;
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
// verify the required parameter 'param' is set
if (param === undefined || param === null) {
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
}

View File

@ -58,16 +58,16 @@
/**
* To test class name in snake case
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:model/Client} body client model
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.testClassname = function(client, callback) {
var postBody = client;
this.testClassname = function(body, callback) {
var postBody = body;
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClassname");
}

View File

@ -57,15 +57,15 @@
/**
* Add a new pet to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.addPet = function(pet, callback) {
var postBody = pet;
this.addPet = function(body, callback) {
var postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling addPet");
}
@ -302,15 +302,15 @@
/**
* Update an existing pet
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.updatePet = function(pet, callback) {
var postBody = pet;
this.updatePet = function(body, callback) {
var postBody = body;
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updatePet");
}

View File

@ -193,16 +193,16 @@
/**
* Place an order for a pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:model/Order} body order placed for purchasing the pet
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
this.placeOrder = function(order, callback) {
var postBody = order;
this.placeOrder = function(body, callback) {
var postBody = body;
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling placeOrder");
}

View File

@ -58,15 +58,15 @@
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} user Created user object
* @param {module:model/User} body Created user object
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUser = function(user, callback) {
var postBody = user;
this.createUser = function(body, callback) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUser");
}
@ -103,15 +103,15 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUsersWithArrayInput = function(user, callback) {
var postBody = user;
this.createUsersWithArrayInput = function(body, callback) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
}
@ -148,15 +148,15 @@
/**
* Creates list of users with given input array
* @param {Array.<User>} user List of user object
* @param {Array.<User>} body List of user object
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUsersWithListInput = function(user, callback) {
var postBody = user;
this.createUsersWithListInput = function(body, callback) {
var postBody = body;
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
}
@ -382,20 +382,20 @@
* Updated user
* This can only be done by the logged in user.
* @param {String} username name that need to be deleted
* @param {module:model/User} user Updated user object
* @param {module:model/User} body Updated user object
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.updateUser = function(username, user, callback) {
var postBody = user;
this.updateUser = function(username, body, callback) {
var postBody = body;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updateUser");
}