mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-10-31 16:53:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			238 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			238 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # PetApi
 | |
| 
 | |
| 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 |
 | |
| | [**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 |
 | |
| | [**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 |
 | |
| 
 | |
| 
 | |
| <a name="addPet"></a>
 | |
| # **addPet**
 | |
| > Pet addPet(Pet)
 | |
| 
 | |
| Add a new pet to the store
 | |
| 
 | |
|     
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **Pet** | [**Pet**](../Models/Pet.md)| Pet object that needs to be added to the store | |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**Pet**](../Models/Pet.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: application/json, application/xml
 | |
| - **Accept**: application/xml, application/json
 | |
| 
 | |
| <a name="deletePet"></a>
 | |
| # **deletePet**
 | |
| > deletePet(petId, api\_key)
 | |
| 
 | |
| Deletes a pet
 | |
| 
 | |
|     
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **petId** | **Long**| Pet id to delete | [default to null] |
 | |
| | **api\_key** | **String**|  | [optional] [default to null] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| null (empty response body)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: Not defined
 | |
| - **Accept**: Not defined
 | |
| 
 | |
| <a name="findPetsByStatus"></a>
 | |
| # **findPetsByStatus**
 | |
| > List findPetsByStatus(status)
 | |
| 
 | |
| Finds Pets by status
 | |
| 
 | |
|     Multiple status values can be provided with comma separated strings
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **status** | [**List**](../Models/String.md)| Status values that need to be considered for filter | [default to null] [enum: available, pending, sold] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**List**](../Models/Pet.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: Not defined
 | |
| - **Accept**: application/xml, application/json
 | |
| 
 | |
| <a name="findPetsByTags"></a>
 | |
| # **findPetsByTags**
 | |
| > List findPetsByTags(tags)
 | |
| 
 | |
| Finds Pets by tags
 | |
| 
 | |
|     Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **tags** | [**List**](../Models/String.md)| Tags to filter by | [default to null] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**List**](../Models/Pet.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: Not defined
 | |
| - **Accept**: application/xml, application/json
 | |
| 
 | |
| <a name="getPetById"></a>
 | |
| # **getPetById**
 | |
| > Pet getPetById(petId)
 | |
| 
 | |
| Find pet by ID
 | |
| 
 | |
|     Returns a single pet
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **petId** | **Long**| ID of pet to return | [default to null] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**Pet**](../Models/Pet.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [api_key](../README.md#api_key)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: Not defined
 | |
| - **Accept**: application/xml, application/json
 | |
| 
 | |
| <a name="updatePet"></a>
 | |
| # **updatePet**
 | |
| > Pet updatePet(Pet)
 | |
| 
 | |
| Update an existing pet
 | |
| 
 | |
|     
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **Pet** | [**Pet**](../Models/Pet.md)| Pet object that needs to be added to the store | |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**Pet**](../Models/Pet.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: application/json, application/xml
 | |
| - **Accept**: application/xml, application/json
 | |
| 
 | |
| <a name="updatePetWithForm"></a>
 | |
| # **updatePetWithForm**
 | |
| > updatePetWithForm(petId, name, status)
 | |
| 
 | |
| Updates a pet in the store with form data
 | |
| 
 | |
|     
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **petId** | **Long**| ID of pet that needs to be updated | [default to null] |
 | |
| | **name** | **String**| Updated name of the pet | [optional] [default to null] |
 | |
| | **status** | **String**| Updated status of the pet | [optional] [default to null] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| null (empty response body)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: application/x-www-form-urlencoded
 | |
| - **Accept**: Not defined
 | |
| 
 | |
| <a name="uploadFile"></a>
 | |
| # **uploadFile**
 | |
| > ApiResponse uploadFile(petId, additionalMetadata, file)
 | |
| 
 | |
| uploads an image
 | |
| 
 | |
|     
 | |
| 
 | |
| ### Parameters
 | |
| 
 | |
| |Name | Type | Description  | Notes |
 | |
| |------------- | ------------- | ------------- | -------------|
 | |
| | **petId** | **Long**| ID of pet to update | [default to null] |
 | |
| | **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] |
 | |
| | **file** | **File**| file to upload | [optional] [default to null] |
 | |
| 
 | |
| ### Return type
 | |
| 
 | |
| [**ApiResponse**](../Models/ApiResponse.md)
 | |
| 
 | |
| ### Authorization
 | |
| 
 | |
| [petstore_auth](../README.md#petstore_auth)
 | |
| 
 | |
| ### HTTP request headers
 | |
| 
 | |
| - **Content-Type**: multipart/form-data
 | |
| - **Accept**: application/json
 | |
| 
 |