Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated python sample #10328

Merged
merged 1 commit into from
Jun 19, 2020
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
2 changes: 1 addition & 1 deletion samples/client/petstore/python/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.19-SNAPSHOT
3.0.21-SNAPSHOT
1 change: 0 additions & 1 deletion samples/client/petstore/python/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **str** | | [optional]
**foo** | **bool** | | [optional]
**bar** | **int** | | [optional]
**beer** | **str** | | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
**name** | **str** | |
**photo_urls** | **list[str]** | |
**tags** | [**list[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 0 additions & 2 deletions samples/client/petstore/python/docs/Cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**color** | **str** | | [optional] [default to 'red']
**declawed** | **bool** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 0 additions & 2 deletions samples/client/petstore/python/docs/Dog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**color** | **str** | | [optional] [default to 'red']
**breed** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import six


class AdditionalPropertiesClass(object):
"""NOTE: This class is auto generated by the swagger code generator program.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import re # noqa: F401

import six
from swagger_client.models.category import Category # noqa: F401,E501


class AllOfSubCategoryCategory(object):
class AllOfSubCategoryCategory(Category):
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
Expand All @@ -29,8 +29,6 @@ class AllOfSubCategoryCategory(object):
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'name': 'str',
'foo': 'bool',
'bar': 'int',
'beer': 'str',
Expand All @@ -40,8 +38,6 @@ class AllOfSubCategoryCategory(object):
swagger_types.update(Category.swagger_types)

attribute_map = {
'id': 'id',
'name': 'name',
'foo': 'foo',
'bar': 'bar',
'beer': 'beer',
Expand All @@ -50,19 +46,13 @@ class AllOfSubCategoryCategory(object):
if hasattr(Category, "attribute_map"):
attribute_map.update(Category.attribute_map)

def __init__(self, id=None, name=None, foo=None, bar=None, beer=None, drunk=None, *args, **kwargs): # noqa: E501
def __init__(self, foo=None, bar=None, beer=None, drunk=None, *args, **kwargs): # noqa: E501
"""AllOfSubCategoryCategory - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._foo = None
self._bar = None
self._beer = None
self._drunk = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
self.name = name
if foo is not None:
self.foo = foo
if bar is not None:
Expand All @@ -73,48 +63,6 @@ def __init__(self, id=None, name=None, foo=None, bar=None, beer=None, drunk=None
self.drunk = drunk
Category.__init__(self, *args, **kwargs)

@property
def id(self):
"""Gets the id of this AllOfSubCategoryCategory. # noqa: E501


:return: The id of this AllOfSubCategoryCategory. # noqa: E501
:rtype: int
"""
return self._id

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


:param id: The id of this AllOfSubCategoryCategory. # noqa: E501
:type: int
"""

self._id = id

@property
def name(self):
"""Gets the name of this AllOfSubCategoryCategory. # noqa: E501


:return: The name of this AllOfSubCategoryCategory. # noqa: E501
:rtype: str
"""
return self._name

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


:param name: The name of this AllOfSubCategoryCategory. # noqa: E501
:type: str
"""

self._name = name

@property
def foo(self):
"""Gets the foo of this AllOfSubCategoryCategory. # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import re # noqa: F401

import six
from swagger_client.models.pet import Pet # noqa: F401,E501


class AllOfSubCategoryPetsItems(object):
class AllOfSubCategoryPetsItems(Pet):
"""NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
Expand All @@ -29,186 +29,20 @@ class AllOfSubCategoryPetsItems(object):
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'category': 'Category',
'name': 'str',
'photo_urls': 'list[str]',
'tags': 'list[Tag]',
'status': 'str'
}
if hasattr(Pet, "swagger_types"):
swagger_types.update(Pet.swagger_types)

attribute_map = {
'id': 'id',
'category': 'category',
'name': 'name',
'photo_urls': 'photoUrls',
'tags': 'tags',
'status': 'status'
}
if hasattr(Pet, "attribute_map"):
attribute_map.update(Pet.attribute_map)

def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, *args, **kwargs): # noqa: E501
def __init__(self, *args, **kwargs): # noqa: E501
"""AllOfSubCategoryPetsItems - a model defined in Swagger""" # noqa: E501
self._id = None
self._category = None
self._name = None
self._photo_urls = None
self._tags = None
self._status = None
self.discriminator = None
if id is not None:
self.id = id
if category is not None:
self.category = category
self.name = name
self.photo_urls = photo_urls
if tags is not None:
self.tags = tags
if status is not None:
self.status = status
Pet.__init__(self, *args, **kwargs)

@property
def id(self):
"""Gets the id of this AllOfSubCategoryPetsItems. # noqa: E501


:return: The id of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: int
"""
return self._id

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


:param id: The id of this AllOfSubCategoryPetsItems. # noqa: E501
:type: int
"""

self._id = id

@property
def category(self):
"""Gets the category of this AllOfSubCategoryPetsItems. # noqa: E501


:return: The category of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: Category
"""
return self._category

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


:param category: The category of this AllOfSubCategoryPetsItems. # noqa: E501
:type: Category
"""

self._category = category

@property
def name(self):
"""Gets the name of this AllOfSubCategoryPetsItems. # noqa: E501


:return: The name of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: str
"""
return self._name

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


:param name: The name of this AllOfSubCategoryPetsItems. # noqa: E501
:type: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501

self._name = name

@property
def photo_urls(self):
"""Gets the photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501


:return: The photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: list[str]
"""
return self._photo_urls

@photo_urls.setter
def photo_urls(self, photo_urls):
"""Sets the photo_urls of this AllOfSubCategoryPetsItems.


:param photo_urls: The photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501
:type: list[str]
"""
if photo_urls is None:
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501

self._photo_urls = photo_urls

@property
def tags(self):
"""Gets the tags of this AllOfSubCategoryPetsItems. # noqa: E501


:return: The tags of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: list[Tag]
"""
return self._tags

@tags.setter
def tags(self, tags):
"""Sets the tags of this AllOfSubCategoryPetsItems.


:param tags: The tags of this AllOfSubCategoryPetsItems. # noqa: E501
:type: list[Tag]
"""

self._tags = tags

@property
def status(self):
"""Gets the status of this AllOfSubCategoryPetsItems. # noqa: E501

pet status in the store # noqa: E501

:return: The status of this AllOfSubCategoryPetsItems. # noqa: E501
:rtype: str
"""
return self._status

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

pet status in the store # noqa: E501

:param status: The status of this AllOfSubCategoryPetsItems. # noqa: E501
:type: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if status not in allowed_values:
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
.format(status, allowed_values)
)

self._status = status

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import six


class AllPetsResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import six


class Animal(object):
"""NOTE: This class is auto generated by the swagger code generator program.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import six


class AnimalFarm(object):
"""NOTE: This class is auto generated by the swagger code generator program.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import six


class ApiResponse(object):
"""NOTE: This class is auto generated by the swagger code generator program.

Expand Down
Loading