diff --git a/kwikapi/apidoc.py b/kwikapi/apidoc.py index e187858..0db8d45 100644 --- a/kwikapi/apidoc.py +++ b/kwikapi/apidoc.py @@ -11,7 +11,13 @@ def _type_str(self, t): if t is None: return str(None) - return t.__name__ + if hasattr(t, "__name__"): + return t.__name__ + else: + try: + return t.__repr__() + except Exception: + return "Unknown" def apidoc(self, version: str = None, namespace: str = None) -> dict: versions = {}