mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 06:52:45 +00:00
Use JS ES6 as the default (#1825)
* set JS ES6 as the default * update doc
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 `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 \"client\" model
|
||||
|
||||
@@ -285,8 +285,8 @@ To test \"client\" 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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ Name | Type | Description | Notes
|
||||
## Enum: {String: String}
|
||||
|
||||
|
||||
* `UPPER` (value: `"UPPER"`)
|
||||
|
||||
* `lower` (value: `"lower"`)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user