OpenGeodeWeb-Back 5.8.3__py3-none-any.whl → 5.8.4rc1__py3-none-any.whl
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.
- opengeodeweb_back/test_utils.py +4 -5
- opengeodeweb_back/utils_functions.py +6 -5
- {opengeodeweb_back-5.8.3.dist-info → opengeodeweb_back-5.8.4rc1.dist-info}/METADATA +2 -3
- {opengeodeweb_back-5.8.3.dist-info → opengeodeweb_back-5.8.4rc1.dist-info}/RECORD +7 -7
- {opengeodeweb_back-5.8.3.dist-info → opengeodeweb_back-5.8.4rc1.dist-info}/WHEEL +0 -0
- {opengeodeweb_back-5.8.3.dist-info → opengeodeweb_back-5.8.4rc1.dist-info}/licenses/LICENSE +0 -0
- {opengeodeweb_back-5.8.3.dist-info → opengeodeweb_back-5.8.4rc1.dist-info}/top_level.txt +0 -0
opengeodeweb_back/test_utils.py
CHANGED
@@ -12,14 +12,13 @@ def test_route_wrong_params(client, route, get_full_data):
|
|
12
12
|
response = client.post(route, json=json)
|
13
13
|
assert response.status_code == 400
|
14
14
|
error_description = response.json["description"]
|
15
|
-
assert
|
15
|
+
assert "data must contain" in error_description
|
16
|
+
assert f"'{key}'" in error_description
|
16
17
|
|
17
18
|
json = get_full_data()
|
18
19
|
json["dumb_key"] = "dumb_value"
|
19
20
|
response = client.post(route, json=json)
|
20
21
|
assert response.status_code == 400
|
21
22
|
error_description = response.json["description"]
|
22
|
-
assert
|
23
|
-
|
24
|
-
== "Validation error: Additional properties are not allowed ('dumb_key' was unexpected)"
|
25
|
-
)
|
23
|
+
assert "data must not contain" in error_description
|
24
|
+
assert "'dumb_key'" in error_description
|
@@ -6,8 +6,7 @@ import zipfile
|
|
6
6
|
|
7
7
|
# Third party imports
|
8
8
|
import flask
|
9
|
-
|
10
|
-
from jsonschema.exceptions import ValidationError
|
9
|
+
import fastjsonschema
|
11
10
|
import importlib.metadata as metadata
|
12
11
|
|
13
12
|
# Local application imports
|
@@ -82,9 +81,11 @@ def validate_request(request, schema):
|
|
82
81
|
json_data = {}
|
83
82
|
|
84
83
|
try:
|
85
|
-
validate
|
86
|
-
|
87
|
-
|
84
|
+
validate = fastjsonschema.compile(schema)
|
85
|
+
validate(json_data)
|
86
|
+
except fastjsonschema.JsonSchemaException as e:
|
87
|
+
error_msg = str(e)
|
88
|
+
flask.abort(400, error_msg)
|
88
89
|
|
89
90
|
|
90
91
|
def set_interval(func, sec, args=None):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: OpenGeodeWeb-Back
|
3
|
-
Version: 5.8.
|
3
|
+
Version: 5.8.4rc1
|
4
4
|
Summary: OpenGeodeWeb-Back is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
|
5
5
|
Author-email: Geode-solutions <team-web@geode-solutions.com>
|
6
6
|
Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Back
|
@@ -15,6 +15,7 @@ Requires-Dist: asgiref==3.8.1
|
|
15
15
|
Requires-Dist: attrs==25.3.0
|
16
16
|
Requires-Dist: blinker==1.9.0
|
17
17
|
Requires-Dist: click==8.2.1
|
18
|
+
Requires-Dist: fastjsonschema==2.21.1
|
18
19
|
Requires-Dist: flask[async]==3.1.1
|
19
20
|
Requires-Dist: flask-cors==6.0.1
|
20
21
|
Requires-Dist: geode-background==9.2.9
|
@@ -27,8 +28,6 @@ Requires-Dist: geode-simplex==9.4.2
|
|
27
28
|
Requires-Dist: geode-viewables==3.1.4
|
28
29
|
Requires-Dist: itsdangerous==2.2.0
|
29
30
|
Requires-Dist: jinja2==3.1.6
|
30
|
-
Requires-Dist: jsonschema==4.24.0
|
31
|
-
Requires-Dist: jsonschema-specifications==2025.4.1
|
32
31
|
Requires-Dist: markupsafe==3.0.2
|
33
32
|
Requires-Dist: opengeode-core==15.21.2
|
34
33
|
Requires-Dist: opengeode-geosciences==9.0.0
|
@@ -2,8 +2,8 @@ opengeodeweb_back/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
2
2
|
opengeodeweb_back/app_config.py,sha256=gJfYxDJOa_PYLqjqgdXacp3W3F109uujE9LGPvzHOkc,728
|
3
3
|
opengeodeweb_back/geode_functions.py,sha256=EPAM6pw9QwZfoeZjOxycFTKUANw6pdeXr2q3vsnPxt8,9121
|
4
4
|
opengeodeweb_back/geode_objects.py,sha256=13A9FTGugiA9ClSeYkBiCu5QGzm93nm8YJQwiWB4nNw,25995
|
5
|
-
opengeodeweb_back/test_utils.py,sha256=
|
6
|
-
opengeodeweb_back/utils_functions.py,sha256=
|
5
|
+
opengeodeweb_back/test_utils.py,sha256=18AbRW9-tfKkPcmRGilTTHXI7S3armYyV7Vdy5UvUKM,794
|
6
|
+
opengeodeweb_back/utils_functions.py,sha256=0STD6GwC81casYMbvAgAfZmJZzzt8EanJVGHZgWdYXg,4046
|
7
7
|
opengeodeweb_back/routes/blueprint_routes.py,sha256=dd5ccR6DY4GQGhc9oE3KtLj2YriaVFd1oTVizrnPp1g,14422
|
8
8
|
opengeodeweb_back/routes/models/blueprint_models.py,sha256=F5Rx1UpAII2oz75byx4UWvEWrrwY38xO5rsy6B9_AeM,2321
|
9
9
|
opengeodeweb_back/routes/models/schemas/mesh_components.json,sha256=3hgNqkxKDv691JGgjgMoqI_WgH2m7AtEFfjsOIqAz5Y,295
|
@@ -22,8 +22,8 @@ opengeodeweb_back/routes/schemas/save_viewable_file.json,sha256=pvvEdaC7bNASPMrl
|
|
22
22
|
opengeodeweb_back/routes/schemas/texture_coordinates.json,sha256=m0EqxlvKojXVxK5Csucodu3rq1YMVJPwXJN_Wreb3qc,355
|
23
23
|
opengeodeweb_back/routes/schemas/upload_file.json,sha256=LJ3U3L5ApKuQDVFIpVT_y2alq4HW_suTvZ3HUucNbhg,219
|
24
24
|
opengeodeweb_back/routes/schemas/vertex_attribute_names.json,sha256=bya9KGtTmHFWjD-ur0_0UAY2yf3KkMeuNrk6E1UkjLM,358
|
25
|
-
opengeodeweb_back-5.8.
|
26
|
-
opengeodeweb_back-5.8.
|
27
|
-
opengeodeweb_back-5.8.
|
28
|
-
opengeodeweb_back-5.8.
|
29
|
-
opengeodeweb_back-5.8.
|
25
|
+
opengeodeweb_back-5.8.4rc1.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
|
26
|
+
opengeodeweb_back-5.8.4rc1.dist-info/METADATA,sha256=AIhUAVtHI1uxXJCFfowdhvr2769bHMZlbegGsrBAdcg,3036
|
27
|
+
opengeodeweb_back-5.8.4rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
opengeodeweb_back-5.8.4rc1.dist-info/top_level.txt,sha256=tN1FZeLIVBrdja2-pbmhg5-tK-JILmmT9OeIBnhlUrQ,18
|
29
|
+
opengeodeweb_back-5.8.4rc1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|