def doc(self, groups=None, set_location=True, **properties):
        def decorator(f):
            # Get previous group list (if any)
            if f in self.func_groups:
                groupset = self.func_groups[f]
            else:
                groupset = set()

            # Set group[s]
            if type(groups) is list:
                groupset.update(groups)
            elif type(groups) is str:
                groupset.add(groups)
            groupset.add('all')
            self.func_groups[f] = groupset
            self.func_props[f] = properties

            # Set location
            if set_location:
                caller_frame = inspect.stack()[1]
                self.func_locations[f] = {
                        'filename': caller_frame[1],
                        'line':     caller_frame[2],
                        }

            return f
        return decorator
Add flask route to autodoc for automatic documentation
dataset/ETHPy150Open acoomans/flask-autodoc/flask_autodoc/autodoc.py/Autodoc.doc