diff --git a/wsme/pecan.py b/wsme/pecan.py index f0ad4e5..3e70c54 100644 --- a/wsme/pecan.py +++ b/wsme/pecan.py @@ -65,6 +65,7 @@ def wsexpose(*args, **kwargs): pecan_xml_decorate(callfunction) pecan_json_decorate(callfunction) pecan.util._cfg(callfunction)['argspec'] = inspect.getargspec(f) + callfunction._wsme_definition = funcdef return callfunction return decorate diff --git a/wsme/sphinxext.py b/wsme/sphinxext.py index 4a55c69..5a6d02f 100644 --- a/wsme/sphinxext.py +++ b/wsme/sphinxext.py @@ -334,10 +334,14 @@ class FunctionDocumenter(autodoc.MethodDocumenter): objtype = 'function' priority = 1 + option_spec = { + 'path': directives.unchanged, + 'method': directives.unchanged + } + @classmethod def can_document_member(cls, member, membername, isattr, parent): - return isinstance(parent, ServiceDocumenter) \ - and wsme.api.iswsmefunction(member) + return wsme.api.iswsmefunction(member) def import_object(self): ret = super(FunctionDocumenter, self).import_object()