Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class {{classname}}(Model):

{{/-first}}
@property
def {{name}}(self):
def {{name}}(self) -> {{dataType}}:
"""Gets the {{name}} of this {{classname}}.

{{#description}}
Expand All @@ -84,7 +84,7 @@ class {{classname}}(Model):
return self._{{name}}

@{{name}}.setter
def {{name}}(self, {{name}}):
def {{name}}(self, {{name}}: {{dataType}}):
"""Sets the {{name}} of this {{classname}}.

{{#description}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def from_dict(cls, dikt) -> 'ApiResponse':
return util.deserialize_model(dikt, cls)

@property
def code(self):
def code(self) -> int:
"""Gets the code of this ApiResponse.


Expand All @@ -60,7 +60,7 @@ def code(self):
return self._code

@code.setter
def code(self, code):
def code(self, code: int):
"""Sets the code of this ApiResponse.


Expand All @@ -71,7 +71,7 @@ def code(self, code):
self._code = code

@property
def type(self):
def type(self) -> str:
"""Gets the type of this ApiResponse.


Expand All @@ -81,7 +81,7 @@ def type(self):
return self._type

@type.setter
def type(self, type):
def type(self, type: str):
"""Sets the type of this ApiResponse.


Expand All @@ -92,7 +92,7 @@ def type(self, type):
self._type = type

@property
def message(self):
def message(self) -> str:
"""Gets the message of this ApiResponse.


Expand All @@ -102,7 +102,7 @@ def message(self):
return self._message

@message.setter
def message(self, message):
def message(self, message: str):
"""Sets the message of this ApiResponse.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def from_dict(cls, dikt) -> 'Category':
return util.deserialize_model(dikt, cls)

@property
def id(self):
def id(self) -> int:
"""Gets the id of this Category.


Expand All @@ -55,7 +55,7 @@ def id(self):
return self._id

@id.setter
def id(self, id):
def id(self, id: int):
"""Sets the id of this Category.


Expand All @@ -66,7 +66,7 @@ def id(self, id):
self._id = id

@property
def name(self):
def name(self) -> str:
"""Gets the name of this Category.


Expand All @@ -76,7 +76,7 @@ def name(self):
return self._name

@name.setter
def name(self, name):
def name(self, name: str):
"""Sets the name of this Category.


Expand Down
24 changes: 12 additions & 12 deletions samples/server/petstore/python-flask/openapi_server/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def from_dict(cls, dikt) -> 'Order':
return util.deserialize_model(dikt, cls)

@property
def id(self):
def id(self) -> int:
"""Gets the id of this Order.


Expand All @@ -75,7 +75,7 @@ def id(self):
return self._id

@id.setter
def id(self, id):
def id(self, id: int):
"""Sets the id of this Order.


Expand All @@ -86,7 +86,7 @@ def id(self, id):
self._id = id

@property
def pet_id(self):
def pet_id(self) -> int:
"""Gets the pet_id of this Order.


Expand All @@ -96,7 +96,7 @@ def pet_id(self):
return self._pet_id

@pet_id.setter
def pet_id(self, pet_id):
def pet_id(self, pet_id: int):
"""Sets the pet_id of this Order.


Expand All @@ -107,7 +107,7 @@ def pet_id(self, pet_id):
self._pet_id = pet_id

@property
def quantity(self):
def quantity(self) -> int:
"""Gets the quantity of this Order.


Expand All @@ -117,7 +117,7 @@ def quantity(self):
return self._quantity

@quantity.setter
def quantity(self, quantity):
def quantity(self, quantity: int):
"""Sets the quantity of this Order.


Expand All @@ -128,7 +128,7 @@ def quantity(self, quantity):
self._quantity = quantity

@property
def ship_date(self):
def ship_date(self) -> datetime:
"""Gets the ship_date of this Order.


Expand All @@ -138,7 +138,7 @@ def ship_date(self):
return self._ship_date

@ship_date.setter
def ship_date(self, ship_date):
def ship_date(self, ship_date: datetime):
"""Sets the ship_date of this Order.


Expand All @@ -149,7 +149,7 @@ def ship_date(self, ship_date):
self._ship_date = ship_date

@property
def status(self):
def status(self) -> str:
"""Gets the status of this Order.

Order Status # noqa: E501
Expand All @@ -160,7 +160,7 @@ def status(self):
return self._status

@status.setter
def status(self, status):
def status(self, status: str):
"""Sets the status of this Order.

Order Status # noqa: E501
Expand All @@ -178,7 +178,7 @@ def status(self, status):
self._status = status

@property
def complete(self):
def complete(self) -> bool:
"""Gets the complete of this Order.


Expand All @@ -188,7 +188,7 @@ def complete(self):
return self._complete

@complete.setter
def complete(self, complete):
def complete(self, complete: bool):
"""Sets the complete of this Order.


Expand Down
24 changes: 12 additions & 12 deletions samples/server/petstore/python-flask/openapi_server/models/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def from_dict(cls, dikt) -> 'Pet':
return util.deserialize_model(dikt, cls)

@property
def id(self):
def id(self) -> int:
"""Gets the id of this Pet.


Expand All @@ -79,7 +79,7 @@ def id(self):
return self._id

@id.setter
def id(self, id):
def id(self, id: int):
"""Sets the id of this Pet.


Expand All @@ -90,7 +90,7 @@ def id(self, id):
self._id = id

@property
def category(self):
def category(self) -> Category:
"""Gets the category of this Pet.


Expand All @@ -100,7 +100,7 @@ def category(self):
return self._category

@category.setter
def category(self, category):
def category(self, category: Category):
"""Sets the category of this Pet.


Expand All @@ -111,7 +111,7 @@ def category(self, category):
self._category = category

@property
def name(self):
def name(self) -> str:
"""Gets the name of this Pet.


Expand All @@ -121,7 +121,7 @@ def name(self):
return self._name

@name.setter
def name(self, name):
def name(self, name: str):
"""Sets the name of this Pet.


Expand All @@ -134,7 +134,7 @@ def name(self, name):
self._name = name

@property
def photo_urls(self):
def photo_urls(self) -> List[str]:
"""Gets the photo_urls of this Pet.


Expand All @@ -144,7 +144,7 @@ def photo_urls(self):
return self._photo_urls

@photo_urls.setter
def photo_urls(self, photo_urls):
def photo_urls(self, photo_urls: List[str]):
"""Sets the photo_urls of this Pet.


Expand All @@ -157,7 +157,7 @@ def photo_urls(self, photo_urls):
self._photo_urls = photo_urls

@property
def tags(self):
def tags(self) -> List[Tag]:
"""Gets the tags of this Pet.


Expand All @@ -167,7 +167,7 @@ def tags(self):
return self._tags

@tags.setter
def tags(self, tags):
def tags(self, tags: List[Tag]):
"""Sets the tags of this Pet.


Expand All @@ -178,7 +178,7 @@ def tags(self, tags):
self._tags = tags

@property
def status(self):
def status(self) -> str:
"""Gets the status of this Pet.

pet status in the store # noqa: E501
Expand All @@ -189,7 +189,7 @@ def status(self):
return self._status

@status.setter
def status(self, status):
def status(self, status: str):
"""Sets the status of this Pet.

pet status in the store # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def from_dict(cls, dikt) -> 'Tag':
return util.deserialize_model(dikt, cls)

@property
def id(self):
def id(self) -> int:
"""Gets the id of this Tag.


Expand All @@ -55,7 +55,7 @@ def id(self):
return self._id

@id.setter
def id(self, id):
def id(self, id: int):
"""Sets the id of this Tag.


Expand All @@ -66,7 +66,7 @@ def id(self, id):
self._id = id

@property
def name(self):
def name(self) -> str:
"""Gets the name of this Tag.


Expand All @@ -76,7 +76,7 @@ def name(self):
return self._name

@name.setter
def name(self, name):
def name(self, name: str):
"""Sets the name of this Tag.


Expand Down
Loading