SwaggerType Class Reference

Inheritance diagram for SwaggerType:

Inheritance graph
[legend]
Collaboration diagram for SwaggerType:

Collaboration graph
[legend]

Public Member Functions

def __init__
def load

Data Fields

 is_discriminator
 is_list
 is_primitive
 name
 singular_name

Detailed Description

Model of a data type.

Definition at line 325 of file swagger_model.py.


Member Function Documentation

def __init__ (   self  ) 

Definition at line 329 of file swagger_model.py.

00329                       :
00330         self.name = None
00331         self.is_discriminator = None
00332         self.is_list = None
00333         self.singular_name = None
00334         self.is_primitive = None
00335 
    def load(self, type_name, processor, context):

def load (   self,
  type_name,
  processor,
  context 
)

Definition at line 336 of file swagger_model.py.

00336                                                  :
00337         # Some common errors
00338         if type_name == 'integer':
00339             raise SwaggerError("The type for integer should be 'int'", context)
00340 
00341         self.name = type_name
00342         type_param = get_list_parameter_type(self.name)
00343         self.is_list = type_param is not None
00344         if self.is_list:
00345             self.singular_name = type_param
00346         else:
00347             self.singular_name = self.name
00348         self.is_primitive = self.singular_name in SWAGGER_PRIMITIVES
00349         processor.process_type(self, context)
00350         return self
00351 
00352 
class Operation(Stringify):


Field Documentation

Definition at line 331 of file swagger_model.py.

Definition at line 332 of file swagger_model.py.

Definition at line 334 of file swagger_model.py.

Definition at line 330 of file swagger_model.py.

Definition at line 333 of file swagger_model.py.


The documentation for this class was generated from the following file:

Generated on Thu Apr 16 06:41:41 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6