forked from loafle/openapi-generator-original
update python samples
This commit is contained in:
@@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
@@ -27,7 +29,7 @@ class Category(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
Category - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
@@ -93,7 +95,7 @@ class Category(object):
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Return model properties dict
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
@@ -113,7 +115,7 @@ class Category(object):
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Return model properties str
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
@@ -27,7 +29,7 @@ class Order(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
Order - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
@@ -199,7 +201,7 @@ class Order(object):
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Return model properties dict
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
@@ -219,7 +221,7 @@ class Order(object):
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Return model properties str
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
@@ -27,7 +29,7 @@ class Pet(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
Pet - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
@@ -199,7 +201,7 @@ class Pet(object):
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Return model properties dict
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
@@ -219,7 +221,7 @@ class Pet(object):
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Return model properties str
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
@@ -27,7 +29,7 @@ class Tag(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
Tag - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
@@ -93,7 +95,7 @@ class Tag(object):
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Return model properties dict
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
@@ -113,7 +115,7 @@ class Tag(object):
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Return model properties str
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ Copyright 2015 SmartBear Software
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Ref: https://github.com/swagger-api/swagger-codegen
|
||||
"""
|
||||
|
||||
from pprint import pformat
|
||||
@@ -27,7 +29,7 @@ class User(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
User - a model defined in Swagger
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
@@ -243,7 +245,7 @@ class User(object):
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Return model properties dict
|
||||
Returns the model properties as a dict
|
||||
"""
|
||||
result = {}
|
||||
|
||||
@@ -263,7 +265,7 @@ class User(object):
|
||||
|
||||
def to_str(self):
|
||||
"""
|
||||
Return model properties str
|
||||
Returns the string representation of the model
|
||||
"""
|
||||
return pformat(self.to_dict())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user