polyapi-python 0.2.3.dev8__tar.gz → 0.2.3.dev9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {polyapi_python-0.2.3.dev8/polyapi_python.egg-info → polyapi_python-0.2.3.dev9}/PKG-INFO +1 -1
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/utils.py +17 -3
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9/polyapi_python.egg-info}/PKG-INFO +1 -1
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/pyproject.toml +1 -1
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/LICENSE +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/README.md +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/__init__.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/__main__.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/api.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/auth.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/cli.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/client.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/config.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/constants.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/error_handler.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/exceptions.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/execute.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/function_cli.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/generate.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/py.typed +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/schema.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/server.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/typedefs.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/variables.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi/webhook.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/SOURCES.txt +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/dependency_links.txt +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/requires.txt +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/top_level.txt +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/setup.cfg +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_api.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_auth.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_function_cli.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_server.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_utils.py +0 -0
- {polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/tests/test_variables.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import re
|
|
2
2
|
import os
|
|
3
|
+
import logging
|
|
3
4
|
from typing import Tuple, List
|
|
4
5
|
from colorama import Fore, Style
|
|
5
6
|
from polyapi.constants import BASIC_PYTHON_TYPES
|
|
@@ -91,7 +92,11 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
|
|
|
91
92
|
if type_spec.get("items"):
|
|
92
93
|
items = type_spec["items"]
|
|
93
94
|
if items.get("$ref"):
|
|
94
|
-
|
|
95
|
+
try:
|
|
96
|
+
return "ResponseType", generate_schema_types(type_spec, root="ResponseType") # type: ignore
|
|
97
|
+
except:
|
|
98
|
+
logging.exception(f"Error when generating schema type: {type_spec}")
|
|
99
|
+
return "Dict", ""
|
|
95
100
|
else:
|
|
96
101
|
item_type, _ = get_type_and_def(items)
|
|
97
102
|
title = f"List[{item_type}]"
|
|
@@ -108,7 +113,12 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
|
|
|
108
113
|
if title:
|
|
109
114
|
assert isinstance(title, str)
|
|
110
115
|
title = clean_title(title)
|
|
111
|
-
|
|
116
|
+
try:
|
|
117
|
+
return title, generate_schema_types(schema, root=title) # type: ignore
|
|
118
|
+
except:
|
|
119
|
+
logging.exception(f"Error when generating schema type: {schema}")
|
|
120
|
+
return "Dict", ""
|
|
121
|
+
|
|
112
122
|
elif schema.get("items"):
|
|
113
123
|
# fallback to schema $ref name if no explicit title
|
|
114
124
|
items = schema.get("items") # type: ignore
|
|
@@ -123,7 +133,11 @@ def get_type_and_def(type_spec: PropertyType) -> Tuple[str, str]:
|
|
|
123
133
|
return "List", ""
|
|
124
134
|
|
|
125
135
|
title = f"List[{title}]"
|
|
126
|
-
|
|
136
|
+
try:
|
|
137
|
+
return title, generate_schema_types(schema, root=title)
|
|
138
|
+
except:
|
|
139
|
+
logging.exception(f"Error when generating schema type: {schema}")
|
|
140
|
+
return "List", ""
|
|
127
141
|
else:
|
|
128
142
|
return "Any", ""
|
|
129
143
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{polyapi_python-0.2.3.dev8 → polyapi_python-0.2.3.dev9}/polyapi_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|