mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 02:32:45 +00:00
update wording related to git
This commit is contained in:
@@ -5,13 +5,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
@@ -32,12 +29,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var opts = {
|
||||
'body': new SwaggerPetstore.Pet() // {Pet} Pet object that needs to be added to the store
|
||||
'body': new SwaggerPetstore.Pet() // Pet | Pet object that needs to be added to the store
|
||||
};
|
||||
apiInstance.addPet(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -61,55 +58,6 @@ null (empty response body)
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
<a name="addPetUsingByteArray"></a>
|
||||
# **addPetUsingByteArray**
|
||||
> addPetUsingByteArray(opts)
|
||||
|
||||
Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
|
||||
var opts = {
|
||||
'body': "B" // {String} Pet object in the form of byte array
|
||||
};
|
||||
apiInstance.addPetUsingByteArray(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **String**| Pet object in the form of byte array | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
@@ -130,14 +78,14 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var petId = 789; // {Integer} Pet id to delete
|
||||
var petId = 789; // Integer | Pet id to delete
|
||||
|
||||
var opts = {
|
||||
'apiKey': "apiKey_example" // {String}
|
||||
'apiKey': "apiKey_example" // String |
|
||||
};
|
||||
apiInstance.deletePet(petId, opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -173,7 +121,7 @@ null (empty response body)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
Multiple status values can be provided with comma seperated strings
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
@@ -182,12 +130,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var opts = {
|
||||
'status': ["available"] // {[String]} Status values that need to be considered for query
|
||||
'status': ["available"] // [String] | Status values that need to be considered for filter
|
||||
};
|
||||
apiInstance.findPetsByStatus(opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -201,7 +149,7 @@ apiInstance.findPetsByStatus(opts).then(function(data) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**[String]**](String.md)| Status values that need to be considered for query | [optional] [default to available]
|
||||
**status** | [**[String]**](String.md)| Status values that need to be considered for filter | [optional] [default to available]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -231,12 +179,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var opts = {
|
||||
'tags': ["tags_example"] // {[String]} Tags to filter by
|
||||
'tags': ["tags_example"] // [String] | Tags to filter by
|
||||
};
|
||||
apiInstance.findPetsByTags(opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -280,17 +228,17 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
var api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = "YOUR API KEY"
|
||||
api_key.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix['api_key'] = "Token"
|
||||
//api_key.apiKeyPrefix = 'Token';
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var petId = 789; // {Integer} ID of pet that needs to be fetched
|
||||
var petId = 789; // Integer | ID of pet that needs to be fetched
|
||||
|
||||
apiInstance.getPetById(petId).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -314,114 +262,6 @@ Name | Type | Description | Notes
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
<a name="getPetByIdInObject"></a>
|
||||
# **getPetByIdInObject**
|
||||
> InlineResponse200 getPetByIdInObject(petId)
|
||||
|
||||
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
var api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix['api_key'] = "Token"
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
|
||||
var petId = 789; // {Integer} ID of pet that needs to be fetched
|
||||
|
||||
apiInstance.getPetByIdInObject(petId).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponse200**](InlineResponse200.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
<a name="petPetIdtestingByteArraytrueGet"></a>
|
||||
# **petPetIdtestingByteArraytrueGet**
|
||||
> 'String' petPetIdtestingByteArraytrueGet(petId)
|
||||
|
||||
Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
var api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix['api_key'] = "Token"
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
|
||||
var petId = 789; // {Integer} ID of pet that needs to be fetched
|
||||
|
||||
apiInstance.petPetIdtestingByteArraytrueGet(petId).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Integer**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
**'String'**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
@@ -442,12 +282,12 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var opts = {
|
||||
'body': new SwaggerPetstore.Pet() // {Pet} Pet object that needs to be added to the store
|
||||
'body': new SwaggerPetstore.Pet() // Pet | Pet object that needs to be added to the store
|
||||
};
|
||||
apiInstance.updatePet(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -491,15 +331,15 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var petId = "petId_example"; // {String} ID of pet that needs to be updated
|
||||
var petId = "petId_example"; // String | ID of pet that needs to be updated
|
||||
|
||||
var opts = {
|
||||
'name': "name_example", // {String} Updated name of the pet
|
||||
'status': "status_example" // {String} Updated status of the pet
|
||||
'name': "name_example", // String | Updated name of the pet
|
||||
'status': "status_example" // String | Updated status of the pet
|
||||
};
|
||||
apiInstance.updatePetWithForm(petId, opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -545,15 +385,15 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = "YOUR ACCESS TOKEN"
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.PetApi()
|
||||
var apiInstance = new SwaggerPetstore.PetApi();
|
||||
|
||||
var petId = 789; // {Integer} ID of pet to update
|
||||
var petId = 789; // Integer | ID of pet to update
|
||||
|
||||
var opts = {
|
||||
'additionalMetadata': "additionalMetadata_example", // {String} Additional data to pass to server
|
||||
'file': "/path/to/file.txt" // {File} file to upload
|
||||
'additionalMetadata': "additionalMetadata_example", // String | Additional data to pass to server
|
||||
'file': "/path/to/file.txt" // File | file to upload
|
||||
};
|
||||
apiInstance.uploadFile(petId, opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
|
||||
@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
|
||||
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
@@ -24,9 +22,9 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
var apiInstance = new SwaggerPetstore.StoreApi();
|
||||
|
||||
var orderId = "orderId_example"; // {String} ID of the order that needs to be deleted
|
||||
var orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
|
||||
apiInstance.deleteOrder(orderId).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -50,63 +48,6 @@ null (empty response body)
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
<a name="findOrdersByStatus"></a>
|
||||
# **findOrdersByStatus**
|
||||
> [Order] findOrdersByStatus(opts)
|
||||
|
||||
Finds orders by status
|
||||
|
||||
A single status value can be provided as a string
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: test_api_client_id
|
||||
var test_api_client_id = defaultClient.authentications['test_api_client_id'];
|
||||
test_api_client_id.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_client_id.apiKeyPrefix['x-test_api_client_id'] = "Token"
|
||||
|
||||
// Configure API key authorization: test_api_client_secret
|
||||
var test_api_client_secret = defaultClient.authentications['test_api_client_secret'];
|
||||
test_api_client_secret.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_client_secret.apiKeyPrefix['x-test_api_client_secret'] = "Token"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
|
||||
var opts = {
|
||||
'status': "placed" // {String} Status value that needs to be considered for query
|
||||
};
|
||||
apiInstance.findOrdersByStatus(opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | **String**| Status value that needs to be considered for query | [optional] [default to placed]
|
||||
|
||||
### Return type
|
||||
|
||||
[**[Order]**](Order.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
@@ -114,7 +55,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
> {'String': 'Integer'} getInventory
|
||||
> {'String': 'Integer'} getInventory()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
@@ -127,11 +68,11 @@ var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
var api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = "YOUR API KEY"
|
||||
api_key.apiKey = 'YOUR API KEY';
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix['api_key'] = "Token"
|
||||
//api_key.apiKeyPrefix = 'Token';
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
var apiInstance = new SwaggerPetstore.StoreApi();
|
||||
apiInstance.getInventory().then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
@@ -151,50 +92,6 @@ This endpoint does not need any parameter.
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
|
||||
<a name="getInventoryInObject"></a>
|
||||
# **getInventoryInObject**
|
||||
> Object getInventoryInObject
|
||||
|
||||
Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
|
||||
Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: api_key
|
||||
var api_key = defaultClient.authentications['api_key'];
|
||||
api_key.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key.apiKeyPrefix['api_key'] = "Token"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
apiInstance.getInventoryInObject().then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
@@ -211,23 +108,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: test_api_key_header
|
||||
var test_api_key_header = defaultClient.authentications['test_api_key_header'];
|
||||
test_api_key_header.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_key_header.apiKeyPrefix['test_api_key_header'] = "Token"
|
||||
var apiInstance = new SwaggerPetstore.StoreApi();
|
||||
|
||||
// Configure API key authorization: test_api_key_query
|
||||
var test_api_key_query = defaultClient.authentications['test_api_key_query'];
|
||||
test_api_key_query.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_key_query.apiKeyPrefix['test_api_key_query'] = "Token"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
|
||||
var orderId = "orderId_example"; // {String} ID of pet that needs to be fetched
|
||||
var orderId = "orderId_example"; // String | ID of pet that needs to be fetched
|
||||
|
||||
apiInstance.getOrderById(orderId).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -249,7 +133,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
@@ -267,24 +151,11 @@ Place an order for a pet
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure API key authorization: test_api_client_id
|
||||
var test_api_client_id = defaultClient.authentications['test_api_client_id'];
|
||||
test_api_client_id.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_client_id.apiKeyPrefix['x-test_api_client_id'] = "Token"
|
||||
|
||||
// Configure API key authorization: test_api_client_secret
|
||||
var test_api_client_secret = defaultClient.authentications['test_api_client_secret'];
|
||||
test_api_client_secret.apiKey = "YOUR API KEY"
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//test_api_client_secret.apiKeyPrefix['x-test_api_client_secret'] = "Token"
|
||||
|
||||
var apiInstance = new SwaggerPetstore.StoreApi()
|
||||
var apiInstance = new SwaggerPetstore.StoreApi();
|
||||
|
||||
var opts = {
|
||||
'body': new SwaggerPetstore.Order() // {Order} order placed for purchasing the pet
|
||||
'body': new SwaggerPetstore.Order() // Order | order placed for purchasing the pet
|
||||
};
|
||||
apiInstance.placeOrder(opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -306,7 +177,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ This can only be done by the logged in user.
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var opts = {
|
||||
'body': new SwaggerPetstore.User() // {User} Created user object
|
||||
'body': new SwaggerPetstore.User() // User | Created user object
|
||||
};
|
||||
apiInstance.createUser(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -70,10 +70,10 @@ Creates list of users with given input array
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var opts = {
|
||||
'body': [new SwaggerPetstore.User()] // {[User]} List of user object
|
||||
'body': [new SwaggerPetstore.User()] // [User] | List of user object
|
||||
};
|
||||
apiInstance.createUsersWithArrayInput(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -114,10 +114,10 @@ Creates list of users with given input array
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var opts = {
|
||||
'body': [new SwaggerPetstore.User()] // {[User]} List of user object
|
||||
'body': [new SwaggerPetstore.User()] // [User] | List of user object
|
||||
};
|
||||
apiInstance.createUsersWithListInput(opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -157,16 +157,10 @@ This can only be done by the logged in user.
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
var defaultClient = SwaggerPetstore.ApiClient.default;
|
||||
|
||||
// Configure HTTP basic authorization: test_http_basic
|
||||
var test_http_basic = defaultClient.authentications['test_http_basic'];
|
||||
test_http_basic.username = 'YOUR USERNAME'
|
||||
test_http_basic.password = 'YOUR PASSWORD'
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
|
||||
var username = "username_example"; // {String} The name that needs to be deleted
|
||||
var username = "username_example"; // String | The name that needs to be deleted
|
||||
|
||||
apiInstance.deleteUser(username).then(function() {
|
||||
console.log('API called successfully.');
|
||||
@@ -188,7 +182,7 @@ null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[test_http_basic](../README.md#test_http_basic)
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
@@ -207,9 +201,9 @@ Get user by user name
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var username = "username_example"; // {String} The name that needs to be fetched. Use user1 for testing.
|
||||
var username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
|
||||
apiInstance.getUserByName(username).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -250,11 +244,11 @@ Logs user into the system
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var opts = {
|
||||
'username': "username_example", // {String} The user name for login
|
||||
'password': "password_example" // {String} The password for login in clear text
|
||||
'username': "username_example", // String | The user name for login
|
||||
'password': "password_example" // String | The password for login in clear text
|
||||
};
|
||||
apiInstance.loginUser(opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
@@ -286,7 +280,7 @@ No authorization required
|
||||
|
||||
<a name="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
> logoutUser
|
||||
> logoutUser()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
@@ -296,7 +290,7 @@ Logs out current logged in user session
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
apiInstance.logoutUser().then(function() {
|
||||
console.log('API called successfully.');
|
||||
}, function(error) {
|
||||
@@ -333,12 +327,12 @@ This can only be done by the logged in user.
|
||||
```javascript
|
||||
var SwaggerPetstore = require('swagger-petstore');
|
||||
|
||||
var apiInstance = new SwaggerPetstore.UserApi()
|
||||
var apiInstance = new SwaggerPetstore.UserApi();
|
||||
|
||||
var username = "username_example"; // {String} name that need to be deleted
|
||||
var username = "username_example"; // String | name that need to be deleted
|
||||
|
||||
var opts = {
|
||||
'body': new SwaggerPetstore.User() // {User} Updated user object
|
||||
'body': new SwaggerPetstore.User() // User | Updated user object
|
||||
};
|
||||
apiInstance.updateUser(username, opts).then(function() {
|
||||
console.log('API called successfully.');
|
||||
|
||||
Reference in New Issue
Block a user