Skip to content
Merged

Next #72

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@



## v4.0.0-rc.1 (2024-02-28)

### Breaking

* refactor(key): switch to filter_key

BREAKING CHANGE: changes api ([`29898c3`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/29898c373db23a5c9c18f0ef5f5ddec9b78b512d))

### Refactor

* refactor(key): switch to supported_feature ([`b78fc6c`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/b78fc6c224cf86849649c9095e9acde5f6badaf9))

* refactor(key): switch to filter_key ([`1aaeab2`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/1aaeab299092dc7bf3c6a33d927045edcf8cbdc4))

### Unknown

* Merge pull request #71 from Geode-solutions/refactor/key

refactor(key): switch to filter_key ([`0243dbc`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/0243dbc1d9a56c03b8f8c470c1c5193b3c201f8c))

* ([`913eb34`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/913eb345c5f72273bc7aa3ae6e015168d4a2f22c))


## v3.3.2 (2024-02-09)

### Unknown
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "OpenGeodeWeb-Back"
version = "3.3.2"
version = "4.0.0-rc.1"
dynamic = ["dependencies"]
authors = [
{ name="Geode-solutions", email="team-web@geode-solutions.com" },
Expand Down
6 changes: 4 additions & 2 deletions src/opengeodeweb_back/routes/blueprint_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
)
def allowed_files():
geode_functions.validate_request(flask.request, allowed_files_json)
extensions = geode_functions.list_input_extensions(flask.request.json["key"])
extensions = geode_functions.list_input_extensions(
flask.request.json["supported_feature"]
)
return {"status": 200, "extensions": extensions}


Expand Down Expand Up @@ -75,7 +77,7 @@ def allowed_objects():
geode_functions.validate_request(flask.request, allowed_objects_json)
file_absolute_path = os.path.join(UPLOAD_FOLDER, flask.request.json["filename"])
allowed_objects = geode_functions.list_geode_objects(
file_absolute_path, flask.request.json["key"]
file_absolute_path, flask.request.json["supported_feature"]
)
return flask.make_response({"allowed_objects": allowed_objects}, 200)

Expand Down
4 changes: 2 additions & 2 deletions src/opengeodeweb_back/routes/schemas/allowed_files.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"methods": ["POST"],
"type": "object",
"properties": {
"key": {
"supported_feature": {
"type": ["string", "null"]
}
},
"required": ["key"],
"required": ["supported_feature"],
"additionalProperties": false
}
4 changes: 2 additions & 2 deletions src/opengeodeweb_back/routes/schemas/allowed_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"filename": {
"type": "string"
},
"key": {
"supported_feature": {
"type": ["string", "null"]
}
},
"required": ["filename", "key"],
"required": ["filename", "supported_feature"],
"additionalProperties": false
}
4 changes: 2 additions & 2 deletions tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_allowed_files(client):
route = f"/allowed_files"
response = client.post(route, json={"key": None})
response = client.post(route, json={"supported_feature": None})
assert response.status_code == 200
extensions = response.json["extensions"]
assert type(extensions) is list
Expand All @@ -19,7 +19,7 @@ def test_allowed_objects(client):
def get_full_data():
return {
"filename": "corbi.og_brep",
"key": None,
"supported_feature": None,
}

# Normal test with filename 'corbi.og_brep'
Expand Down