Parameter Class Reference

Inheritance diagram for Parameter:

Inheritance graph
[legend]
Collaboration diagram for Parameter:

Collaboration graph
[legend]

Public Member Functions

def __init__
def is_type
def load

Data Fields

 allow_multiple
 allowable_values
 data_type
 default_value
 description
 name
 param_type
 required

Static Public Attributes

list required_fields = ['name', 'paramType', 'dataType']

Detailed Description

Model of an operation's parameter.

See https://github.com/wordnik/swagger-core/wiki/parameters

Definition at line 265 of file swagger_model.py.


Member Function Documentation

def __init__ (   self  ) 

Definition at line 273 of file swagger_model.py.

00273                       :
00274         self.param_type = None
00275         self.name = None
00276         self.description = None
00277         self.data_type = None
00278         self.required = None
00279         self.allowable_values = None
00280         self.allow_multiple = None
00281 
    def load(self, parameter_json, processor, context):

def is_type (   self,
  other_type 
)

Definition at line 301 of file swagger_model.py.

00301                                  :
00302         return self.param_type == other_type
00303 
00304 
class ErrorResponse(Stringify):

def load (   self,
  parameter_json,
  processor,
  context 
)

Definition at line 282 of file swagger_model.py.

00282                                                       :
00283         context = context.next_stack(parameter_json, 'name')
00284         validate_required_fields(parameter_json, self.required_fields, context)
00285         self.name = parameter_json.get('name')
00286         self.param_type = parameter_json.get('paramType')
00287         self.description = parameter_json.get('description') or ''
00288         self.data_type = parameter_json.get('dataType')
00289         self.required = parameter_json.get('required') or False
00290         self.default_value = parameter_json.get('defaultValue')
00291         self.allowable_values = load_allowable_values(
00292             parameter_json.get('allowableValues'), context)
00293         self.allow_multiple = parameter_json.get('allowMultiple') or False
00294         processor.process_parameter(self, context)
00295         if parameter_json.get('allowedValues'):
00296             raise SwaggerError(
00297                 "Field 'allowedValues' invalid; use 'allowableValues'",
00298                 context)
00299         return self
00300 
    def is_type(self, other_type):


Field Documentation

Definition at line 280 of file swagger_model.py.

Definition at line 279 of file swagger_model.py.

Definition at line 277 of file swagger_model.py.

Definition at line 290 of file swagger_model.py.

Definition at line 276 of file swagger_model.py.

Definition at line 275 of file swagger_model.py.

Definition at line 274 of file swagger_model.py.

Definition at line 278 of file swagger_model.py.

list required_fields = ['name', 'paramType', 'dataType'] [static]

Definition at line 271 of file swagger_model.py.


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

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