diff --git a/tabpy/tabpy_server/management/state.py b/tabpy/tabpy_server/management/state.py index d5aeae35..ecdf5974 100644 --- a/tabpy/tabpy_server/management/state.py +++ b/tabpy/tabpy_server/management/state.py @@ -215,7 +215,7 @@ def add_endpoint( Name of the endpoint description : str, optional Description of this endpoint - doc_string : str, optional + docstring : str, optional The doc string for this endpoint, if needed. endpoint_type : str The endpoint type (model, alias) @@ -309,7 +309,7 @@ def update_endpoint( Name of the endpoint description : str, optional Description of this endpoint - doc_string : str, optional + docstring : str, optional The doc string for this endpoint, if needed. endpoint_type : str, optional The endpoint type (model, alias) diff --git a/tabpy/tabpy_tools/client.py b/tabpy/tabpy_tools/client.py index 9bda2ac6..020c5d4e 100644 --- a/tabpy/tabpy_tools/client.py +++ b/tabpy/tabpy_tools/client.py @@ -408,7 +408,7 @@ def _gen_endpoint(self, name, obj, description, version=1, schema=None, is_publi "methods": endpoint_object.get_methods(), "required_files": [], "required_packages": [], - "docstring": endpoint_object.get_doc_string(), + "docstring": endpoint_object.get_docstring(), "schema": copy.copy(schema), "is_public": is_public, } diff --git a/tabpy/tabpy_tools/custom_query_object.py b/tabpy/tabpy_tools/custom_query_object.py index a2c0cdb7..597b0706 100644 --- a/tabpy/tabpy_tools/custom_query_object.py +++ b/tabpy/tabpy_tools/custom_query_object.py @@ -71,7 +71,7 @@ def query(self, *args, **kwargs): ) raise - def get_doc_string(self): + def get_docstring(self): """Get doc string from customized query""" default_docstring = "-- no docstring found in query function --" diff --git a/tabpy/tabpy_tools/query_object.py b/tabpy/tabpy_tools/query_object.py index 5ccbc109..94fe0d82 100644 --- a/tabpy/tabpy_tools/query_object.py +++ b/tabpy/tabpy_tools/query_object.py @@ -14,7 +14,7 @@ class QueryObject(abc.ABC): """ Derived class needs to implement the following interface: * query() -- given input, return query result - * get_doc_string() -- returns documentation for the Query Object + * get_docstring() -- returns documentation for the Query Object """ def __init__(self, description=""): @@ -30,7 +30,7 @@ def query(self, input): pass @abc.abstractmethod - def get_doc_string(self): + def get_docstring(self): """Returns documentation for the query object By default, this method returns the docstring for 'query' method