mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 14:57:13 +00:00
update method name based on style guide, update petstore sample
This commit is contained in:
@@ -33,7 +33,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def updatePet(self, **kwargs):
|
||||
def update_pet(self, **kwargs):
|
||||
"""Update an existing pet
|
||||
|
||||
Args:
|
||||
@@ -50,7 +50,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -92,7 +92,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def addPet(self, **kwargs):
|
||||
def add_pet(self, **kwargs):
|
||||
"""Add a new pet to the store
|
||||
|
||||
Args:
|
||||
@@ -109,7 +109,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -151,7 +151,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def findPetsByStatus(self, **kwargs):
|
||||
def find_pets_by_status(self, **kwargs):
|
||||
"""Finds Pets by status
|
||||
|
||||
Args:
|
||||
@@ -168,7 +168,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -216,7 +216,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def findPetsByTags(self, **kwargs):
|
||||
def find_pets_by_tags(self, **kwargs):
|
||||
"""Finds Pets by tags
|
||||
|
||||
Args:
|
||||
@@ -233,7 +233,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -281,7 +281,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def getPetById(self, **kwargs):
|
||||
def get_pet_by_id(self, **kwargs):
|
||||
"""Find pet by ID
|
||||
|
||||
Args:
|
||||
@@ -298,7 +298,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -349,7 +349,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def updatePetWithForm(self, **kwargs):
|
||||
def update_pet_with_form(self, **kwargs):
|
||||
"""Updates a pet in the store with form data
|
||||
|
||||
Args:
|
||||
@@ -372,7 +372,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -423,7 +423,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def deletePet(self, **kwargs):
|
||||
def delete_pet(self, **kwargs):
|
||||
"""Deletes a pet
|
||||
|
||||
Args:
|
||||
@@ -443,7 +443,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -491,7 +491,7 @@ class PetApi(object):
|
||||
|
||||
|
||||
|
||||
def uploadFile(self, **kwargs):
|
||||
def upload_file(self, **kwargs):
|
||||
"""uploads an image
|
||||
|
||||
Args:
|
||||
@@ -514,7 +514,7 @@ class PetApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def getInventory(self, **kwargs):
|
||||
def get_inventory(self, **kwargs):
|
||||
"""Returns pet inventories by status
|
||||
|
||||
Args:
|
||||
@@ -47,7 +47,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -92,7 +92,7 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def placeOrder(self, **kwargs):
|
||||
def place_order(self, **kwargs):
|
||||
"""Place an order for a pet
|
||||
|
||||
Args:
|
||||
@@ -109,7 +109,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -157,7 +157,7 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def getOrderById(self, **kwargs):
|
||||
def get_order_by_id(self, **kwargs):
|
||||
"""Find purchase order by ID
|
||||
|
||||
Args:
|
||||
@@ -174,7 +174,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -225,7 +225,7 @@ class StoreApi(object):
|
||||
|
||||
|
||||
|
||||
def deleteOrder(self, **kwargs):
|
||||
def delete_order(self, **kwargs):
|
||||
"""Delete purchase order by ID
|
||||
|
||||
Args:
|
||||
@@ -242,7 +242,7 @@ class StoreApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUser(self, **kwargs):
|
||||
def create_user(self, **kwargs):
|
||||
"""Create user
|
||||
|
||||
Args:
|
||||
@@ -50,7 +50,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -92,7 +92,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUsersWithArrayInput(self, **kwargs):
|
||||
def create_users_with_array_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
Args:
|
||||
@@ -109,7 +109,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -151,7 +151,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def createUsersWithListInput(self, **kwargs):
|
||||
def create_users_with_list_input(self, **kwargs):
|
||||
"""Creates list of users with given input array
|
||||
|
||||
Args:
|
||||
@@ -168,7 +168,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -210,7 +210,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def loginUser(self, **kwargs):
|
||||
def login_user(self, **kwargs):
|
||||
"""Logs user into the system
|
||||
|
||||
Args:
|
||||
@@ -230,7 +230,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -281,7 +281,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def logoutUser(self, **kwargs):
|
||||
def logout_user(self, **kwargs):
|
||||
"""Logs out current logged in user session
|
||||
|
||||
Args:
|
||||
@@ -295,7 +295,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -334,7 +334,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def getUserByName(self, **kwargs):
|
||||
def get_user_by_name(self, **kwargs):
|
||||
"""Get user by user name
|
||||
|
||||
Args:
|
||||
@@ -351,7 +351,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -402,7 +402,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def updateUser(self, **kwargs):
|
||||
def update_user(self, **kwargs):
|
||||
"""Updated user
|
||||
|
||||
Args:
|
||||
@@ -422,7 +422,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
@@ -470,7 +470,7 @@ class UserApi(object):
|
||||
|
||||
|
||||
|
||||
def deleteUser(self, **kwargs):
|
||||
def delete_user(self, **kwargs):
|
||||
"""Delete user
|
||||
|
||||
Args:
|
||||
@@ -487,7 +487,7 @@ class UserApi(object):
|
||||
params = locals()
|
||||
for (key, val) in params['kwargs'].iteritems():
|
||||
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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user