#NEWLINE# def doc( self , groups = None , set_location = True , **properties ) : #NEWLINE# #INDENT# "Add flask route to autodoc for automatic documentation\n\n        Any route decorated with this method will be added to the list of\n        routes to be documented by the generate() or html() methods.\n\n        By default, the route is added to the 'all' group.\n        By specifying group or groups argument, the route can be added to one\n        or multiple other groups as well, besides the 'all' group.\n\n        If set_location is True, the location of the function will be stored.\n        NOTE: this assumes that the decorator is placed just before the\n        function (in the normal way).\n\n        Custom parameters may also be passed in beyond groups, if they are\n        named something not already in the dict descibed in the docstring for\n        the generare() function, they will be added to the route's properties,\n        which can be accessed from the template.\n\n        If a parameter is passed in with a name that is already in the dict, but\n        not of a reserved name, the passed parameter overrides that dict value.\n        " #NEWLINE# def decorator( f ) : #NEWLINE# #INDENT# if ( f in self . func_groups ) : #NEWLINE# #INDENT# groupset = self . func_groups [ f ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# groupset = set ( ) #NEWLINE# #UNINDENT# if ( type ( groups ) is list ) : #NEWLINE# #INDENT# groupset . update ( groups ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( groups ) is str ) : #NEWLINE# #INDENT# groupset . add ( groups ) #NEWLINE# #UNINDENT# #UNINDENT# groupset . add ( 'all' ) #NEWLINE# self . func_groups [ f ] = groupset #NEWLINE# self . func_props [ f ] = properties #NEWLINE# if set_location : #NEWLINE# #INDENT# caller_frame = inspect . stack ( ) [ 1 ] #NEWLINE# self . func_locations [ f ] = { #NEWLINE# #INDENT# 'filename' : caller_frame [ 1 ] , #NEWLINE# 'line' : caller_frame [ 2 ] , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# return f #NEWLINE# #UNINDENT# return decorator