Skip to content

Commit 3b742d9

Browse files
committed
updated python sample
1 parent 0708816 commit 3b742d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+15
-400
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.19-SNAPSHOT
1+
3.0.21-SNAPSHOT

samples/client/petstore/python/.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "2.7"
54
- "3.2"
65
- "3.3"
76
- "3.4"

samples/client/petstore/python/docs/AllOfSubCategoryCategory.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**id** | **int** | | [optional]
7-
**name** | **str** | | [optional]
86
**foo** | **bool** | | [optional]
97
**bar** | **int** | | [optional]
108
**beer** | **str** | | [optional]

samples/client/petstore/python/docs/AllOfSubCategoryPetsItems.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**id** | **int** | | [optional]
7-
**category** | [**Category**](Category.md) | | [optional]
8-
**name** | **str** | |
9-
**photo_urls** | **list[str]** | |
10-
**tags** | [**list[Tag]**](Tag.md) | | [optional]
11-
**status** | **str** | pet status in the store | [optional]
126

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

samples/client/petstore/python/docs/Cat.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**class_name** | **str** | |
7-
**color** | **str** | | [optional] [default to 'red']
86
**declawed** | **bool** | | [optional]
97

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

samples/client/petstore/python/docs/Dog.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**class_name** | **str** | |
7-
**color** | **str** | | [optional] [default to 'red']
86
**breed** | **str** | | [optional]
97

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

samples/client/petstore/python/swagger_client/models/additional_properties_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import six
1717

18-
1918
class AdditionalPropertiesClass(object):
2019
"""NOTE: This class is auto generated by the swagger code generator program.
2120

samples/client/petstore/python/swagger_client/models/all_of_sub_category_category.py

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
import re # noqa: F401
1515

1616
import six
17+
from swagger_client.models.category import Category # noqa: F401,E501
1718

18-
19-
class AllOfSubCategoryCategory(object):
19+
class AllOfSubCategoryCategory(Category):
2020
"""NOTE: This class is auto generated by the swagger code generator program.
2121
2222
Do not edit the class manually.
@@ -29,8 +29,6 @@ class AllOfSubCategoryCategory(object):
2929
and the value is json key in definition.
3030
"""
3131
swagger_types = {
32-
'id': 'int',
33-
'name': 'str',
3432
'foo': 'bool',
3533
'bar': 'int',
3634
'beer': 'str',
@@ -40,8 +38,6 @@ class AllOfSubCategoryCategory(object):
4038
swagger_types.update(Category.swagger_types)
4139

4240
attribute_map = {
43-
'id': 'id',
44-
'name': 'name',
4541
'foo': 'foo',
4642
'bar': 'bar',
4743
'beer': 'beer',
@@ -50,19 +46,13 @@ class AllOfSubCategoryCategory(object):
5046
if hasattr(Category, "attribute_map"):
5147
attribute_map.update(Category.attribute_map)
5248

53-
def __init__(self, id=None, name=None, foo=None, bar=None, beer=None, drunk=None, *args, **kwargs): # noqa: E501
49+
def __init__(self, foo=None, bar=None, beer=None, drunk=None, *args, **kwargs): # noqa: E501
5450
"""AllOfSubCategoryCategory - a model defined in Swagger""" # noqa: E501
55-
self._id = None
56-
self._name = None
5751
self._foo = None
5852
self._bar = None
5953
self._beer = None
6054
self._drunk = None
6155
self.discriminator = None
62-
if id is not None:
63-
self.id = id
64-
if name is not None:
65-
self.name = name
6656
if foo is not None:
6757
self.foo = foo
6858
if bar is not None:
@@ -73,48 +63,6 @@ def __init__(self, id=None, name=None, foo=None, bar=None, beer=None, drunk=None
7363
self.drunk = drunk
7464
Category.__init__(self, *args, **kwargs)
7565

76-
@property
77-
def id(self):
78-
"""Gets the id of this AllOfSubCategoryCategory. # noqa: E501
79-
80-
81-
:return: The id of this AllOfSubCategoryCategory. # noqa: E501
82-
:rtype: int
83-
"""
84-
return self._id
85-
86-
@id.setter
87-
def id(self, id):
88-
"""Sets the id of this AllOfSubCategoryCategory.
89-
90-
91-
:param id: The id of this AllOfSubCategoryCategory. # noqa: E501
92-
:type: int
93-
"""
94-
95-
self._id = id
96-
97-
@property
98-
def name(self):
99-
"""Gets the name of this AllOfSubCategoryCategory. # noqa: E501
100-
101-
102-
:return: The name of this AllOfSubCategoryCategory. # noqa: E501
103-
:rtype: str
104-
"""
105-
return self._name
106-
107-
@name.setter
108-
def name(self, name):
109-
"""Sets the name of this AllOfSubCategoryCategory.
110-
111-
112-
:param name: The name of this AllOfSubCategoryCategory. # noqa: E501
113-
:type: str
114-
"""
115-
116-
self._name = name
117-
11866
@property
11967
def foo(self):
12068
"""Gets the foo of this AllOfSubCategoryCategory. # noqa: E501

samples/client/petstore/python/swagger_client/models/all_of_sub_category_pets_items.py

Lines changed: 3 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
import re # noqa: F401
1515

1616
import six
17+
from swagger_client.models.pet import Pet # noqa: F401,E501
1718

18-
19-
class AllOfSubCategoryPetsItems(object):
19+
class AllOfSubCategoryPetsItems(Pet):
2020
"""NOTE: This class is auto generated by the swagger code generator program.
2121
2222
Do not edit the class manually.
@@ -29,186 +29,20 @@ class AllOfSubCategoryPetsItems(object):
2929
and the value is json key in definition.
3030
"""
3131
swagger_types = {
32-
'id': 'int',
33-
'category': 'Category',
34-
'name': 'str',
35-
'photo_urls': 'list[str]',
36-
'tags': 'list[Tag]',
37-
'status': 'str'
3832
}
3933
if hasattr(Pet, "swagger_types"):
4034
swagger_types.update(Pet.swagger_types)
4135

4236
attribute_map = {
43-
'id': 'id',
44-
'category': 'category',
45-
'name': 'name',
46-
'photo_urls': 'photoUrls',
47-
'tags': 'tags',
48-
'status': 'status'
4937
}
5038
if hasattr(Pet, "attribute_map"):
5139
attribute_map.update(Pet.attribute_map)
5240

53-
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None, *args, **kwargs): # noqa: E501
41+
def __init__(self, *args, **kwargs): # noqa: E501
5442
"""AllOfSubCategoryPetsItems - a model defined in Swagger""" # noqa: E501
55-
self._id = None
56-
self._category = None
57-
self._name = None
58-
self._photo_urls = None
59-
self._tags = None
60-
self._status = None
6143
self.discriminator = None
62-
if id is not None:
63-
self.id = id
64-
if category is not None:
65-
self.category = category
66-
self.name = name
67-
self.photo_urls = photo_urls
68-
if tags is not None:
69-
self.tags = tags
70-
if status is not None:
71-
self.status = status
7244
Pet.__init__(self, *args, **kwargs)
7345

74-
@property
75-
def id(self):
76-
"""Gets the id of this AllOfSubCategoryPetsItems. # noqa: E501
77-
78-
79-
:return: The id of this AllOfSubCategoryPetsItems. # noqa: E501
80-
:rtype: int
81-
"""
82-
return self._id
83-
84-
@id.setter
85-
def id(self, id):
86-
"""Sets the id of this AllOfSubCategoryPetsItems.
87-
88-
89-
:param id: The id of this AllOfSubCategoryPetsItems. # noqa: E501
90-
:type: int
91-
"""
92-
93-
self._id = id
94-
95-
@property
96-
def category(self):
97-
"""Gets the category of this AllOfSubCategoryPetsItems. # noqa: E501
98-
99-
100-
:return: The category of this AllOfSubCategoryPetsItems. # noqa: E501
101-
:rtype: Category
102-
"""
103-
return self._category
104-
105-
@category.setter
106-
def category(self, category):
107-
"""Sets the category of this AllOfSubCategoryPetsItems.
108-
109-
110-
:param category: The category of this AllOfSubCategoryPetsItems. # noqa: E501
111-
:type: Category
112-
"""
113-
114-
self._category = category
115-
116-
@property
117-
def name(self):
118-
"""Gets the name of this AllOfSubCategoryPetsItems. # noqa: E501
119-
120-
121-
:return: The name of this AllOfSubCategoryPetsItems. # noqa: E501
122-
:rtype: str
123-
"""
124-
return self._name
125-
126-
@name.setter
127-
def name(self, name):
128-
"""Sets the name of this AllOfSubCategoryPetsItems.
129-
130-
131-
:param name: The name of this AllOfSubCategoryPetsItems. # noqa: E501
132-
:type: str
133-
"""
134-
if name is None:
135-
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
136-
137-
self._name = name
138-
139-
@property
140-
def photo_urls(self):
141-
"""Gets the photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501
142-
143-
144-
:return: The photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501
145-
:rtype: list[str]
146-
"""
147-
return self._photo_urls
148-
149-
@photo_urls.setter
150-
def photo_urls(self, photo_urls):
151-
"""Sets the photo_urls of this AllOfSubCategoryPetsItems.
152-
153-
154-
:param photo_urls: The photo_urls of this AllOfSubCategoryPetsItems. # noqa: E501
155-
:type: list[str]
156-
"""
157-
if photo_urls is None:
158-
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
159-
160-
self._photo_urls = photo_urls
161-
162-
@property
163-
def tags(self):
164-
"""Gets the tags of this AllOfSubCategoryPetsItems. # noqa: E501
165-
166-
167-
:return: The tags of this AllOfSubCategoryPetsItems. # noqa: E501
168-
:rtype: list[Tag]
169-
"""
170-
return self._tags
171-
172-
@tags.setter
173-
def tags(self, tags):
174-
"""Sets the tags of this AllOfSubCategoryPetsItems.
175-
176-
177-
:param tags: The tags of this AllOfSubCategoryPetsItems. # noqa: E501
178-
:type: list[Tag]
179-
"""
180-
181-
self._tags = tags
182-
183-
@property
184-
def status(self):
185-
"""Gets the status of this AllOfSubCategoryPetsItems. # noqa: E501
186-
187-
pet status in the store # noqa: E501
188-
189-
:return: The status of this AllOfSubCategoryPetsItems. # noqa: E501
190-
:rtype: str
191-
"""
192-
return self._status
193-
194-
@status.setter
195-
def status(self, status):
196-
"""Sets the status of this AllOfSubCategoryPetsItems.
197-
198-
pet status in the store # noqa: E501
199-
200-
:param status: The status of this AllOfSubCategoryPetsItems. # noqa: E501
201-
:type: str
202-
"""
203-
allowed_values = ["available", "pending", "sold"] # noqa: E501
204-
if status not in allowed_values:
205-
raise ValueError(
206-
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
207-
.format(status, allowed_values)
208-
)
209-
210-
self._status = status
211-
21246
def to_dict(self):
21347
"""Returns the model properties as a dict"""
21448
result = {}

samples/client/petstore/python/swagger_client/models/all_pets_response.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import six
1717

18-
1918
class AllPetsResponse(object):
2019
"""NOTE: This class is auto generated by the swagger code generator program.
2120

0 commit comments

Comments
 (0)