Skip to content

Commit 831d358

Browse files
committed
change routes' names & schemas + rv output.og_tsf3d
1 parent 7d91011 commit 831d358

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

output.og_tsf3d

-10.3 KB
Binary file not shown.

src/opengeodeweb_back/routes/models/blueprint_models.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ def teardown_request(exception):
2323

2424
schemas = os.path.join(os.path.dirname(__file__), "schemas")
2525

26-
with open(os.path.join(schemas, "mesh_components.json"), "r") as file:
27-
mesh_components_json = json.load(file)
26+
with open(os.path.join(schemas, "vtm_component_indices.json"), "r") as file:
27+
vtm_component_indices_json = json.load(file)
2828

2929

30-
@routes.route(mesh_components_json["route"], methods=mesh_components_json["methods"])
30+
@routes.route(
31+
vtm_component_indices_json["route"], methods=vtm_component_indices_json["methods"]
32+
)
3133
def uuid_to_flat_index():
32-
utils_functions.validate_request(flask.request, mesh_components_json)
34+
utils_functions.validate_request(flask.request, vtm_component_indices_json)
3335
vtm_file_path = os.path.join(
3436
flask.current_app.config["DATA_FOLDER_PATH"], flask.request.json["id"] + ".vtm"
3537
)
@@ -63,13 +65,13 @@ def extract_model_uuids(geode_object, file_path):
6365
return uuid_dict
6466

6567

66-
with open(os.path.join(schemas, "components_types.json"), "r") as file:
67-
components_types_json = json.load(file)
68+
with open(os.path.join(schemas, "mesh_components.json"), "r") as file:
69+
mesh_components_json = json.load(file)
6870

6971

70-
@routes.route(components_types_json["route"], methods=components_types_json["methods"])
72+
@routes.route(mesh_components_json["route"], methods=mesh_components_json["methods"])
7173
def extract_uuids_endpoint():
72-
utils_functions.validate_request(flask.request, components_types_json)
74+
utils_functions.validate_request(flask.request, mesh_components_json)
7375

7476
file_path = os.path.join(
7577
flask.current_app.config["DATA_FOLDER_PATH"], flask.request.json["filename"]

src/opengeodeweb_back/routes/models/schemas/mesh_components.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
],
66
"type": "object",
77
"properties": {
8-
"id": {
8+
"filename": {
9+
"type": "string"
10+
},
11+
"geode_object": {
912
"type": "string"
1013
}
1114
},
1215
"required": [
13-
"id"
16+
"filename",
17+
"geode_object"
1418
],
1519
"additionalProperties": false
1620
}
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
{
2-
"route": "/components_types",
2+
"route": "/vtm_component_indices",
33
"methods": [
44
"POST"
55
],
66
"type": "object",
77
"properties": {
8-
"filename": {
9-
"type": "string"
10-
},
11-
"geode_object": {
8+
"id": {
129
"type": "string"
1310
}
1411
},
1512
"required": [
16-
"filename",
17-
"geode_object"
13+
"id"
1814
],
1915
"additionalProperties": false
2016
}

0 commit comments

Comments
 (0)