mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
add optional argument to flask controller
This commit is contained in:
parent
63977a2093
commit
03b7af092b
@ -3,7 +3,7 @@
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
|
||||
def {{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{^supportPython2}} -> str{{/supportPython2}}:
|
||||
def {{operationId}}({{#allParams}}{{paramName}}{{^required}} = None{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{^supportPython2}} -> str{{/supportPython2}}:
|
||||
return 'do some magic!'
|
||||
{{/operation}}
|
||||
{{/operations}}
|
||||
|
@ -1,17 +1,17 @@
|
||||
|
||||
def add_pet(body) -> str:
|
||||
def add_pet(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def add_pet_using_byte_array(body) -> str:
|
||||
def add_pet_using_byte_array(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def delete_pet(petId, apiKey) -> str:
|
||||
def delete_pet(petId, apiKey = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def find_pets_by_status(status) -> str:
|
||||
def find_pets_by_status(status = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def find_pets_by_tags(tags) -> str:
|
||||
def find_pets_by_tags(tags = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def get_pet_by_id(petId) -> str:
|
||||
@ -23,19 +23,19 @@ def get_pet_by_id_in_object(petId) -> str:
|
||||
def pet_pet_idtesting_byte_arraytrue_get(petId) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def update_pet(body) -> str:
|
||||
def update_pet(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def update_pet_with_form(petId, name, status) -> str:
|
||||
def update_pet_with_form(petId, name = None, status = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def upload_file(petId, additionalMetadata, file) -> str:
|
||||
def upload_file(petId, additionalMetadata = None, file = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def delete_order(orderId) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def find_orders_by_status(status) -> str:
|
||||
def find_orders_by_status(status = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def get_inventory() -> str:
|
||||
@ -47,16 +47,16 @@ def get_inventory_in_object() -> str:
|
||||
def get_order_by_id(orderId) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def place_order(body) -> str:
|
||||
def place_order(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def create_user(body) -> str:
|
||||
def create_user(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def create_users_with_array_input(body) -> str:
|
||||
def create_users_with_array_input(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def create_users_with_list_input(body) -> str:
|
||||
def create_users_with_list_input(body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def delete_user(username) -> str:
|
||||
@ -65,11 +65,11 @@ def delete_user(username) -> str:
|
||||
def get_user_by_name(username) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def login_user(username, password) -> str:
|
||||
def login_user(username = None, password = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def logout_user() -> str:
|
||||
return 'do some magic!'
|
||||
|
||||
def update_user(username, body) -> str:
|
||||
def update_user(username, body = None) -> str:
|
||||
return 'do some magic!'
|
||||
|
Loading…
Reference in New Issue
Block a user