Api Class Reference

Inheritance diagram for Api:

Inheritance graph
[legend]
Collaboration diagram for Api:

Collaboration graph
[legend]

Public Member Functions

def __init__
def load

Data Fields

 description
 has_websocket
 operations
 path

Static Public Attributes

list required_fields = ['path', 'operations']

Detailed Description

Model of a single API in an API declaration.

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

Definition at line 423 of file swagger_model.py.


Member Function Documentation

def __init__ (   self  ) 

Definition at line 431 of file swagger_model.py.

00431                        :
00432         self.path = None
00433         self.description = None
00434         self.operations = []
00435 
    def load(self, api_json, processor, context):

def load (   self,
  api_json,
  processor,
  context 
)

Definition at line 436 of file swagger_model.py.

00436                                                 :
00437         context = context.next_stack(api_json, 'path')
00438         validate_required_fields(api_json, self.required_fields, context)
00439         self.path = api_json.get('path')
00440         self.description = api_json.get('description')
00441         op_json = api_json.get('operations')
00442         self.operations = [
00443             Operation().load(j, processor, context) for j in op_json]
00444         self.has_websocket = \
00445             filter(lambda op: op.is_websocket, self.operations) != []
00446         processor.process_api(self, context)
00447         return self
00448 
00449 
def get_list_parameter_type(type_string):


Field Documentation

Definition at line 433 of file swagger_model.py.

Definition at line 444 of file swagger_model.py.

Definition at line 434 of file swagger_model.py.

Definition at line 432 of file swagger_model.py.

list required_fields = ['path', 'operations'] [static]

Definition at line 429 of file swagger_model.py.


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

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