forked from loafle/openapi-generator-original
Python-exp clean up model classnames (#7054)
* Adds lazy_import, removes python-exp java class renaming code, partial removal of getPythonClassName call sites Fixes PythonClientExperimentalTest.java Python-exp smaples regeneration Revers makefile Reverst pom.xml Fixes model imports in models.__init__ Updates docstring, omits lazy import in additional properties if we dont need it Improves additional_properties_type assignment if None Removes getPythonClassName Fixes python-exp tests * Removes unused makefiles
This commit is contained in:
@@ -23,7 +23,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import client
|
||||
from petstore_api.model.client import Client
|
||||
|
||||
|
||||
class AnotherFakeApi(object):
|
||||
@@ -53,7 +53,7 @@ class AnotherFakeApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (client.Client): client model
|
||||
body (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -77,7 +77,7 @@ class AnotherFakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
client.Client
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -106,7 +106,7 @@ class AnotherFakeApi(object):
|
||||
|
||||
self.call_123_test_special_tags = Endpoint(
|
||||
settings={
|
||||
'response_type': (client.Client,),
|
||||
'response_type': (Client,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/another-fake/dummy',
|
||||
'operation_id': 'call_123_test_special_tags',
|
||||
@@ -134,7 +134,7 @@ class AnotherFakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(client.Client,),
|
||||
(Client,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
|
||||
@@ -23,14 +23,14 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import animal_farm
|
||||
from petstore_api.model import xml_item
|
||||
from petstore_api.model import number_with_validations
|
||||
from petstore_api.model import object_model_with_ref_props
|
||||
from petstore_api.model import string_enum
|
||||
from petstore_api.model import file_schema_test_class
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model import client
|
||||
from petstore_api.model.animal_farm import AnimalFarm
|
||||
from petstore_api.model.client import Client
|
||||
from petstore_api.model.file_schema_test_class import FileSchemaTestClass
|
||||
from petstore_api.model.number_with_validations import NumberWithValidations
|
||||
from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
|
||||
from petstore_api.model.string_enum import StringEnum
|
||||
from petstore_api.model.user import User
|
||||
from petstore_api.model.xml_item import XmlItem
|
||||
|
||||
|
||||
class FakeApi(object):
|
||||
@@ -60,7 +60,7 @@ class FakeApi(object):
|
||||
|
||||
|
||||
Keyword Args:
|
||||
body (animal_farm.AnimalFarm): Input model. [optional]
|
||||
body (AnimalFarm): Input model. [optional]
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
@@ -82,7 +82,7 @@ class FakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
animal_farm.AnimalFarm
|
||||
AnimalFarm
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -109,7 +109,7 @@ class FakeApi(object):
|
||||
|
||||
self.array_model = Endpoint(
|
||||
settings={
|
||||
'response_type': (animal_farm.AnimalFarm,),
|
||||
'response_type': (AnimalFarm,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/fake/refs/arraymodel',
|
||||
'operation_id': 'array_model',
|
||||
@@ -135,7 +135,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(animal_farm.AnimalFarm,),
|
||||
(AnimalFarm,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -280,7 +280,7 @@ class FakeApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
xml_item (xml_item.XmlItem): XmlItem Body
|
||||
xml_item (XmlItem): XmlItem Body
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -361,7 +361,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'xml_item':
|
||||
(xml_item.XmlItem,),
|
||||
(XmlItem,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -401,7 +401,7 @@ class FakeApi(object):
|
||||
|
||||
|
||||
Keyword Args:
|
||||
body (number_with_validations.NumberWithValidations): Input number as post body. [optional]
|
||||
body (NumberWithValidations): Input number as post body. [optional]
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
@@ -423,7 +423,7 @@ class FakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
number_with_validations.NumberWithValidations
|
||||
NumberWithValidations
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -450,7 +450,7 @@ class FakeApi(object):
|
||||
|
||||
self.number_with_validations = Endpoint(
|
||||
settings={
|
||||
'response_type': (number_with_validations.NumberWithValidations,),
|
||||
'response_type': (NumberWithValidations,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/fake/refs/number',
|
||||
'operation_id': 'number_with_validations',
|
||||
@@ -476,7 +476,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(number_with_validations.NumberWithValidations,),
|
||||
(NumberWithValidations,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -511,7 +511,7 @@ class FakeApi(object):
|
||||
|
||||
|
||||
Keyword Args:
|
||||
body (object_model_with_ref_props.ObjectModelWithRefProps): Input model. [optional]
|
||||
body (ObjectModelWithRefProps): Input model. [optional]
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
@@ -533,7 +533,7 @@ class FakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
object_model_with_ref_props.ObjectModelWithRefProps
|
||||
ObjectModelWithRefProps
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -560,7 +560,7 @@ class FakeApi(object):
|
||||
|
||||
self.object_model_with_ref_props = Endpoint(
|
||||
settings={
|
||||
'response_type': (object_model_with_ref_props.ObjectModelWithRefProps,),
|
||||
'response_type': (ObjectModelWithRefProps,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/fake/refs/object_model_with_ref_props',
|
||||
'operation_id': 'object_model_with_ref_props',
|
||||
@@ -586,7 +586,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(object_model_with_ref_props.ObjectModelWithRefProps,),
|
||||
(ObjectModelWithRefProps,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -731,7 +731,7 @@ class FakeApi(object):
|
||||
|
||||
|
||||
Keyword Args:
|
||||
body (string_enum.StringEnum): Input enum. [optional]
|
||||
body (StringEnum): Input enum. [optional]
|
||||
_return_http_data_only (bool): response data without head status
|
||||
code and headers. Default is True.
|
||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
||||
@@ -753,7 +753,7 @@ class FakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
string_enum.StringEnum
|
||||
StringEnum
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -780,7 +780,7 @@ class FakeApi(object):
|
||||
|
||||
self.string_enum = Endpoint(
|
||||
settings={
|
||||
'response_type': (string_enum.StringEnum,),
|
||||
'response_type': (StringEnum,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/fake/refs/enum',
|
||||
'operation_id': 'string_enum',
|
||||
@@ -806,7 +806,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(string_enum.StringEnum,),
|
||||
(StringEnum,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -841,7 +841,7 @@ class FakeApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (file_schema_test_class.FileSchemaTestClass):
|
||||
body (FileSchemaTestClass):
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -922,7 +922,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(file_schema_test_class.FileSchemaTestClass,),
|
||||
(FileSchemaTestClass,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -958,7 +958,7 @@ class FakeApi(object):
|
||||
|
||||
Args:
|
||||
query (str):
|
||||
body (user.User):
|
||||
body (User):
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -1045,7 +1045,7 @@ class FakeApi(object):
|
||||
'query':
|
||||
(str,),
|
||||
'body':
|
||||
(user.User,),
|
||||
(User,),
|
||||
},
|
||||
'attribute_map': {
|
||||
'query': 'query',
|
||||
@@ -1082,7 +1082,7 @@ class FakeApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (client.Client): client model
|
||||
body (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -1106,7 +1106,7 @@ class FakeApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
client.Client
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -1135,7 +1135,7 @@ class FakeApi(object):
|
||||
|
||||
self.test_client_model = Endpoint(
|
||||
settings={
|
||||
'response_type': (client.Client,),
|
||||
'response_type': (Client,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/fake',
|
||||
'operation_id': 'test_client_model',
|
||||
@@ -1163,7 +1163,7 @@ class FakeApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(client.Client,),
|
||||
(Client,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import client
|
||||
from petstore_api.model.client import Client
|
||||
|
||||
|
||||
class FakeClassnameTags123Api(object):
|
||||
@@ -53,7 +53,7 @@ class FakeClassnameTags123Api(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (client.Client): client model
|
||||
body (Client): client model
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -77,7 +77,7 @@ class FakeClassnameTags123Api(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
client.Client
|
||||
Client
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -106,7 +106,7 @@ class FakeClassnameTags123Api(object):
|
||||
|
||||
self.test_classname = Endpoint(
|
||||
settings={
|
||||
'response_type': (client.Client,),
|
||||
'response_type': (Client,),
|
||||
'auth': [
|
||||
'api_key_query'
|
||||
],
|
||||
@@ -136,7 +136,7 @@ class FakeClassnameTags123Api(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(client.Client,),
|
||||
(Client,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
|
||||
@@ -23,8 +23,8 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import pet
|
||||
from petstore_api.model import api_response
|
||||
from petstore_api.model.api_response import ApiResponse
|
||||
from petstore_api.model.pet import Pet
|
||||
|
||||
|
||||
class PetApi(object):
|
||||
@@ -53,7 +53,7 @@ class PetApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (pet.Pet): Pet object that needs to be added to the store
|
||||
body (Pet): Pet object that needs to be added to the store
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -136,7 +136,7 @@ class PetApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(pet.Pet,),
|
||||
(Pet,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -318,7 +318,7 @@ class PetApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
[pet.Pet]
|
||||
[Pet]
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -347,7 +347,7 @@ class PetApi(object):
|
||||
|
||||
self.find_pets_by_status = Endpoint(
|
||||
settings={
|
||||
'response_type': ([pet.Pet],),
|
||||
'response_type': ([Pet],),
|
||||
'auth': [
|
||||
'petstore_auth'
|
||||
],
|
||||
@@ -446,7 +446,7 @@ class PetApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
[pet.Pet]
|
||||
[Pet]
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -475,7 +475,7 @@ class PetApi(object):
|
||||
|
||||
self.find_pets_by_tags = Endpoint(
|
||||
settings={
|
||||
'response_type': ([pet.Pet],),
|
||||
'response_type': ([Pet],),
|
||||
'auth': [
|
||||
'petstore_auth'
|
||||
],
|
||||
@@ -567,7 +567,7 @@ class PetApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
pet.Pet
|
||||
Pet
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -596,7 +596,7 @@ class PetApi(object):
|
||||
|
||||
self.get_pet_by_id = Endpoint(
|
||||
settings={
|
||||
'response_type': (pet.Pet,),
|
||||
'response_type': (Pet,),
|
||||
'auth': [
|
||||
'api_key'
|
||||
],
|
||||
@@ -662,7 +662,7 @@ class PetApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (pet.Pet): Pet object that needs to be added to the store
|
||||
body (Pet): Pet object that needs to be added to the store
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -745,7 +745,7 @@ class PetApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(pet.Pet,),
|
||||
(Pet,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -937,7 +937,7 @@ class PetApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
api_response.ApiResponse
|
||||
ApiResponse
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -966,7 +966,7 @@ class PetApi(object):
|
||||
|
||||
self.upload_file = Endpoint(
|
||||
settings={
|
||||
'response_type': (api_response.ApiResponse,),
|
||||
'response_type': (ApiResponse,),
|
||||
'auth': [
|
||||
'petstore_auth'
|
||||
],
|
||||
@@ -1076,7 +1076,7 @@ class PetApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
api_response.ApiResponse
|
||||
ApiResponse
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -1107,7 +1107,7 @@ class PetApi(object):
|
||||
|
||||
self.upload_file_with_required_file = Endpoint(
|
||||
settings={
|
||||
'response_type': (api_response.ApiResponse,),
|
||||
'response_type': (ApiResponse,),
|
||||
'auth': [
|
||||
'petstore_auth'
|
||||
],
|
||||
|
||||
@@ -23,7 +23,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import order
|
||||
from petstore_api.model.order import Order
|
||||
|
||||
|
||||
class StoreApi(object):
|
||||
@@ -299,7 +299,7 @@ class StoreApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
order.Order
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -328,7 +328,7 @@ class StoreApi(object):
|
||||
|
||||
self.get_order_by_id = Endpoint(
|
||||
settings={
|
||||
'response_type': (order.Order,),
|
||||
'response_type': (Order,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/store/order/{order_id}',
|
||||
'operation_id': 'get_order_by_id',
|
||||
@@ -398,7 +398,7 @@ class StoreApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (order.Order): order placed for purchasing the pet
|
||||
body (Order): order placed for purchasing the pet
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -422,7 +422,7 @@ class StoreApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
order.Order
|
||||
Order
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -451,7 +451,7 @@ class StoreApi(object):
|
||||
|
||||
self.place_order = Endpoint(
|
||||
settings={
|
||||
'response_type': (order.Order,),
|
||||
'response_type': (Order,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/store/order',
|
||||
'operation_id': 'place_order',
|
||||
@@ -479,7 +479,7 @@ class StoreApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(order.Order,),
|
||||
(Order,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_and_convert_types
|
||||
)
|
||||
from petstore_api.model import user
|
||||
from petstore_api.model.user import User
|
||||
|
||||
|
||||
class UserApi(object):
|
||||
@@ -53,7 +53,7 @@ class UserApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body (user.User): Created user object
|
||||
body (User): Created user object
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -134,7 +134,7 @@ class UserApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
(user.User,),
|
||||
(User,),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -166,7 +166,7 @@ class UserApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body ([user.User]): List of user object
|
||||
body ([User]): List of user object
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -247,7 +247,7 @@ class UserApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
([user.User],),
|
||||
([User],),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -279,7 +279,7 @@ class UserApi(object):
|
||||
>>> result = thread.get()
|
||||
|
||||
Args:
|
||||
body ([user.User]): List of user object
|
||||
body ([User]): List of user object
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -360,7 +360,7 @@ class UserApi(object):
|
||||
},
|
||||
'openapi_types': {
|
||||
'body':
|
||||
([user.User],),
|
||||
([User],),
|
||||
},
|
||||
'attribute_map': {
|
||||
},
|
||||
@@ -531,7 +531,7 @@ class UserApi(object):
|
||||
async_req (bool): execute request asynchronously
|
||||
|
||||
Returns:
|
||||
user.User
|
||||
User
|
||||
If the method is called asynchronously, returns the request
|
||||
thread.
|
||||
"""
|
||||
@@ -560,7 +560,7 @@ class UserApi(object):
|
||||
|
||||
self.get_user_by_name = Endpoint(
|
||||
settings={
|
||||
'response_type': (user.User,),
|
||||
'response_type': (User,),
|
||||
'auth': [],
|
||||
'endpoint_path': '/user/{username}',
|
||||
'operation_id': 'get_user_by_name',
|
||||
@@ -856,7 +856,7 @@ class UserApi(object):
|
||||
|
||||
Args:
|
||||
username (str): name that need to be deleted
|
||||
body (user.User): Updated user object
|
||||
body (User): Updated user object
|
||||
|
||||
Keyword Args:
|
||||
_return_http_data_only (bool): response data without head status
|
||||
@@ -943,7 +943,7 @@ class UserApi(object):
|
||||
'username':
|
||||
(str,),
|
||||
'body':
|
||||
(user.User,),
|
||||
(User,),
|
||||
},
|
||||
'attribute_map': {
|
||||
'username': 'username',
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesAnyType(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (bool, date, datetime, dict, float, int, list, str,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesAnyType(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesAnyType(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_any_type.AdditionalPropertiesAnyType - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesAnyType - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesArray(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesArray(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesArray(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_array.AdditionalPropertiesArray - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesArray - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesBoolean(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (bool,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (bool,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesBoolean(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesBoolean(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_boolean.AdditionalPropertiesBoolean - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesBoolean - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class AdditionalPropertiesClass(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -93,6 +93,7 @@ class AdditionalPropertiesClass(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'map_string': 'map_string', # noqa: E501
|
||||
'map_number': 'map_number', # noqa: E501
|
||||
@@ -120,7 +121,7 @@ class AdditionalPropertiesClass(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_class.AdditionalPropertiesClass - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesClass - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesInteger(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (int,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (int,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesInteger(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesInteger(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_integer.AdditionalPropertiesInteger - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesInteger - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesNumber(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (float,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (float,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesNumber(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesNumber(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_number.AdditionalPropertiesNumber - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesNumber - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesObject(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesObject(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesObject(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_object.AdditionalPropertiesObject - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesObject - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class AdditionalPropertiesString(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (str,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (str,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +89,7 @@ class AdditionalPropertiesString(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +107,7 @@ class AdditionalPropertiesString(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""additional_properties_string.AdditionalPropertiesString - a model defined in OpenAPI
|
||||
"""AdditionalPropertiesString - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import cat
|
||||
except ImportError:
|
||||
cat = sys.modules[
|
||||
'petstore_api.model.cat']
|
||||
try:
|
||||
from petstore_api.model import dog
|
||||
except ImportError:
|
||||
dog = sys.modules[
|
||||
'petstore_api.model.dog']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.cat import Cat
|
||||
from petstore_api.model.dog import Dog
|
||||
globals()['Cat'] = Cat
|
||||
globals()['Dog'] = Dog
|
||||
|
||||
|
||||
class Animal(ModelNormal):
|
||||
@@ -78,13 +74,14 @@ class Animal(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'class_name': (str,), # noqa: E501
|
||||
'color': (str,), # noqa: E501
|
||||
@@ -92,9 +89,10 @@ class Animal(ModelNormal):
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
lazy_import()
|
||||
val = {
|
||||
'Cat': cat.Cat,
|
||||
'Dog': dog.Dog,
|
||||
'Cat': Cat,
|
||||
'Dog': Dog,
|
||||
}
|
||||
if not val:
|
||||
return None
|
||||
@@ -118,7 +116,7 @@ class Animal(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, class_name, *args, **kwargs): # noqa: E501
|
||||
"""animal.Animal - a model defined in OpenAPI
|
||||
"""Animal - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
class_name (str):
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import animal
|
||||
except ImportError:
|
||||
animal = sys.modules[
|
||||
'petstore_api.model.animal']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.animal import Animal
|
||||
globals()['Animal'] = Animal
|
||||
|
||||
|
||||
class AnimalFarm(ModelSimple):
|
||||
@@ -69,21 +68,23 @@ class AnimalFarm(ModelSimple):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'value': ([animal.Animal],),
|
||||
'value': ([Animal],),
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
_composed_schemas = None
|
||||
@@ -99,10 +100,10 @@ class AnimalFarm(ModelSimple):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, value, *args, **kwargs):
|
||||
"""animal_farm.AnimalFarm - a model defined in OpenAPI
|
||||
"""AnimalFarm - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
value ([animal.Animal]): # noqa: E501
|
||||
value ([Animal]): # noqa: E501
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class ApiResponse(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -85,6 +85,7 @@ class ApiResponse(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'code': 'code', # noqa: E501
|
||||
'type': 'type', # noqa: E501
|
||||
@@ -104,7 +105,7 @@ class ApiResponse(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""api_response.ApiResponse - a model defined in OpenAPI
|
||||
"""ApiResponse - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'array_array_number': 'ArrayArrayNumber', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - a model defined in OpenAPI
|
||||
"""ArrayOfArrayOfNumberOnly - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class ArrayOfNumberOnly(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ArrayOfNumberOnly(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'array_number': 'ArrayNumber', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ArrayOfNumberOnly(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""array_of_number_only.ArrayOfNumberOnly - a model defined in OpenAPI
|
||||
"""ArrayOfNumberOnly - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import read_only_first
|
||||
except ImportError:
|
||||
read_only_first = sys.modules[
|
||||
'petstore_api.model.read_only_first']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.read_only_first import ReadOnlyFirst
|
||||
globals()['ReadOnlyFirst'] = ReadOnlyFirst
|
||||
|
||||
|
||||
class ArrayTest(ModelNormal):
|
||||
@@ -73,23 +72,25 @@ class ArrayTest(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'array_of_string': ([str],), # noqa: E501
|
||||
'array_array_of_integer': ([[int]],), # noqa: E501
|
||||
'array_array_of_model': ([[read_only_first.ReadOnlyFirst]],), # noqa: E501
|
||||
'array_array_of_model': ([[ReadOnlyFirst]],), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'array_of_string': 'array_of_string', # noqa: E501
|
||||
'array_array_of_integer': 'array_array_of_integer', # noqa: E501
|
||||
@@ -109,7 +110,7 @@ class ArrayTest(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""array_test.ArrayTest - a model defined in OpenAPI
|
||||
"""ArrayTest - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -144,7 +145,7 @@ class ArrayTest(ModelNormal):
|
||||
_visited_composed_classes = (Animal,)
|
||||
array_of_string ([str]): [optional] # noqa: E501
|
||||
array_array_of_integer ([[int]]): [optional] # noqa: E501
|
||||
array_array_of_model ([[read_only_first.ReadOnlyFirst]]): [optional] # noqa: E501
|
||||
array_array_of_model ([[ReadOnlyFirst]]): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
|
||||
@@ -68,8 +68,8 @@ class Capitalization(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -88,6 +88,7 @@ class Capitalization(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'small_camel': 'smallCamel', # noqa: E501
|
||||
'capital_camel': 'CapitalCamel', # noqa: E501
|
||||
@@ -110,7 +111,7 @@ class Capitalization(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""capitalization.Capitalization - a model defined in OpenAPI
|
||||
"""Capitalization - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import animal
|
||||
except ImportError:
|
||||
animal = sys.modules[
|
||||
'petstore_api.model.animal']
|
||||
try:
|
||||
from petstore_api.model import cat_all_of
|
||||
except ImportError:
|
||||
cat_all_of = sys.modules[
|
||||
'petstore_api.model.cat_all_of']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.animal import Animal
|
||||
from petstore_api.model.cat_all_of import CatAllOf
|
||||
globals()['Animal'] = Animal
|
||||
globals()['CatAllOf'] = CatAllOf
|
||||
|
||||
|
||||
class Cat(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class Cat(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'class_name': (str,), # noqa: E501
|
||||
'declawed': (bool,), # noqa: E501
|
||||
@@ -119,7 +116,7 @@ class Cat(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, class_name, *args, **kwargs): # noqa: E501
|
||||
"""cat.Cat - a model defined in OpenAPI
|
||||
"""Cat - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
class_name (str):
|
||||
@@ -227,12 +224,13 @@ class Cat(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
animal.Animal,
|
||||
cat_all_of.CatAllOf,
|
||||
Animal,
|
||||
CatAllOf,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class CatAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class CatAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'declawed': 'declawed', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class CatAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""cat_all_of.CatAllOf - a model defined in OpenAPI
|
||||
"""CatAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class Category(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class Category(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
'id': 'id', # noqa: E501
|
||||
@@ -102,7 +103,7 @@ class Category(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""category.Category - a model defined in OpenAPI
|
||||
"""Category - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_all_of
|
||||
except ImportError:
|
||||
child_all_of = sys.modules[
|
||||
'petstore_api.model.child_all_of']
|
||||
try:
|
||||
from petstore_api.model import parent
|
||||
except ImportError:
|
||||
parent = sys.modules[
|
||||
'petstore_api.model.parent']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_all_of import ChildAllOf
|
||||
from petstore_api.model.parent import Parent
|
||||
globals()['ChildAllOf'] = ChildAllOf
|
||||
globals()['Parent'] = Parent
|
||||
|
||||
|
||||
class Child(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class Child(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'radio_waves': (bool,), # noqa: E501
|
||||
'tele_vision': (bool,), # noqa: E501
|
||||
@@ -95,6 +92,7 @@ class Child(ModelComposed):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'radio_waves': 'radioWaves', # noqa: E501
|
||||
'tele_vision': 'teleVision', # noqa: E501
|
||||
@@ -115,7 +113,7 @@ class Child(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""child.Child - a model defined in OpenAPI
|
||||
"""Child - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -220,12 +218,13 @@ class Child(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
child_all_of.ChildAllOf,
|
||||
parent.Parent,
|
||||
ChildAllOf,
|
||||
Parent,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class ChildAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ChildAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'inter_net': 'interNet', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ChildAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""child_all_of.ChildAllOf - a model defined in OpenAPI
|
||||
"""ChildAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_cat_all_of
|
||||
except ImportError:
|
||||
child_cat_all_of = sys.modules[
|
||||
'petstore_api.model.child_cat_all_of']
|
||||
try:
|
||||
from petstore_api.model import parent_pet
|
||||
except ImportError:
|
||||
parent_pet = sys.modules[
|
||||
'petstore_api.model.parent_pet']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_cat_all_of import ChildCatAllOf
|
||||
from petstore_api.model.parent_pet import ParentPet
|
||||
globals()['ChildCatAllOf'] = ChildCatAllOf
|
||||
globals()['ParentPet'] = ParentPet
|
||||
|
||||
|
||||
class ChildCat(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class ChildCat(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'pet_type': (str,), # noqa: E501
|
||||
'name': (str,), # noqa: E501
|
||||
@@ -117,7 +114,7 @@ class ChildCat(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, pet_type, *args, **kwargs): # noqa: E501
|
||||
"""child_cat.ChildCat - a model defined in OpenAPI
|
||||
"""ChildCat - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
pet_type (str):
|
||||
@@ -224,12 +221,13 @@ class ChildCat(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
child_cat_all_of.ChildCatAllOf,
|
||||
parent_pet.ParentPet,
|
||||
ChildCatAllOf,
|
||||
ParentPet,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class ChildCatAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ChildCatAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ChildCatAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""child_cat_all_of.ChildCatAllOf - a model defined in OpenAPI
|
||||
"""ChildCatAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_dog_all_of
|
||||
except ImportError:
|
||||
child_dog_all_of = sys.modules[
|
||||
'petstore_api.model.child_dog_all_of']
|
||||
try:
|
||||
from petstore_api.model import parent_pet
|
||||
except ImportError:
|
||||
parent_pet = sys.modules[
|
||||
'petstore_api.model.parent_pet']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_dog_all_of import ChildDogAllOf
|
||||
from petstore_api.model.parent_pet import ParentPet
|
||||
globals()['ChildDogAllOf'] = ChildDogAllOf
|
||||
globals()['ParentPet'] = ParentPet
|
||||
|
||||
|
||||
class ChildDog(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class ChildDog(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'pet_type': (str,), # noqa: E501
|
||||
'bark': (str,), # noqa: E501
|
||||
@@ -117,7 +114,7 @@ class ChildDog(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, pet_type, *args, **kwargs): # noqa: E501
|
||||
"""child_dog.ChildDog - a model defined in OpenAPI
|
||||
"""ChildDog - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
pet_type (str):
|
||||
@@ -224,12 +221,13 @@ class ChildDog(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
child_dog_all_of.ChildDogAllOf,
|
||||
parent_pet.ParentPet,
|
||||
ChildDogAllOf,
|
||||
ParentPet,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class ChildDogAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ChildDogAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'bark': 'bark', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ChildDogAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""child_dog_all_of.ChildDogAllOf - a model defined in OpenAPI
|
||||
"""ChildDogAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_lizard_all_of
|
||||
except ImportError:
|
||||
child_lizard_all_of = sys.modules[
|
||||
'petstore_api.model.child_lizard_all_of']
|
||||
try:
|
||||
from petstore_api.model import parent_pet
|
||||
except ImportError:
|
||||
parent_pet = sys.modules[
|
||||
'petstore_api.model.parent_pet']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_lizard_all_of import ChildLizardAllOf
|
||||
from petstore_api.model.parent_pet import ParentPet
|
||||
globals()['ChildLizardAllOf'] = ChildLizardAllOf
|
||||
globals()['ParentPet'] = ParentPet
|
||||
|
||||
|
||||
class ChildLizard(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class ChildLizard(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'pet_type': (str,), # noqa: E501
|
||||
'loves_rocks': (bool,), # noqa: E501
|
||||
@@ -117,7 +114,7 @@ class ChildLizard(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, pet_type, *args, **kwargs): # noqa: E501
|
||||
"""child_lizard.ChildLizard - a model defined in OpenAPI
|
||||
"""ChildLizard - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
pet_type (str):
|
||||
@@ -224,12 +221,13 @@ class ChildLizard(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
child_lizard_all_of.ChildLizardAllOf,
|
||||
parent_pet.ParentPet,
|
||||
ChildLizardAllOf,
|
||||
ParentPet,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class ChildLizardAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ChildLizardAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'loves_rocks': 'lovesRocks', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ChildLizardAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""child_lizard_all_of.ChildLizardAllOf - a model defined in OpenAPI
|
||||
"""ChildLizardAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class ClassModel(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ClassModel(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'_class': '_class', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ClassModel(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""class_model.ClassModel - a model defined in OpenAPI
|
||||
"""ClassModel - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class Client(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class Client(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'client': 'client', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class Client(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""client.Client - a model defined in OpenAPI
|
||||
"""Client - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import animal
|
||||
except ImportError:
|
||||
animal = sys.modules[
|
||||
'petstore_api.model.animal']
|
||||
try:
|
||||
from petstore_api.model import dog_all_of
|
||||
except ImportError:
|
||||
dog_all_of = sys.modules[
|
||||
'petstore_api.model.dog_all_of']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.animal import Animal
|
||||
from petstore_api.model.dog_all_of import DogAllOf
|
||||
globals()['Animal'] = Animal
|
||||
globals()['DogAllOf'] = DogAllOf
|
||||
|
||||
|
||||
class Dog(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class Dog(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'class_name': (str,), # noqa: E501
|
||||
'breed': (str,), # noqa: E501
|
||||
@@ -119,7 +116,7 @@ class Dog(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, class_name, *args, **kwargs): # noqa: E501
|
||||
"""dog.Dog - a model defined in OpenAPI
|
||||
"""Dog - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
class_name (str):
|
||||
@@ -227,12 +224,13 @@ class Dog(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
animal.Animal,
|
||||
dog_all_of.DogAllOf,
|
||||
Animal,
|
||||
DogAllOf,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class DogAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class DogAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'breed': 'breed', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class DogAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""dog_all_of.DogAllOf - a model defined in OpenAPI
|
||||
"""DogAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -76,8 +76,8 @@ class EnumArrays(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -92,6 +92,7 @@ class EnumArrays(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'just_symbol': 'just_symbol', # noqa: E501
|
||||
'array_enum': 'array_enum', # noqa: E501
|
||||
@@ -110,7 +111,7 @@ class EnumArrays(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""enum_arrays.EnumArrays - a model defined in OpenAPI
|
||||
"""EnumArrays - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -69,8 +69,8 @@ class EnumClass(ModelSimple):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class EnumClass(ModelSimple):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
_composed_schemas = None
|
||||
@@ -99,7 +100,7 @@ class EnumClass(ModelSimple):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, value, *args, **kwargs):
|
||||
"""enum_class.EnumClass - a model defined in OpenAPI
|
||||
"""EnumClass - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
value (str): if omitted the server will use the default value of '-efg', must be one of ["_abc", "-efg", "(xyz)", ] # noqa: E501
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import string_enum
|
||||
except ImportError:
|
||||
string_enum = sys.modules[
|
||||
'petstore_api.model.string_enum']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.string_enum import StringEnum
|
||||
globals()['StringEnum'] = StringEnum
|
||||
|
||||
|
||||
class EnumTest(ModelNormal):
|
||||
@@ -91,25 +90,27 @@ class EnumTest(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'enum_string_required': (str,), # noqa: E501
|
||||
'enum_string': (str,), # noqa: E501
|
||||
'enum_integer': (int,), # noqa: E501
|
||||
'enum_number': (float,), # noqa: E501
|
||||
'string_enum': (string_enum.StringEnum,), # noqa: E501
|
||||
'string_enum': (StringEnum,), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'enum_string_required': 'enum_string_required', # noqa: E501
|
||||
'enum_string': 'enum_string', # noqa: E501
|
||||
@@ -131,7 +132,7 @@ class EnumTest(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501
|
||||
"""enum_test.EnumTest - a model defined in OpenAPI
|
||||
"""EnumTest - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
enum_string_required (str):
|
||||
@@ -170,7 +171,7 @@ class EnumTest(ModelNormal):
|
||||
enum_string (str): [optional] # noqa: E501
|
||||
enum_integer (int): [optional] # noqa: E501
|
||||
enum_number (float): [optional] # noqa: E501
|
||||
string_enum (string_enum.StringEnum): [optional] # noqa: E501
|
||||
string_enum (StringEnum): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
|
||||
@@ -68,8 +68,8 @@ class File(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class File(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'source_uri': 'sourceURI', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class File(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""file.File - a model defined in OpenAPI
|
||||
"""File - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import file
|
||||
except ImportError:
|
||||
file = sys.modules[
|
||||
'petstore_api.model.file']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.file import File
|
||||
globals()['File'] = File
|
||||
|
||||
|
||||
class FileSchemaTestClass(ModelNormal):
|
||||
@@ -73,22 +72,24 @@ class FileSchemaTestClass(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'file': (file.File,), # noqa: E501
|
||||
'files': ([file.File],), # noqa: E501
|
||||
'file': (File,), # noqa: E501
|
||||
'files': ([File],), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'file': 'file', # noqa: E501
|
||||
'files': 'files', # noqa: E501
|
||||
@@ -107,7 +108,7 @@ class FileSchemaTestClass(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""file_schema_test_class.FileSchemaTestClass - a model defined in OpenAPI
|
||||
"""FileSchemaTestClass - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -140,8 +141,8 @@ class FileSchemaTestClass(ModelNormal):
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
file (file.File): [optional] # noqa: E501
|
||||
files ([file.File]): [optional] # noqa: E501
|
||||
file (File): [optional] # noqa: E501
|
||||
files ([File]): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
|
||||
@@ -103,8 +103,8 @@ class FormatTest(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -130,6 +130,7 @@ class FormatTest(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'number': 'number', # noqa: E501
|
||||
'byte': 'byte', # noqa: E501
|
||||
@@ -159,7 +160,7 @@ class FormatTest(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501
|
||||
"""format_test.FormatTest - a model defined in OpenAPI
|
||||
"""FormatTest - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
number (float):
|
||||
|
||||
@@ -68,8 +68,8 @@ class Grandparent(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class Grandparent(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'radio_waves': 'radioWaves', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class Grandparent(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""grandparent.Grandparent - a model defined in OpenAPI
|
||||
"""Grandparent - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,26 +29,16 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_cat
|
||||
except ImportError:
|
||||
child_cat = sys.modules[
|
||||
'petstore_api.model.child_cat']
|
||||
try:
|
||||
from petstore_api.model import child_dog
|
||||
except ImportError:
|
||||
child_dog = sys.modules[
|
||||
'petstore_api.model.child_dog']
|
||||
try:
|
||||
from petstore_api.model import child_lizard
|
||||
except ImportError:
|
||||
child_lizard = sys.modules[
|
||||
'petstore_api.model.child_lizard']
|
||||
try:
|
||||
from petstore_api.model import parent_pet
|
||||
except ImportError:
|
||||
parent_pet = sys.modules[
|
||||
'petstore_api.model.parent_pet']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_cat import ChildCat
|
||||
from petstore_api.model.child_dog import ChildDog
|
||||
from petstore_api.model.child_lizard import ChildLizard
|
||||
from petstore_api.model.parent_pet import ParentPet
|
||||
globals()['ChildCat'] = ChildCat
|
||||
globals()['ChildDog'] = ChildDog
|
||||
globals()['ChildLizard'] = ChildLizard
|
||||
globals()['ParentPet'] = ParentPet
|
||||
|
||||
|
||||
class GrandparentAnimal(ModelNormal):
|
||||
@@ -88,24 +78,26 @@ class GrandparentAnimal(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'pet_type': (str,), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
lazy_import()
|
||||
val = {
|
||||
'ChildCat': child_cat.ChildCat,
|
||||
'ChildDog': child_dog.ChildDog,
|
||||
'ChildLizard': child_lizard.ChildLizard,
|
||||
'ParentPet': parent_pet.ParentPet,
|
||||
'ChildCat': ChildCat,
|
||||
'ChildDog': ChildDog,
|
||||
'ChildLizard': ChildLizard,
|
||||
'ParentPet': ParentPet,
|
||||
}
|
||||
if not val:
|
||||
return None
|
||||
@@ -128,7 +120,7 @@ class GrandparentAnimal(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, pet_type, *args, **kwargs): # noqa: E501
|
||||
"""grandparent_animal.GrandparentAnimal - a model defined in OpenAPI
|
||||
"""GrandparentAnimal - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
pet_type (str):
|
||||
|
||||
@@ -68,8 +68,8 @@ class HasOnlyReadOnly(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class HasOnlyReadOnly(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'bar': 'bar', # noqa: E501
|
||||
'foo': 'foo', # noqa: E501
|
||||
@@ -102,7 +103,7 @@ class HasOnlyReadOnly(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""has_only_read_only.HasOnlyReadOnly - a model defined in OpenAPI
|
||||
"""HasOnlyReadOnly - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class List(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class List(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'_123_list': '123-list', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class List(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""list.List - a model defined in OpenAPI
|
||||
"""List - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import string_boolean_map
|
||||
except ImportError:
|
||||
string_boolean_map = sys.modules[
|
||||
'petstore_api.model.string_boolean_map']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.string_boolean_map import StringBooleanMap
|
||||
globals()['StringBooleanMap'] = StringBooleanMap
|
||||
|
||||
|
||||
class MapTest(ModelNormal):
|
||||
@@ -77,24 +76,26 @@ class MapTest(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'map_map_of_string': ({str: ({str: (str,)},)},), # noqa: E501
|
||||
'map_of_enum_string': ({str: (str,)},), # noqa: E501
|
||||
'direct_map': ({str: (bool,)},), # noqa: E501
|
||||
'indirect_map': (string_boolean_map.StringBooleanMap,), # noqa: E501
|
||||
'indirect_map': (StringBooleanMap,), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'map_map_of_string': 'map_map_of_string', # noqa: E501
|
||||
'map_of_enum_string': 'map_of_enum_string', # noqa: E501
|
||||
@@ -115,7 +116,7 @@ class MapTest(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""map_test.MapTest - a model defined in OpenAPI
|
||||
"""MapTest - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -151,7 +152,7 @@ class MapTest(ModelNormal):
|
||||
map_map_of_string ({str: ({str: (str,)},)}): [optional] # noqa: E501
|
||||
map_of_enum_string ({str: (str,)}): [optional] # noqa: E501
|
||||
direct_map ({str: (bool,)}): [optional] # noqa: E501
|
||||
indirect_map (string_boolean_map.StringBooleanMap): [optional] # noqa: E501
|
||||
indirect_map (StringBooleanMap): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import animal
|
||||
except ImportError:
|
||||
animal = sys.modules[
|
||||
'petstore_api.model.animal']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.animal import Animal
|
||||
globals()['Animal'] = Animal
|
||||
|
||||
|
||||
class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
|
||||
@@ -73,23 +72,25 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'uuid': (str,), # noqa: E501
|
||||
'date_time': (datetime,), # noqa: E501
|
||||
'map': ({str: (animal.Animal,)},), # noqa: E501
|
||||
'map': ({str: (Animal,)},), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'uuid': 'uuid', # noqa: E501
|
||||
'date_time': 'dateTime', # noqa: E501
|
||||
@@ -109,7 +110,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI
|
||||
"""MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -144,7 +145,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
|
||||
_visited_composed_classes = (Animal,)
|
||||
uuid (str): [optional] # noqa: E501
|
||||
date_time (datetime): [optional] # noqa: E501
|
||||
map ({str: (animal.Animal,)}): [optional] # noqa: E501
|
||||
map ({str: (Animal,)}): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
_check_type = kwargs.pop('_check_type', True)
|
||||
|
||||
@@ -68,8 +68,8 @@ class Model200Response(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class Model200Response(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
'_class': 'class', # noqa: E501
|
||||
@@ -102,7 +103,7 @@ class Model200Response(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""model200_response.Model200Response - a model defined in OpenAPI
|
||||
"""Model200Response - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class ModelReturn(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ModelReturn(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'_return': 'return', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ModelReturn(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""model_return.ModelReturn - a model defined in OpenAPI
|
||||
"""ModelReturn - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class Name(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -86,6 +86,7 @@ class Name(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
'snake_case': 'snake_case', # noqa: E501
|
||||
@@ -106,7 +107,7 @@ class Name(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, name, *args, **kwargs): # noqa: E501
|
||||
"""name.Name - a model defined in OpenAPI
|
||||
"""Name - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
name (int):
|
||||
|
||||
@@ -68,8 +68,8 @@ class NumberOnly(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class NumberOnly(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'just_number': 'JustNumber', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class NumberOnly(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""number_only.NumberOnly - a model defined in OpenAPI
|
||||
"""NumberOnly - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class NumberWithValidations(ModelSimple):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class NumberWithValidations(ModelSimple):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
_composed_schemas = None
|
||||
@@ -98,7 +99,7 @@ class NumberWithValidations(ModelSimple):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, value, *args, **kwargs):
|
||||
"""number_with_validations.NumberWithValidations - a model defined in OpenAPI
|
||||
"""NumberWithValidations - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
value (float): # noqa: E501
|
||||
|
||||
@@ -29,11 +29,10 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import number_with_validations
|
||||
except ImportError:
|
||||
number_with_validations = sys.modules[
|
||||
'petstore_api.model.number_with_validations']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.number_with_validations import NumberWithValidations
|
||||
globals()['NumberWithValidations'] = NumberWithValidations
|
||||
|
||||
|
||||
class ObjectModelWithRefProps(ModelNormal):
|
||||
@@ -73,15 +72,16 @@ class ObjectModelWithRefProps(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'my_number': (number_with_validations.NumberWithValidations,), # noqa: E501
|
||||
'my_number': (NumberWithValidations,), # noqa: E501
|
||||
'my_string': (str,), # noqa: E501
|
||||
'my_boolean': (bool,), # noqa: E501
|
||||
}
|
||||
@@ -90,6 +90,7 @@ class ObjectModelWithRefProps(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'my_number': 'my_number', # noqa: E501
|
||||
'my_string': 'my_string', # noqa: E501
|
||||
@@ -109,7 +110,7 @@ class ObjectModelWithRefProps(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""object_model_with_ref_props.ObjectModelWithRefProps - a model defined in OpenAPI
|
||||
"""ObjectModelWithRefProps - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -142,7 +143,7 @@ class ObjectModelWithRefProps(ModelNormal):
|
||||
Animal class but this time we won't travel
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
my_number (number_with_validations.NumberWithValidations): [optional] # noqa: E501
|
||||
my_number (NumberWithValidations): [optional] # noqa: E501
|
||||
my_string (str): [optional] # noqa: E501
|
||||
my_boolean (bool): [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
@@ -73,8 +73,8 @@ class Order(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -93,6 +93,7 @@ class Order(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'id': 'id', # noqa: E501
|
||||
'pet_id': 'petId', # noqa: E501
|
||||
@@ -115,7 +116,7 @@ class Order(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""order.Order - a model defined in OpenAPI
|
||||
"""Order - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import grandparent
|
||||
except ImportError:
|
||||
grandparent = sys.modules[
|
||||
'petstore_api.model.grandparent']
|
||||
try:
|
||||
from petstore_api.model import parent_all_of
|
||||
except ImportError:
|
||||
parent_all_of = sys.modules[
|
||||
'petstore_api.model.parent_all_of']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.grandparent import Grandparent
|
||||
from petstore_api.model.parent_all_of import ParentAllOf
|
||||
globals()['Grandparent'] = Grandparent
|
||||
globals()['ParentAllOf'] = ParentAllOf
|
||||
|
||||
|
||||
class Parent(ModelComposed):
|
||||
@@ -78,13 +74,14 @@ class Parent(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'radio_waves': (bool,), # noqa: E501
|
||||
'tele_vision': (bool,), # noqa: E501
|
||||
@@ -94,6 +91,7 @@ class Parent(ModelComposed):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'radio_waves': 'radioWaves', # noqa: E501
|
||||
'tele_vision': 'teleVision', # noqa: E501
|
||||
@@ -113,7 +111,7 @@ class Parent(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""parent.Parent - a model defined in OpenAPI
|
||||
"""Parent - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
@@ -217,12 +215,13 @@ class Parent(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
grandparent.Grandparent,
|
||||
parent_all_of.ParentAllOf,
|
||||
Grandparent,
|
||||
ParentAllOf,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -68,8 +68,8 @@ class ParentAllOf(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class ParentAllOf(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'tele_vision': 'teleVision', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class ParentAllOf(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""parent_all_of.ParentAllOf - a model defined in OpenAPI
|
||||
"""ParentAllOf - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -29,26 +29,16 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import child_cat
|
||||
except ImportError:
|
||||
child_cat = sys.modules[
|
||||
'petstore_api.model.child_cat']
|
||||
try:
|
||||
from petstore_api.model import child_dog
|
||||
except ImportError:
|
||||
child_dog = sys.modules[
|
||||
'petstore_api.model.child_dog']
|
||||
try:
|
||||
from petstore_api.model import child_lizard
|
||||
except ImportError:
|
||||
child_lizard = sys.modules[
|
||||
'petstore_api.model.child_lizard']
|
||||
try:
|
||||
from petstore_api.model import grandparent_animal
|
||||
except ImportError:
|
||||
grandparent_animal = sys.modules[
|
||||
'petstore_api.model.grandparent_animal']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.child_cat import ChildCat
|
||||
from petstore_api.model.child_dog import ChildDog
|
||||
from petstore_api.model.child_lizard import ChildLizard
|
||||
from petstore_api.model.grandparent_animal import GrandparentAnimal
|
||||
globals()['ChildCat'] = ChildCat
|
||||
globals()['ChildDog'] = ChildDog
|
||||
globals()['ChildLizard'] = ChildLizard
|
||||
globals()['GrandparentAnimal'] = GrandparentAnimal
|
||||
|
||||
|
||||
class ParentPet(ModelComposed):
|
||||
@@ -88,23 +78,25 @@ class ParentPet(ModelComposed):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'pet_type': (str,), # noqa: E501
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def discriminator():
|
||||
lazy_import()
|
||||
val = {
|
||||
'ChildCat': child_cat.ChildCat,
|
||||
'ChildDog': child_dog.ChildDog,
|
||||
'ChildLizard': child_lizard.ChildLizard,
|
||||
'ChildCat': ChildCat,
|
||||
'ChildDog': ChildDog,
|
||||
'ChildLizard': ChildLizard,
|
||||
}
|
||||
if not val:
|
||||
return None
|
||||
@@ -128,7 +120,7 @@ class ParentPet(ModelComposed):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, pet_type, *args, **kwargs): # noqa: E501
|
||||
"""parent_pet.ParentPet - a model defined in OpenAPI
|
||||
"""ParentPet - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
pet_type (str):
|
||||
@@ -234,11 +226,12 @@ class ParentPet(ModelComposed):
|
||||
# code would be run when this module is imported, and these composed
|
||||
# classes don't exist yet because their module has not finished
|
||||
# loading
|
||||
lazy_import()
|
||||
return {
|
||||
'anyOf': [
|
||||
],
|
||||
'allOf': [
|
||||
grandparent_animal.GrandparentAnimal,
|
||||
GrandparentAnimal,
|
||||
],
|
||||
'oneOf': [
|
||||
],
|
||||
|
||||
@@ -29,16 +29,12 @@ from petstore_api.model_utils import ( # noqa: F401
|
||||
none_type,
|
||||
validate_get_composed_info,
|
||||
)
|
||||
try:
|
||||
from petstore_api.model import category
|
||||
except ImportError:
|
||||
category = sys.modules[
|
||||
'petstore_api.model.category']
|
||||
try:
|
||||
from petstore_api.model import tag
|
||||
except ImportError:
|
||||
tag = sys.modules[
|
||||
'petstore_api.model.tag']
|
||||
|
||||
def lazy_import():
|
||||
from petstore_api.model.category import Category
|
||||
from petstore_api.model.tag import Tag
|
||||
globals()['Category'] = Category
|
||||
globals()['Tag'] = Tag
|
||||
|
||||
|
||||
class Pet(ModelNormal):
|
||||
@@ -83,19 +79,20 @@ class Pet(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
and the value is attribute type.
|
||||
"""
|
||||
lazy_import()
|
||||
return {
|
||||
'name': (str,), # noqa: E501
|
||||
'photo_urls': ([str],), # noqa: E501
|
||||
'id': (int,), # noqa: E501
|
||||
'category': (category.Category,), # noqa: E501
|
||||
'tags': ([tag.Tag],), # noqa: E501
|
||||
'category': (Category,), # noqa: E501
|
||||
'tags': ([Tag],), # noqa: E501
|
||||
'status': (str,), # noqa: E501
|
||||
}
|
||||
|
||||
@@ -103,6 +100,7 @@ class Pet(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
'photo_urls': 'photoUrls', # noqa: E501
|
||||
@@ -125,7 +123,7 @@ class Pet(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501
|
||||
"""pet.Pet - a model defined in OpenAPI
|
||||
"""Pet - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
name (str):
|
||||
@@ -163,8 +161,8 @@ class Pet(ModelNormal):
|
||||
through its discriminator because we passed in
|
||||
_visited_composed_classes = (Animal,)
|
||||
id (int): [optional] # noqa: E501
|
||||
category (category.Category): [optional] # noqa: E501
|
||||
tags ([tag.Tag]): [optional] # noqa: E501
|
||||
category (Category): [optional] # noqa: E501
|
||||
tags ([Tag]): [optional] # noqa: E501
|
||||
status (str): pet status in the store. [optional] # noqa: E501
|
||||
"""
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ class Player(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class Player(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name', # noqa: E501
|
||||
'enemy_player': 'enemyPlayer', # noqa: E501
|
||||
@@ -102,7 +103,7 @@ class Player(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, name, *args, **kwargs): # noqa: E501
|
||||
"""player.Player - a model defined in OpenAPI
|
||||
"""Player - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
name (str):
|
||||
|
||||
@@ -68,8 +68,8 @@ class ReadOnlyFirst(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class ReadOnlyFirst(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'bar': 'bar', # noqa: E501
|
||||
'baz': 'baz', # noqa: E501
|
||||
@@ -102,7 +103,7 @@ class ReadOnlyFirst(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""read_only_first.ReadOnlyFirst - a model defined in OpenAPI
|
||||
"""ReadOnlyFirst - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class SpecialModelName(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -83,6 +83,7 @@ class SpecialModelName(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'special_property_name': '$special[property.name]', # noqa: E501
|
||||
}
|
||||
@@ -100,7 +101,7 @@ class SpecialModelName(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""special_model_name.SpecialModelName - a model defined in OpenAPI
|
||||
"""SpecialModelName - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -61,15 +61,21 @@ class StringBooleanMap(ModelNormal):
|
||||
validations = {
|
||||
}
|
||||
|
||||
additional_properties_type = (bool,) # noqa: E501
|
||||
@cached_property
|
||||
def additional_properties_type():
|
||||
"""
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
"""
|
||||
return (bool,) # noqa: E501
|
||||
|
||||
_nullable = False
|
||||
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -82,6 +88,7 @@ class StringBooleanMap(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
@@ -98,7 +105,7 @@ class StringBooleanMap(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""string_boolean_map.StringBooleanMap - a model defined in OpenAPI
|
||||
"""StringBooleanMap - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -69,8 +69,8 @@ class StringEnum(ModelSimple):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -84,6 +84,7 @@ class StringEnum(ModelSimple):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {}
|
||||
|
||||
_composed_schemas = None
|
||||
@@ -99,7 +100,7 @@ class StringEnum(ModelSimple):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, value, *args, **kwargs):
|
||||
"""string_enum.StringEnum - a model defined in OpenAPI
|
||||
"""StringEnum - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
value (str):, must be one of ["placed", "approved", "delivered", ] # noqa: E501
|
||||
|
||||
@@ -68,8 +68,8 @@ class Tag(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -85,6 +85,7 @@ class Tag(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'id': 'id', # noqa: E501
|
||||
'name': 'name', # noqa: E501
|
||||
@@ -104,7 +105,7 @@ class Tag(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""tag.Tag - a model defined in OpenAPI
|
||||
"""Tag - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class TypeHolderDefault(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -89,6 +89,7 @@ class TypeHolderDefault(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'string_item': 'string_item', # noqa: E501
|
||||
'number_item': 'number_item', # noqa: E501
|
||||
@@ -112,7 +113,7 @@ class TypeHolderDefault(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, array_item, *args, **kwargs): # noqa: E501
|
||||
"""type_holder_default.TypeHolderDefault - a model defined in OpenAPI
|
||||
"""TypeHolderDefault - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
array_item ([int]):
|
||||
|
||||
@@ -77,8 +77,8 @@ class TypeHolderExample(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -96,6 +96,7 @@ class TypeHolderExample(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'string_item': 'string_item', # noqa: E501
|
||||
'number_item': 'number_item', # noqa: E501
|
||||
@@ -117,7 +118,7 @@ class TypeHolderExample(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501
|
||||
"""type_holder_example.TypeHolderExample - a model defined in OpenAPI
|
||||
"""TypeHolderExample - a model defined in OpenAPI
|
||||
|
||||
Args:
|
||||
bool_item (bool):
|
||||
|
||||
@@ -68,8 +68,8 @@ class User(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -90,6 +90,7 @@ class User(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'id': 'id', # noqa: E501
|
||||
'username': 'username', # noqa: E501
|
||||
@@ -114,7 +115,7 @@ class User(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""user.User - a model defined in OpenAPI
|
||||
"""User - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -68,8 +68,8 @@ class XmlItem(ModelNormal):
|
||||
@cached_property
|
||||
def openapi_types():
|
||||
"""
|
||||
This must be a class method so a model may have properties that are
|
||||
of type self, this ensures that we don't create a cyclic import
|
||||
This must be a method because a model may have properties that are
|
||||
of type self, this must run after the class is loaded
|
||||
|
||||
Returns
|
||||
openapi_types (dict): The key is attribute name
|
||||
@@ -111,6 +111,7 @@ class XmlItem(ModelNormal):
|
||||
def discriminator():
|
||||
return None
|
||||
|
||||
|
||||
attribute_map = {
|
||||
'attribute_string': 'attribute_string', # noqa: E501
|
||||
'attribute_number': 'attribute_number', # noqa: E501
|
||||
@@ -156,7 +157,7 @@ class XmlItem(ModelNormal):
|
||||
|
||||
@convert_js_args_to_python_args
|
||||
def __init__(self, *args, **kwargs): # noqa: E501
|
||||
"""xml_item.XmlItem - a model defined in OpenAPI
|
||||
"""XmlItem - a model defined in OpenAPI
|
||||
|
||||
Keyword Args:
|
||||
_check_type (bool): if True, values for parameters in openapi_types
|
||||
|
||||
@@ -41,9 +41,9 @@ class cached_property(object):
|
||||
self._fn = fn
|
||||
|
||||
def __get__(self, instance, cls=None):
|
||||
try:
|
||||
if self.result_key in vars(self):
|
||||
return vars(self)[self.result_key]
|
||||
except KeyError:
|
||||
else:
|
||||
result = self._fn()
|
||||
setattr(self, self.result_key, result)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user