openapi-generator/samples/client/petstore/bash/docs/PetApi.md
2017-09-28 13:17:48 +08:00

6.8 KiB

PetApi

All URIs are relative to /v2

Method HTTP request Description
addPet POST /pet Add a new pet to the store
deletePet DELETE /pet/{petId} Deletes a pet
findPetsByStatus GET /pet/findByStatus Finds Pets by status
findPetsByTags GET /pet/findByTags Finds Pets by tags
getPetById GET /pet/{petId} Find pet by ID
updatePet PUT /pet Update an existing pet
updatePetWithForm POST /pet/{petId} Updates a pet in the store with form data
uploadFile POST /pet/{petId}/uploadImage uploads an image

addPet

Add a new pet to the store

Example

petstore-cli addPet

Parameters

Name Type Description Notes
body Pet Pet object that needs to be added to the store

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deletePet

Deletes a pet

Example

petstore-cli deletePet petId=value api_key:value

Parameters

Name Type Description Notes
petId integer Pet id to delete
apiKey string [optional]

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

findPetsByStatus

Finds Pets by status

Multiple status values can be provided with comma separated strings

Example

petstore-cli findPetsByStatus  Specify as:  status="value1,value2,..."

Parameters

Name Type Description Notes
status **array[string]** Status values that need to be considered for filter

Return type

**array[Pet]**

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

findPetsByTags

Finds Pets by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Example

petstore-cli findPetsByTags  Specify as:  tags="value1,value2,..."

Parameters

Name Type Description Notes
tags **array[string]** Tags to filter by

Return type

**array[Pet]**

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPetById

Find pet by ID

Returns a single pet

Example

petstore-cli getPetById petId=value

Parameters

Name Type Description Notes
petId integer ID of pet to return

Return type

Pet

Authorization

api_key

HTTP request headers

  • Content-Type: Not Applicable
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updatePet

Update an existing pet

Example

petstore-cli updatePet

Parameters

Name Type Description Notes
body Pet Pet object that needs to be added to the store

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updatePetWithForm

Updates a pet in the store with form data

Example

petstore-cli updatePetWithForm petId=value

Parameters

Name Type Description Notes
petId integer ID of pet that needs to be updated
name string Updated name of the pet [optional]
status string Updated status of the pet [optional]

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

uploadFile

uploads an image

Example

petstore-cli uploadFile petId=value

Parameters

Name Type Description Notes
petId integer ID of pet to update
additionalMetadata string Additional data to pass to server [optional]
file File file to upload [optional]

Return type

ApiResponse

Authorization

petstore_auth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]