#NEWLINE# def parse_docstring_param( directive , key , value ) : #NEWLINE# #INDENT# p = { #NEWLINE# #INDENT# 'name' : key , #NEWLINE# 'description' : value . split ( '{' , 1 ) [ 0 ] , #NEWLINE# 'required' : False , #NEWLINE# 'dataType' : 'string' , #NEWLINE# 'type' : 'primitive' , #NEWLINE# 'allowMultiple' : False , #NEWLINE# #UNINDENT# } #NEWLINE# if ( ( '{' in value ) and ( '}' in value ) ) : #NEWLINE# #INDENT# p . update ( json . loads ( value [ value . find ( '{' ) : value . find ( '}' ) ] ) ) #NEWLINE# #UNINDENT# if ( directive == 'json' ) : #NEWLINE# #INDENT# directive = 'body' #NEWLINE# p [ 'type' ] = 'complex' #NEWLINE# #UNINDENT# if ( directive in ( 'query' , 'body' , 'path' , 'form' ) ) : #NEWLINE# #INDENT# p [ 'paramType' ] = directive #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( directive == 'reqheader' ) : #NEWLINE# #INDENT# p [ 'paramType' ] = 'header' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log . warning ( 'Ignoring unknown docstring param %s' , directive ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# return p