forked from loafle/openapi-generator-original
update samples, docs
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import connexion
|
||||
import six
|
||||
from typing import Dict
|
||||
from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
from openapi_server.models.api_response import ApiResponse # noqa: E501
|
||||
from openapi_server.models.pet import Pet # noqa: E501
|
||||
@@ -14,7 +17,7 @@ def add_pet(body): # noqa: E501
|
||||
:param body: Pet object that needs to be added to the store
|
||||
:type body: dict | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = Pet.from_dict(connexion.request.get_json()) # noqa: E501
|
||||
@@ -31,7 +34,7 @@ def delete_pet(pet_id, api_key=None): # noqa: E501
|
||||
:param api_key:
|
||||
:type api_key: str
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -44,7 +47,7 @@ def find_pets_by_status(status): # noqa: E501
|
||||
:param status: Status values that need to be considered for filter
|
||||
:type status: List[str]
|
||||
|
||||
:rtype: List[Pet]
|
||||
:rtype: Union[List[Pet], Tuple[List[Pet], int], Tuple[List[Pet], int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -57,7 +60,7 @@ def find_pets_by_tags(tags): # noqa: E501
|
||||
:param tags: Tags to filter by
|
||||
:type tags: List[str]
|
||||
|
||||
:rtype: List[Pet]
|
||||
:rtype: Union[List[Pet], Tuple[List[Pet], int], Tuple[List[Pet], int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -70,7 +73,7 @@ def get_pet_by_id(pet_id): # noqa: E501
|
||||
:param pet_id: ID of pet to return
|
||||
:type pet_id: int
|
||||
|
||||
:rtype: Pet
|
||||
:rtype: Union[Pet, Tuple[Pet, int], Tuple[Pet, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -83,7 +86,7 @@ def update_pet(body): # noqa: E501
|
||||
:param body: Pet object that needs to be added to the store
|
||||
:type body: dict | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = Pet.from_dict(connexion.request.get_json()) # noqa: E501
|
||||
@@ -102,7 +105,7 @@ def update_pet_with_form(pet_id, name=None, status=None): # noqa: E501
|
||||
:param status: Updated status of the pet
|
||||
:type status: str
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -119,6 +122,6 @@ def upload_file(pet_id, additional_metadata=None, file=None): # noqa: E501
|
||||
:param file: file to upload
|
||||
:type file: str
|
||||
|
||||
:rtype: ApiResponse
|
||||
:rtype: Union[ApiResponse, Tuple[ApiResponse, int], Tuple[ApiResponse, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import connexion
|
||||
import six
|
||||
from typing import Dict
|
||||
from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
from openapi_server.models.order import Order # noqa: E501
|
||||
from openapi_server import util
|
||||
@@ -13,7 +16,7 @@ def delete_order(order_id): # noqa: E501
|
||||
:param order_id: ID of the order that needs to be deleted
|
||||
:type order_id: str
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -24,7 +27,7 @@ def get_inventory(): # noqa: E501
|
||||
Returns a map of status codes to quantities # noqa: E501
|
||||
|
||||
|
||||
:rtype: Dict[str, int]
|
||||
:rtype: Union[Dict[str, int], Tuple[Dict[str, int], int], Tuple[Dict[str, int], int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -37,7 +40,7 @@ def get_order_by_id(order_id): # noqa: E501
|
||||
:param order_id: ID of pet that needs to be fetched
|
||||
:type order_id: int
|
||||
|
||||
:rtype: Order
|
||||
:rtype: Union[Order, Tuple[Order, int], Tuple[Order, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -50,7 +53,7 @@ def place_order(body): # noqa: E501
|
||||
:param body: order placed for purchasing the pet
|
||||
:type body: dict | bytes
|
||||
|
||||
:rtype: Order
|
||||
:rtype: Union[Order, Tuple[Order, int], Tuple[Order, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = Order.from_dict(connexion.request.get_json()) # noqa: E501
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import connexion
|
||||
import six
|
||||
from typing import Dict
|
||||
from typing import Tuple
|
||||
from typing import Union
|
||||
|
||||
from openapi_server.models.user import User # noqa: E501
|
||||
from openapi_server import util
|
||||
@@ -13,7 +16,7 @@ def create_user(body): # noqa: E501
|
||||
:param body: Created user object
|
||||
:type body: dict | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = User.from_dict(connexion.request.get_json()) # noqa: E501
|
||||
@@ -28,7 +31,7 @@ def create_users_with_array_input(body): # noqa: E501
|
||||
:param body: List of user object
|
||||
:type body: list | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = [User.from_dict(d) for d in connexion.request.get_json()] # noqa: E501
|
||||
@@ -43,7 +46,7 @@ def create_users_with_list_input(body): # noqa: E501
|
||||
:param body: List of user object
|
||||
:type body: list | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = [User.from_dict(d) for d in connexion.request.get_json()] # noqa: E501
|
||||
@@ -58,7 +61,7 @@ def delete_user(username): # noqa: E501
|
||||
:param username: The name that needs to be deleted
|
||||
:type username: str
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -71,7 +74,7 @@ def get_user_by_name(username): # noqa: E501
|
||||
:param username: The name that needs to be fetched. Use user1 for testing.
|
||||
:type username: str
|
||||
|
||||
:rtype: User
|
||||
:rtype: Union[User, Tuple[User, int], Tuple[User, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -86,7 +89,7 @@ def login_user(username, password): # noqa: E501
|
||||
:param password: The password for login in clear text
|
||||
:type password: str
|
||||
|
||||
:rtype: str
|
||||
:rtype: Union[str, Tuple[str, int], Tuple[str, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -97,7 +100,7 @@ def logout_user(): # noqa: E501
|
||||
# noqa: E501
|
||||
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
@@ -112,7 +115,7 @@ def update_user(username, body): # noqa: E501
|
||||
:param body: Updated user object
|
||||
:type body: dict | bytes
|
||||
|
||||
:rtype: None
|
||||
:rtype: Union[None, Tuple[None, int], Tuple[None, int, Dict[str, str]]
|
||||
"""
|
||||
if connexion.request.is_json:
|
||||
body = User.from_dict(connexion.request.get_json()) # noqa: E501
|
||||
|
||||
Reference in New Issue
Block a user