forked from loafle/openapi-generator-original
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3ed f8ff8c87609
Author: William Cheng <wing328hk@gmail.com>
Date: Tue Aug 17 18:28:12 2021 +0800
Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting
commit f8ff8c87609b1ca36fa26fb8474806999638195e
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:12:47 2021 +1000
Reorder tags that handle missing values
commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:08:59 2021 +1000
Use dot notation where possible
commit 493d14921e2333f3ae19ef6fc89318b7e263a80c
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:10:49 2021 +1000
Remove empty tags
commit 32480dc53f48227d55531b94e307d72671373737
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 10:41:58 2021 +1000
Remove redundant sections
commit a8edabd722c34aa094b4aeb11c22664529c3a219
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 22:02:22 2021 +1000
Trim extra EOF new lines
commit e89bd7458e3594bf0d30e580bc9408e45b018a57
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 21:59:26 2021 +1000
Trim trailing whitespace
7.6 KiB
7.6 KiB
PetAPI
All URIs are relative to http://petstore.swagger.io/v2
| Method | HTTP request | Description |
|---|---|---|
| PetAPI_addPet | POST /pet | Add a new pet to the store |
| PetAPI_deletePet | DELETE /pet/{petId} | Deletes a pet |
| PetAPI_findPetsByStatus | GET /pet/findByStatus | Finds Pets by status |
| PetAPI_findPetsByTags | GET /pet/findByTags | Finds Pets by tags |
| PetAPI_getPetById | GET /pet/{petId} | Find pet by ID |
| PetAPI_updatePet | PUT /pet | Update an existing pet |
| PetAPI_updatePetWithForm | POST /pet/{petId} | Updates a pet in the store with form data |
| PetAPI_uploadFile | POST /pet/{petId}/uploadImage | uploads an image |
PetAPI_addPet
// Add a new pet to the store
//
void PetAPI_addPet(apiClient_t *apiClient, pet_t * body);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| body | pet_t * | Pet object that needs to be added to the store |
Return type
void
Authorization
HTTP request headers
- Content-Type: application/json, application/xml
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_deletePet
// Deletes a pet
//
void PetAPI_deletePet(apiClient_t *apiClient, long petId, char * api_key);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| petId | long | Pet id to delete | |
| api_key | char * | [optional] |
Return type
void
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_findPetsByStatus
// Finds Pets by status
//
// Multiple status values can be provided with comma separated strings
//
list_t* PetAPI_findPetsByStatus(apiClient_t *apiClient, list_t * status);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| status | list_t * | Status values that need to be considered for filter |
Return type
list_t *
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_findPetsByTags
// Finds Pets by tags
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
list_t* PetAPI_findPetsByTags(apiClient_t *apiClient, list_t * tags);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| tags | list_t * | Tags to filter by |
Return type
list_t *
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_getPetById
// Find pet by ID
//
// Returns a single pet
//
pet_t* PetAPI_getPetById(apiClient_t *apiClient, long petId);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| petId | long | ID of pet to return |
Return type
pet_t *
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_updatePet
// Update an existing pet
//
void PetAPI_updatePet(apiClient_t *apiClient, pet_t * body);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| body | pet_t * | Pet object that needs to be added to the store |
Return type
void
Authorization
HTTP request headers
- Content-Type: application/json, application/xml
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_updatePetWithForm
// Updates a pet in the store with form data
//
void PetAPI_updatePetWithForm(apiClient_t *apiClient, long petId, char * name, char * status);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| petId | long | ID of pet that needs to be updated | |
| name | char * | Updated name of the pet | [optional] |
| status | char * | Updated status of the pet | [optional] |
Return type
void
Authorization
HTTP request headers
- Content-Type: application/x-www-form-urlencoded
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PetAPI_uploadFile
// uploads an image
//
api_response_t* PetAPI_uploadFile(apiClient_t *apiClient, long petId, char * additionalMetadata, binary_t* file);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| apiClient | apiClient_t * | context containing the client configuration | |
| petId | long | ID of pet to update | |
| additionalMetadata | char * | Additional data to pass to server | [optional] |
| file | binary_t* | file to upload | [optional] |
Return type
Authorization
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]