forked from loafle/openapi-generator-original
Merge pull request #663 from wing328/better_method_doc
Better method documentation
This commit is contained in:
commit
bf4d0a5466
@ -39,10 +39,12 @@ public class {{classname}} {
|
||||
}
|
||||
|
||||
{{#operation}}
|
||||
{{#errorList}} //error info- code: {{code}} reason: "{{reason}}" model: {{#responseModel}}{{responseModel}}
|
||||
{{/responseModel}}{{^responseModel}}<none>
|
||||
{{/responseModel}}
|
||||
{{/errorList}}
|
||||
/**
|
||||
* {{summary}}
|
||||
* {{notes}}
|
||||
{{#allParams}} * @param {{paramName}} {{description}}
|
||||
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
*/
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
|
||||
|
@ -58,6 +58,12 @@ static NSString * basePath = @"{{basePath}}";
|
||||
|
||||
|
||||
{{#operation}}
|
||||
/*!
|
||||
* {{{summary}}}
|
||||
* {{{notes}}}
|
||||
{{#allParams}} * \param {{paramName}} {{{description}}}
|
||||
{{/allParams}} * \returns {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
*/
|
||||
-(NSNumber*) {{nickname}}WithCompletionBlock{{^allParams}}: {{/allParams}}{{#allParams}}{{#secondaryParam}} {{paramName}}{{/secondaryParam}}: ({{{dataType}}}) {{paramName}}
|
||||
{{/allParams}}
|
||||
{{#returnBaseType}}{{#hasParams}}completionHandler: {{/hasParams}}(void (^)({{{returnType}}} output, NSError* error))completionBlock{{/returnBaseType}}
|
||||
|
@ -35,14 +35,13 @@ class {{classname}}(object):
|
||||
{{newline}}
|
||||
{{#operation}}
|
||||
def {{nickname}}(self, {{#requiredParams}}{{paramName}}{{#defaultValue}} = None{{/defaultValue}}, {{/requiredParams}}**kwargs):
|
||||
"""{{summary}}
|
||||
"""{{{summary}}}
|
||||
{{{notes}}}
|
||||
|
||||
Args:
|
||||
{{#allParams}}
|
||||
{{paramName}}, {{dataType}}: {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
|
||||
{{newline}}
|
||||
{{#allParams}}{{paramName}}, {{dataType}}: {{{description}}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
|
||||
{{/allParams}}
|
||||
{{newline}}
|
||||
|
||||
Returns: {{returnType}}
|
||||
"""
|
||||
|
||||
|
@ -32,14 +32,13 @@ class {{classname}}(object):
|
||||
{{newline}}
|
||||
{{#operation}}
|
||||
def {{nickname}}(self, {{#requiredParams}}{{paramName}}{{#defaultValue}} = None{{/defaultValue}}, {{/requiredParams}}**kwargs):
|
||||
"""{{summary}}
|
||||
"""{{{summary}}}
|
||||
{{{notes}}}
|
||||
|
||||
Args:
|
||||
{{#allParams}}
|
||||
{{paramName}}, {{dataType}}: {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
|
||||
{{newline}}
|
||||
{{#allParams}}{{paramName}}, {{dataType}}: {{{description}}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
|
||||
{{/allParams}}
|
||||
{{newline}}
|
||||
|
||||
Returns: {{returnType}}
|
||||
"""
|
||||
|
||||
|
@ -19,6 +19,12 @@ class {{classname}}(val defBasePath: String = "{{basePath}}",
|
||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{summary}}
|
||||
* {{notes}}
|
||||
{{#allParams}} * @param {{paramName}} {{description}}
|
||||
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||
*/
|
||||
def {{nickname}} ({{#allParams}}{{paramName}}: {{dataType}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {{#returnType}}: Option[{{returnType}}]{{/returnType}} = {
|
||||
// create path and map variables
|
||||
val path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}",apiInvoker.escape({{paramName}}))
|
||||
@ -66,4 +72,4 @@ class {{classname}}(val defBasePath: String = "{{basePath}}",
|
||||
}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
{{/operations}}
|
||||
|
@ -38,7 +38,12 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
public void updatePet (Pet body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -88,7 +93,12 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
public void addPet (Pet body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -138,7 +148,12 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma seperated strings
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return List<Pet>
|
||||
*/
|
||||
public List<Pet> findPetsByStatus (List<String> status) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -190,7 +205,12 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by
|
||||
* @return List<Pet>
|
||||
*/
|
||||
public List<Pet> findPetsByTags (List<String> tags) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -242,7 +262,12 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param petId ID of pet that needs to be fetched
|
||||
* @return Pet
|
||||
*/
|
||||
public Pet getPetById (Long petId) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -292,7 +317,14 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
* @param name Updated name of the pet
|
||||
* @param status Updated status of the pet
|
||||
* @return void
|
||||
*/
|
||||
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -352,7 +384,13 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param apiKey
|
||||
* @param petId Pet id to delete
|
||||
* @return void
|
||||
*/
|
||||
public void deletePet (String apiKey, Long petId) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -403,7 +441,14 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
* @return void
|
||||
*/
|
||||
public void uploadFile (Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
|
@ -38,7 +38,11 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return Map<String, Integer>
|
||||
*/
|
||||
public Map<String, Integer> getInventory () throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -88,7 +92,12 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet
|
||||
* @return Order
|
||||
*/
|
||||
public Order placeOrder (Order body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -138,7 +147,12 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
public Order getOrderById (String orderId) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -188,7 +202,12 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
* @return void
|
||||
*/
|
||||
public void deleteOrder (String orderId) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
|
@ -38,7 +38,12 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object
|
||||
* @return void
|
||||
*/
|
||||
public void createUser (User body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -88,7 +93,12 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @return void
|
||||
*/
|
||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -138,7 +148,12 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @return void
|
||||
*/
|
||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -188,7 +203,13 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
* @return String
|
||||
*/
|
||||
public String loginUser (String username, String password) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -242,7 +263,11 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public void logoutUser () throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -292,7 +317,12 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return User
|
||||
*/
|
||||
public User getUserByName (String username) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
@ -342,7 +372,13 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
* @return void
|
||||
*/
|
||||
public void updateUser (String username, User body) throws ApiException {
|
||||
Object postBody = body;
|
||||
|
||||
@ -392,7 +428,12 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted
|
||||
* @return void
|
||||
*/
|
||||
public void deleteUser (String username) throws ApiException {
|
||||
Object postBody = null;
|
||||
|
||||
|
@ -56,6 +56,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Update an existing pet
|
||||
*
|
||||
* \param body Pet object that needs to be added to the store
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) updatePetWithCompletionBlock: (SWGPet*) body
|
||||
|
||||
|
||||
@ -141,6 +147,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* \param body Pet object that needs to be added to the store
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) addPetWithCompletionBlock: (SWGPet*) body
|
||||
|
||||
|
||||
@ -226,6 +238,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma seperated strings
|
||||
* \param status Status values that need to be considered for filter
|
||||
* \returns NSArray<SWGPet>*
|
||||
*/
|
||||
-(NSNumber*) findPetsByStatusWithCompletionBlock: (NSArray*) status
|
||||
|
||||
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error))completionBlock
|
||||
@ -307,6 +325,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
* \param tags Tags to filter by
|
||||
* \returns NSArray<SWGPet>*
|
||||
*/
|
||||
-(NSNumber*) findPetsByTagsWithCompletionBlock: (NSArray*) tags
|
||||
|
||||
completionHandler: (void (^)(NSArray<SWGPet>* output, NSError* error))completionBlock
|
||||
@ -388,6 +412,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* \param petId ID of pet that needs to be fetched
|
||||
* \returns SWGPet*
|
||||
*/
|
||||
-(NSNumber*) getPetByIdWithCompletionBlock: (NSNumber*) petId
|
||||
|
||||
completionHandler: (void (^)(SWGPet* output, NSError* error))completionBlock
|
||||
@ -465,6 +495,14 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* \param petId ID of pet that needs to be updated
|
||||
* \param name Updated name of the pet
|
||||
* \param status Updated status of the pet
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) updatePetWithFormWithCompletionBlock: (NSString*) petId
|
||||
name: (NSString*) name
|
||||
status: (NSString*) status
|
||||
@ -546,6 +584,13 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Deletes a pet
|
||||
*
|
||||
* \param api_key
|
||||
* \param petId Pet id to delete
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) deletePetWithCompletionBlock: (NSString*) api_key
|
||||
petId: (NSNumber*) petId
|
||||
|
||||
@ -612,6 +657,14 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* uploads an image
|
||||
*
|
||||
* \param petId ID of pet to update
|
||||
* \param additionalMetadata Additional data to pass to server
|
||||
* \param file file to upload
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) uploadFileWithCompletionBlock: (NSNumber*) petId
|
||||
additionalMetadata: (NSString*) additionalMetadata
|
||||
file: (SWGFile*) file
|
||||
|
@ -55,6 +55,11 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* \returns NSDictionary*
|
||||
*/
|
||||
-(NSNumber*) getInventoryWithCompletionBlock:
|
||||
(void (^)(NSDictionary* output, NSError* error))completionBlock
|
||||
{
|
||||
@ -122,6 +127,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Place an order for a pet
|
||||
*
|
||||
* \param body order placed for purchasing the pet
|
||||
* \returns SWGOrder*
|
||||
*/
|
||||
-(NSNumber*) placeOrderWithCompletionBlock: (SWGOrder*) body
|
||||
|
||||
completionHandler: (void (^)(SWGOrder* output, NSError* error))completionBlock
|
||||
@ -221,6 +232,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* \param orderId ID of pet that needs to be fetched
|
||||
* \returns SWGOrder*
|
||||
*/
|
||||
-(NSNumber*) getOrderByIdWithCompletionBlock: (NSString*) orderId
|
||||
|
||||
completionHandler: (void (^)(SWGOrder* output, NSError* error))completionBlock
|
||||
@ -298,6 +315,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* \param orderId ID of the order that needs to be deleted
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) deleteOrderWithCompletionBlock: (NSString*) orderId
|
||||
|
||||
|
||||
|
@ -55,6 +55,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* \param body Created user object
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) createUserWithCompletionBlock: (SWGUser*) body
|
||||
|
||||
|
||||
@ -140,6 +146,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* \param body List of user object
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) createUsersWithArrayInputWithCompletionBlock: (NSArray<SWGUser>*) body
|
||||
|
||||
|
||||
@ -225,6 +237,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* \param body List of user object
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) createUsersWithListInputWithCompletionBlock: (NSArray<SWGUser>*) body
|
||||
|
||||
|
||||
@ -310,6 +328,13 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Logs user into the system
|
||||
*
|
||||
* \param username The user name for login
|
||||
* \param password The password for login in clear text
|
||||
* \returns NSString*
|
||||
*/
|
||||
-(NSNumber*) loginUserWithCompletionBlock: (NSString*) username
|
||||
password: (NSString*) password
|
||||
|
||||
@ -393,6 +418,11 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) logoutUserWithCompletionBlock:
|
||||
|
||||
(void (^)(NSError* error))completionBlock {
|
||||
@ -454,6 +484,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get user by user name
|
||||
*
|
||||
* \param username The name that needs to be fetched. Use user1 for testing.
|
||||
* \returns SWGUser*
|
||||
*/
|
||||
-(NSNumber*) getUserByNameWithCompletionBlock: (NSString*) username
|
||||
|
||||
completionHandler: (void (^)(SWGUser* output, NSError* error))completionBlock
|
||||
@ -531,6 +567,13 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* \param username name that need to be deleted
|
||||
* \param body Updated user object
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) updateUserWithCompletionBlock: (NSString*) username
|
||||
body: (SWGUser*) body
|
||||
|
||||
@ -618,6 +661,12 @@ static NSString * basePath = @"http://petstore.swagger.io/v2";
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* \param username The name that needs to be deleted
|
||||
* \returns void
|
||||
*/
|
||||
-(NSNumber*) deleteUserWithCompletionBlock: (NSString*) username
|
||||
|
||||
|
||||
|
@ -35,13 +35,12 @@ class PetApi(object):
|
||||
|
||||
def update_pet(self, **kwargs):
|
||||
"""Update an existing pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Pet: Pet object that needs to be added to the store (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -94,13 +93,12 @@ class PetApi(object):
|
||||
|
||||
def add_pet(self, **kwargs):
|
||||
"""Add a new pet to the store
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Pet: Pet object that needs to be added to the store (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -153,13 +151,12 @@ class PetApi(object):
|
||||
|
||||
def find_pets_by_status(self, **kwargs):
|
||||
"""Finds Pets by status
|
||||
Multiple status values can be provided with comma seperated strings
|
||||
|
||||
Args:
|
||||
|
||||
status, list[str]: Status values that need to be considered for filter (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: list[Pet]
|
||||
"""
|
||||
|
||||
@ -218,13 +215,12 @@ class PetApi(object):
|
||||
|
||||
def find_pets_by_tags(self, **kwargs):
|
||||
"""Finds Pets by tags
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
Args:
|
||||
|
||||
tags, list[str]: Tags to filter by (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: list[Pet]
|
||||
"""
|
||||
|
||||
@ -283,13 +279,12 @@ class PetApi(object):
|
||||
|
||||
def get_pet_by_id(self, **kwargs):
|
||||
"""Find pet by ID
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, long: ID of pet that needs to be fetched (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Pet
|
||||
"""
|
||||
|
||||
@ -351,19 +346,14 @@ class PetApi(object):
|
||||
|
||||
def update_pet_with_form(self, **kwargs):
|
||||
"""Updates a pet in the store with form data
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, str: ID of pet that needs to be updated (required)
|
||||
|
||||
|
||||
name, str: Updated name of the pet (required)
|
||||
|
||||
|
||||
status, str: Updated status of the pet (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -425,16 +415,13 @@ class PetApi(object):
|
||||
|
||||
def delete_pet(self, **kwargs):
|
||||
"""Deletes a pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
api_key, str: (required)
|
||||
|
||||
|
||||
pet_id, long: Pet id to delete (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -493,19 +480,14 @@ class PetApi(object):
|
||||
|
||||
def upload_file(self, **kwargs):
|
||||
"""uploads an image
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, long: ID of pet to update (required)
|
||||
|
||||
|
||||
additional_metadata, str: Additional data to pass to server (required)
|
||||
|
||||
|
||||
file, file: file to upload (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
|
@ -35,10 +35,11 @@ class StoreApi(object):
|
||||
|
||||
def get_inventory(self, **kwargs):
|
||||
"""Returns pet inventories by status
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
Args:
|
||||
|
||||
|
||||
|
||||
Returns: map(String, int)
|
||||
"""
|
||||
|
||||
@ -94,13 +95,12 @@ class StoreApi(object):
|
||||
|
||||
def place_order(self, **kwargs):
|
||||
"""Place an order for a pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Order: order placed for purchasing the pet (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Order
|
||||
"""
|
||||
|
||||
@ -159,13 +159,12 @@ class StoreApi(object):
|
||||
|
||||
def get_order_by_id(self, **kwargs):
|
||||
"""Find purchase order by ID
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
Args:
|
||||
|
||||
order_id, str: ID of pet that needs to be fetched (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Order
|
||||
"""
|
||||
|
||||
@ -227,13 +226,12 @@ class StoreApi(object):
|
||||
|
||||
def delete_order(self, **kwargs):
|
||||
"""Delete purchase order by ID
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
Args:
|
||||
|
||||
order_id, str: ID of the order that needs to be deleted (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
|
@ -35,13 +35,12 @@ class UserApi(object):
|
||||
|
||||
def create_user(self, **kwargs):
|
||||
"""Create user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
body, User: Created user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -94,13 +93,12 @@ class UserApi(object):
|
||||
|
||||
def create_users_with_array_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, list[User]: List of user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -153,13 +151,12 @@ class UserApi(object):
|
||||
|
||||
def create_users_with_list_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, list[User]: List of user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -212,16 +209,13 @@ class UserApi(object):
|
||||
|
||||
def login_user(self, **kwargs):
|
||||
"""Logs user into the system
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The user name for login (required)
|
||||
|
||||
|
||||
password, str: The password for login in clear text (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: str
|
||||
"""
|
||||
|
||||
@ -283,10 +277,11 @@ class UserApi(object):
|
||||
|
||||
def logout_user(self, **kwargs):
|
||||
"""Logs out current logged in user session
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -336,13 +331,12 @@ class UserApi(object):
|
||||
|
||||
def get_user_by_name(self, **kwargs):
|
||||
"""Get user by user name
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The name that needs to be fetched. Use user1 for testing. (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: User
|
||||
"""
|
||||
|
||||
@ -404,16 +398,13 @@ class UserApi(object):
|
||||
|
||||
def update_user(self, **kwargs):
|
||||
"""Updated user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
username, str: name that need to be deleted (required)
|
||||
|
||||
|
||||
body, User: Updated user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -472,13 +463,12 @@ class UserApi(object):
|
||||
|
||||
def delete_user(self, **kwargs):
|
||||
"""Delete user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The name that needs to be deleted (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
|
@ -30,15 +30,14 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def updatePet(self, **kwargs):
|
||||
def update_pet(self, **kwargs):
|
||||
"""Update an existing pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Pet: Pet object that needs to be added to the store (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -47,7 +46,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method updatePet" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method update_pet" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -73,15 +72,14 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def addPet(self, **kwargs):
|
||||
def add_pet(self, **kwargs):
|
||||
"""Add a new pet to the store
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Pet: Pet object that needs to be added to the store (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -90,7 +88,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method addPet" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method add_pet" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -116,15 +114,14 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def findPetsByStatus(self, **kwargs):
|
||||
def find_pets_by_status(self, **kwargs):
|
||||
"""Finds Pets by status
|
||||
Multiple status values can be provided with comma seperated strings
|
||||
|
||||
Args:
|
||||
|
||||
status, list[str]: Status values that need to be considered for filter (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: list[Pet]
|
||||
"""
|
||||
|
||||
@ -133,7 +130,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method findPetsByStatus" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method find_pets_by_status" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -168,15 +165,14 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def findPetsByTags(self, **kwargs):
|
||||
def find_pets_by_tags(self, **kwargs):
|
||||
"""Finds Pets by tags
|
||||
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
Args:
|
||||
|
||||
tags, list[str]: Tags to filter by (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: list[Pet]
|
||||
"""
|
||||
|
||||
@ -185,7 +181,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method findPetsByTags" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method find_pets_by_tags" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -220,15 +216,14 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def getPetById(self, **kwargs):
|
||||
def get_pet_by_id(self, **kwargs):
|
||||
"""Find pet by ID
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, int: ID of pet that needs to be fetched (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Pet
|
||||
"""
|
||||
|
||||
@ -237,7 +232,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method getPetById" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method get_pet_by_id" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -274,21 +269,16 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def updatePetWithForm(self, **kwargs):
|
||||
def update_pet_with_form(self, **kwargs):
|
||||
"""Updates a pet in the store with form data
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, str: ID of pet that needs to be updated (required)
|
||||
|
||||
|
||||
name, str: Updated name of the pet (required)
|
||||
|
||||
|
||||
status, str: Updated status of the pet (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -297,7 +287,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method updatePetWithForm" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method update_pet_with_form" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -328,18 +318,15 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def deletePet(self, **kwargs):
|
||||
def delete_pet(self, **kwargs):
|
||||
"""Deletes a pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
api_key, str: (required)
|
||||
|
||||
|
||||
pet_id, int: Pet id to delete (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -348,7 +335,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method deletePet" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method delete_pet" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -382,21 +369,16 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def uploadFile(self, **kwargs):
|
||||
def upload_file(self, **kwargs):
|
||||
"""uploads an image
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
pet_id, int: ID of pet to update (required)
|
||||
|
||||
|
||||
additional_metadata, str: Additional data to pass to server (required)
|
||||
|
||||
|
||||
file, file: file to upload (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -405,7 +387,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method uploadFile" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method upload_file" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
@ -30,12 +30,13 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def getInventory(self, **kwargs):
|
||||
def get_inventory(self, **kwargs):
|
||||
"""Returns pet inventories by status
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
Args:
|
||||
|
||||
|
||||
|
||||
Returns: map(String, int)
|
||||
"""
|
||||
|
||||
@ -44,7 +45,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method getInventory" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method get_inventory" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -76,15 +77,14 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def placeOrder(self, **kwargs):
|
||||
def place_order(self, **kwargs):
|
||||
"""Place an order for a pet
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, Order: order placed for purchasing the pet (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Order
|
||||
"""
|
||||
|
||||
@ -93,7 +93,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method placeOrder" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method place_order" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -125,15 +125,14 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def getOrderById(self, **kwargs):
|
||||
def get_order_by_id(self, **kwargs):
|
||||
"""Find purchase order by ID
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
Args:
|
||||
|
||||
order_id, str: ID of pet that needs to be fetched (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: Order
|
||||
"""
|
||||
|
||||
@ -142,7 +141,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method getOrderById" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method get_order_by_id" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -179,15 +178,14 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def deleteOrder(self, **kwargs):
|
||||
def delete_order(self, **kwargs):
|
||||
"""Delete purchase order by ID
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
Args:
|
||||
|
||||
order_id, str: ID of the order that needs to be deleted (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -196,7 +194,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method deleteOrder" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method delete_order" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
@ -30,15 +30,14 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUser(self, **kwargs):
|
||||
def create_user(self, **kwargs):
|
||||
"""Create user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
body, User: Created user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -47,7 +46,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method createUser" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method create_user" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -73,15 +72,14 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUsersWithArrayInput(self, **kwargs):
|
||||
def create_users_with_array_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, list[User]: List of user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -90,7 +88,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithArrayInput" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method create_users_with_array_input" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -116,15 +114,14 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUsersWithListInput(self, **kwargs):
|
||||
def create_users_with_list_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
body, list[User]: List of user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -133,7 +130,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method createUsersWithListInput" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method create_users_with_list_input" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -159,18 +156,15 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def loginUser(self, **kwargs):
|
||||
def login_user(self, **kwargs):
|
||||
"""Logs user into the system
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The user name for login (required)
|
||||
|
||||
|
||||
password, str: The password for login in clear text (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: str
|
||||
"""
|
||||
|
||||
@ -179,7 +173,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method loginUser" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method login_user" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -217,12 +211,13 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def logoutUser(self, **kwargs):
|
||||
def logout_user(self, **kwargs):
|
||||
"""Logs out current logged in user session
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -231,7 +226,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method logoutUser" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method logout_user" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -257,15 +252,14 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def getUserByName(self, **kwargs):
|
||||
def get_user_by_name(self, **kwargs):
|
||||
"""Get user by user name
|
||||
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The name that needs to be fetched. Use user1 for testing. (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns: User
|
||||
"""
|
||||
|
||||
@ -274,7 +268,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method getUserByName" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method get_user_by_name" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -311,18 +305,15 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def updateUser(self, **kwargs):
|
||||
def update_user(self, **kwargs):
|
||||
"""Updated user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
username, str: name that need to be deleted (required)
|
||||
|
||||
|
||||
body, User: Updated user object (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -331,7 +322,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method updateUser" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method update_user" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
@ -362,15 +353,14 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def deleteUser(self, **kwargs):
|
||||
def delete_user(self, **kwargs):
|
||||
"""Delete user
|
||||
This can only be done by the logged in user.
|
||||
|
||||
Args:
|
||||
|
||||
username, str: The name that needs to be deleted (required)
|
||||
|
||||
|
||||
|
||||
|
||||
Returns:
|
||||
"""
|
||||
|
||||
@ -379,7 +369,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].items():
|
||||
if key not in allParams:
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method deleteUser" % key)
|
||||
raise TypeError("Got an unexpected keyword argument '%s' to method delete_user" % key)
|
||||
params[key] = val
|
||||
del params['kwargs']
|
||||
|
||||
|
@ -18,6 +18,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
def updatePet (body: Pet) = {
|
||||
// create path and map variables
|
||||
val path = "/pet".replaceAll("\\{format\\}","json")
|
||||
@ -53,6 +59,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
* @return void
|
||||
*/
|
||||
def addPet (body: Pet) = {
|
||||
// create path and map variables
|
||||
val path = "/pet".replaceAll("\\{format\\}","json")
|
||||
@ -88,6 +100,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma seperated strings
|
||||
* @param status Status values that need to be considered for filter
|
||||
* @return List[Pet]
|
||||
*/
|
||||
def findPetsByStatus (status: List[String]) : Option[List[Pet]] = {
|
||||
// create path and map variables
|
||||
val path = "/pet/findByStatus".replaceAll("\\{format\\}","json")
|
||||
@ -122,6 +140,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by
|
||||
* @return List[Pet]
|
||||
*/
|
||||
def findPetsByTags (tags: List[String]) : Option[List[Pet]] = {
|
||||
// create path and map variables
|
||||
val path = "/pet/findByTags".replaceAll("\\{format\\}","json")
|
||||
@ -156,6 +180,12 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param petId ID of pet that needs to be fetched
|
||||
* @return Pet
|
||||
*/
|
||||
def getPetById (petId: Long) : Option[Pet] = {
|
||||
// create path and map variables
|
||||
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
|
||||
@ -191,6 +221,14 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated
|
||||
* @param name Updated name of the pet
|
||||
* @param status Updated status of the pet
|
||||
* @return void
|
||||
*/
|
||||
def updatePetWithForm (petId: String, name: String, status: String) = {
|
||||
// create path and map variables
|
||||
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
|
||||
@ -225,6 +263,13 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param api_key
|
||||
* @param petId Pet id to delete
|
||||
* @return void
|
||||
*/
|
||||
def deletePet (api_key: String, petId: Long) = {
|
||||
// create path and map variables
|
||||
val path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
|
||||
@ -260,6 +305,14 @@ class PetApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
* @return void
|
||||
*/
|
||||
def uploadFile (petId: Long, additionalMetadata: String, file: File) = {
|
||||
// create path and map variables
|
||||
val path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}",apiInvoker.escape(petId))
|
||||
|
@ -17,6 +17,11 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return Map[String, Integer]
|
||||
*/
|
||||
def getInventory () : Option[Map[String, Integer]] = {
|
||||
// create path and map variables
|
||||
val path = "/store/inventory".replaceAll("\\{format\\}","json")
|
||||
@ -50,6 +55,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet
|
||||
* @return Order
|
||||
*/
|
||||
def placeOrder (body: Order) : Option[Order] = {
|
||||
// create path and map variables
|
||||
val path = "/store/order".replaceAll("\\{format\\}","json")
|
||||
@ -86,6 +97,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
def getOrderById (orderId: String) : Option[Order] = {
|
||||
// create path and map variables
|
||||
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
|
||||
@ -121,6 +138,12 @@ class StoreApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
* @return void
|
||||
*/
|
||||
def deleteOrder (orderId: String) = {
|
||||
// create path and map variables
|
||||
val path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}",apiInvoker.escape(orderId))
|
||||
|
@ -17,6 +17,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
def addHeader(key: String, value: String) = apiInvoker.defaultHeaders += key -> value
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object
|
||||
* @return void
|
||||
*/
|
||||
def createUser (body: User) = {
|
||||
// create path and map variables
|
||||
val path = "/user".replaceAll("\\{format\\}","json")
|
||||
@ -52,6 +58,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @return void
|
||||
*/
|
||||
def createUsersWithArrayInput (body: List[User]) = {
|
||||
// create path and map variables
|
||||
val path = "/user/createWithArray".replaceAll("\\{format\\}","json")
|
||||
@ -87,6 +99,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object
|
||||
* @return void
|
||||
*/
|
||||
def createUsersWithListInput (body: List[User]) = {
|
||||
// create path and map variables
|
||||
val path = "/user/createWithList".replaceAll("\\{format\\}","json")
|
||||
@ -122,6 +140,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
* @return String
|
||||
*/
|
||||
def loginUser (username: String, password: String) : Option[String] = {
|
||||
// create path and map variables
|
||||
val path = "/user/login".replaceAll("\\{format\\}","json")
|
||||
@ -157,6 +182,11 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
def logoutUser () = {
|
||||
// create path and map variables
|
||||
val path = "/user/logout".replaceAll("\\{format\\}","json")
|
||||
@ -189,6 +219,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return User
|
||||
*/
|
||||
def getUserByName (username: String) : Option[User] = {
|
||||
// create path and map variables
|
||||
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
|
||||
@ -224,6 +260,13 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
* @return void
|
||||
*/
|
||||
def updateUser (username: String, body: User) = {
|
||||
// create path and map variables
|
||||
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
|
||||
@ -261,6 +304,12 @@ class UserApi(val defBasePath: String = "http://petstore.swagger.io/v2",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted
|
||||
* @return void
|
||||
*/
|
||||
def deleteUser (username: String) = {
|
||||
// create path and map variables
|
||||
val path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}",apiInvoker.escape(username))
|
||||
|
Loading…
x
Reference in New Issue
Block a user