diff --git a/CHANGELOG.md b/CHANGELOG.md index feb006fdd..a26a1db84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - key `file_type` was removed from endpoints GET [Publications](doc/rest.md#get-publications)/[Layers](doc/rest.md#get-layers)/[Workspace Layers](doc/rest.md#get-workspace-layers)/[Workspace Maps](doc/rest.md#get-workspace-maps)/[Maps](doc/rest.md#get-maps)/[Workspace Layer](doc/rest.md#get-workspace-layer)/[Workspace Map](doc/rest.md#get-workspace-map) response - key `file`.`path` was removed from GET [Workspace Layer](doc/rest.md#get-workspace-layer) response - key `sld` was removed from GET [Workspace Layer](doc/rest.md#get-workspace-layer) response + - key `db_table` was removed from GET [Workspace Layer](doc/rest.md#get-workspace-layer) response - body parameter `sld` for [POST Workspace Publications](doc/rest.md#post-workspace-layers) and [PATCH Workspace Publication](doc/rest.md#patch-workspace-layer) - [#1028](https://github.com/LayerManager/layman/issues/1028) Upgrade Node.js of Laymen Test Client from v18 to v22 and dependencies: - eslint-config-next 13 -> 14 diff --git a/doc/rest.md b/doc/rest.md index b98b620a7..0291719d4 100644 --- a/doc/rest.md +++ b/doc/rest.md @@ -314,11 +314,6 @@ JSON object with following structure: - *external_uri*: String. Available only for layers published from external table. Connection string to external table without password. - *status*: Status information about DB import and availability of the table. See [GET Workspace Layer](#get-workspace-layer) **wms** property for meaning. - *error*: If status is FAILURE, this may contain error object. -- *~~db_table~~*: **Deprecated**. Replaced by **db**. - - available only for vector layers - - *~~name~~*: Replaced by db.table. - - *~~status~~*: Replaced by db.status. - - *~~error~~*: Replaced by db.error. - **style** - *url*: String. URL of layer default style. It points to [GET Workspace Layer Style](#get-workspace-layer-style). - *type*: String. Type of used style. Either 'sld' or 'qml'. diff --git a/src/layman/layer/__init__.py b/src/layman/layer/__init__.py index 784b56850..17ddd19ea 100644 --- a/src/layman/layer/__init__.py +++ b/src/layman/layer/__init__.py @@ -117,7 +117,7 @@ def get_layer_patch_keys(): (settings.GEODATA_TYPE_VECTOR, settings.EnumOriginalDataSource.FILE.value): { 'name', 'uuid', 'layman_metadata', 'url', 'title', 'description', 'updated_at', 'wms', 'wfs', 'thumbnail', 'file', 'db', 'metadata', 'style', 'access_rights', 'bounding_box', 'native_crs', 'native_bounding_box', - 'original_data_source', 'geodata_type', 'db_table', + 'original_data_source', 'geodata_type', }, (settings.GEODATA_TYPE_VECTOR, settings.EnumOriginalDataSource.TABLE.value): { 'name', 'uuid', 'layman_metadata', 'url', 'title', 'description', 'updated_at', 'wms', 'wfs', 'thumbnail', diff --git a/src/layman/layer/util.py b/src/layman/layer/util.py index 1a7b6daf1..b5ba15c2b 100644 --- a/src/layman/layer/util.py +++ b/src/layman/layer/util.py @@ -104,10 +104,6 @@ def _get_complete_layer_info(workspace, layername, *, x_forwarded_items=None): 'title': layername, 'description': '', }) - if original_data_source == settings.EnumOriginalDataSource.FILE.value and partial_info.get('db', {}).get('table') is not None: - partial_info['db_table'] = { - 'name': partial_info['db']['table'], - } complete_info.update(partial_info) file_type = complete_info.get('_file', {}).get('file_type') diff --git a/src/layman/rest_responses_test.py b/src/layman/rest_responses_test.py index ee34d9c8c..105dd2a2f 100644 --- a/src/layman/rest_responses_test.py +++ b/src/layman/rest_responses_test.py @@ -105,7 +105,6 @@ class TestResponsesClass: 'bounding_box': list(test_data.SMALL_LAYER_BBOX), 'native_crs': 'EPSG:4326', 'native_bounding_box': list(test_data.SMALL_LAYER_NATIVE_BBOX), - 'db_table': {'name': None}, 'db': {'schema': workspace, 'table': None, 'geo_column': 'wkb_geometry', diff --git a/tests/asserts/final/publication/internal_rest.py b/tests/asserts/final/publication/internal_rest.py index 2b688faee..00f25296c 100644 --- a/tests/asserts/final/publication/internal_rest.py +++ b/tests/asserts/final/publication/internal_rest.py @@ -13,7 +13,7 @@ def same_values_in_internal_and_rest(workspace, publ_type, name, rest_publicatio # adjust rest_publication_detail, see get_complete_(layer|map)_info rest_publication_detail = copy.deepcopy(rest_publication_detail) - for key in ('layman_metadata', 'url', 'db_table'): + for key in ('layman_metadata', 'url'): rest_publication_detail.pop(key, None) if 'image_mosaic' not in rest_publication_detail: diff --git a/tests/dynamic_data/publications/layer_unavailable_source/unavailable_db_table_test.py b/tests/dynamic_data/publications/layer_unavailable_source/unavailable_db_table_test.py index 7160c6457..cdfca7e01 100644 --- a/tests/dynamic_data/publications/layer_unavailable_source/unavailable_db_table_test.py +++ b/tests/dynamic_data/publications/layer_unavailable_source/unavailable_db_table_test.py @@ -33,9 +33,6 @@ def test_internal_layer(self, layer: Publication): rest_info_pre = process_client.get_workspace_layer(layer.workspace, layer.name) table_name = f"layer_{rest_info_pre['uuid'].replace('-', '_')}" - assert rest_info_pre['db_table'] == { - 'name': table_name - } assert rest_info_pre['db'] == { 'schema': layer.workspace, 'table': table_name, @@ -51,9 +48,6 @@ def test_internal_layer(self, layer: Publication): rest_info_post = process_client.get_workspace_layer(layer.workspace, layer.name) - assert rest_info_post['db_table'] == { - 'status': 'NOT_AVAILABLE', - } assert rest_info_post['db'] == { 'status': 'NOT_AVAILABLE', }