From c06e164abc3e19d98c97d4e8e873bdd0bc5d31c1 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 20 Nov 2026 13:55:58 +0100 Subject: [PATCH 1/4] perf: save native file in background after import save_viewable_file now answers once the viewables are written. The native re-save (kept so files are always written in the latest format) runs on a background executor, one entry per data id, saves of the same data chained. Every reader, writer or deleter of the native file waits for it first: load_geode_object, load_crs_object, apply_time_series, export_project, the import rollback and the data folder reset. A failed save is retried once, then the request needing the file fails with a 500. On a 284 MB structural model, the server answers in 6.3 s instead of 10.1 s and the first image arrives 2 s earlier. Co-Authored-By: Claude Opus 5.5 --- requirements.txt | 1 - src/opengeodeweb_back/crs/crs_assignment.py | 5 + src/opengeodeweb_back/crs/crs_functions.py | 9 +- src/opengeodeweb_back/geode_functions.py | 4 + .../routes/basemap/blueprint_basemap.py | 5 +- .../routes/blueprint_routes.py | 5 +- src/opengeodeweb_back/utils_functions.py | 162 ++++++- tests/test_background_native_save.py | 413 ++++++++++++++++++ tests/test_utils_functions.py | 8 +- 9 files changed, 590 insertions(+), 22 deletions(-) create mode 100644 tests/test_background_native_save.py diff --git a/requirements.txt b/requirements.txt index 38266610..597e5178 100644 --- a/requirements.txt +++ b/requirements.txt @@ -84,4 +84,3 @@ werkzeug==3.1.8 # flask # flask-cors -opengeodeweb-microservice==1.*,>=1.3.3 diff --git a/src/opengeodeweb_back/crs/crs_assignment.py b/src/opengeodeweb_back/crs/crs_assignment.py index 04b2365f..0066bf26 100644 --- a/src/opengeodeweb_back/crs/crs_assignment.py +++ b/src/opengeodeweb_back/crs/crs_assignment.py @@ -88,9 +88,14 @@ def assign_all( for target_id, _, target_object in targets: if target_id in assigned: _assign(target_object, authority, code) + # Local import: utils_functions imports the crs modules + from opengeodeweb_back.utils_functions import wait_native_saved # noqa: PLC0415 + # Assigning only relabels the coordinates: the viewables are unchanged for target_id, target_data, target_object in targets: if target_id in assigned: + # A background save of the same data, started meanwhile, must not write with it + wait_native_saved(target_id) target_object.save(geode_functions.data_file_path(target_id, target_data.native_file)) entries: dict[str, dict[str, Any]] = {} for target_id, _, target_object in targets: diff --git a/src/opengeodeweb_back/crs/crs_functions.py b/src/opengeodeweb_back/crs/crs_functions.py index be0350aa..4dde27fa 100644 --- a/src/opengeodeweb_back/crs/crs_functions.py +++ b/src/opengeodeweb_back/crs/crs_functions.py @@ -105,7 +105,7 @@ def known_geographic_info( def geographic_info( - crs_manager: og.CoordinateReferenceSystemManager2D | og.CoordinateReferenceSystemManager3D, + crs_manager: (og.CoordinateReferenceSystemManager2D | og.CoordinateReferenceSystemManager3D), ) -> og_geosciences.GeographicCoordinateSystemInfo | None: crs = crs_manager.active_coordinate_reference_system() if isinstance( @@ -282,7 +282,8 @@ def frame( crs: og.CoordinateReferenceSystem2D | og.CoordinateReferenceSystem3D, ) -> og.CoordinateSystem2D: return og.CoordinateSystem2D( - og.Point2D(_xy(crs, 0)), [og.Point2D(_xy(crs, first)), og.Point2D(_xy(crs, second))] + og.Point2D(_xy(crs, 0)), + [og.Point2D(_xy(crs, first)), og.Point2D(_xy(crs, second))], ) return frame(active), frame(original) @@ -310,7 +311,11 @@ def coordinate_system(points: list[og.Point2D]) -> og.CoordinateSystem2D: def load_crs_object(data_id: str) -> tuple[Data, CrsGeodeObject]: + # Local import: utils_functions imports this module + from opengeodeweb_back.utils_functions import wait_native_saved # noqa: PLC0415 + data = geode_functions.get_data_info(data_id) + wait_native_saved(data_id) geode_object = geode_functions.geode_object_from_string(data.geode_object_type).load_one( geode_functions.data_file_path(data_id, data.native_file) ) diff --git a/src/opengeodeweb_back/geode_functions.py b/src/opengeodeweb_back/geode_functions.py index d7b4d755..e2410b1b 100644 --- a/src/opengeodeweb_back/geode_functions.py +++ b/src/opengeodeweb_back/geode_functions.py @@ -38,10 +38,14 @@ def geode_object_from_string(value: str) -> type[GeodeObject]: def load_geode_object(data_id: str) -> GeodeObject: + # Local import: utils_functions imports this module + from .utils_functions import wait_native_saved # noqa: PLC0415 + data = Data.get(data_id) if not data: flask.abort(404, f"Data with id {data_id} not found") + wait_native_saved(data_id) file_absolute_path = data_file_path(data_id, data.native_file) logger.debug( "Loading file: %s (exists: %s)", diff --git a/src/opengeodeweb_back/routes/basemap/blueprint_basemap.py b/src/opengeodeweb_back/routes/basemap/blueprint_basemap.py index 3e3610f2..22a1ad9c 100644 --- a/src/opengeodeweb_back/routes/basemap/blueprint_basemap.py +++ b/src/opengeodeweb_back/routes/basemap/blueprint_basemap.py @@ -2,7 +2,6 @@ # Standard library imports import logging -import shutil from pathlib import Path from typing import TYPE_CHECKING, Any @@ -83,7 +82,7 @@ def _save_tiles(data_id: str, tiles: basemap_tiles.TileRange, images: Images) -> ) except OSError: # The request rolls the data row back: its folder must not stay behind - shutil.rmtree(data_folder, ignore_errors=True) + utils_functions.remove_data_folder(data_id, data_folder, ignore_errors=True) raise @@ -132,5 +131,5 @@ def delete(params: schemas.Delete) -> schemas.DeleteResponse: if not basemap_tiles.is_basemap(params.id): flask.abort(400, f"Data {params.id} is not a basemap") get_session().delete(data) - shutil.rmtree(geode_functions.data_file_path(params.id)) + utils_functions.remove_data_folder(params.id) return schemas.DeleteResponse(id=params.id) diff --git a/src/opengeodeweb_back/routes/blueprint_routes.py b/src/opengeodeweb_back/routes/blueprint_routes.py index 03dc326f..c45b28dd 100644 --- a/src/opengeodeweb_back/routes/blueprint_routes.py +++ b/src/opengeodeweb_back/routes/blueprint_routes.py @@ -5,7 +5,6 @@ import logging import math import os -import shutil import sqlite3 import tempfile import time @@ -296,6 +295,7 @@ def apply_time_series( _check_time_series_extension(params.filename) if data.geode_object_type != GeodeBRep.geode_object_type(): flask.abort(400, f"{data.geode_object_type} is not a BRep: time series cannot be applied") + utils_functions.wait_native_saved(params.id) geode_object = GeodeBRep.load_one(geode_functions.data_file_path(params.id, data.native_file)) # Applied in memory first: if OpenGeode fails, nothing is written. geode_object.load_time_series(geode_functions.upload_file_path(params.filename)) @@ -840,6 +840,7 @@ def export_project() -> flask.Response: flask.abort(400, "Requested filename must end with .vease") export_vease_path = Path(project_folder) / filename + utils_functions.wait_all_native_saved() with get_session() as session: rows = session.query(Data.id, Data.native_file).all() # Basemaps are rebuilt from the project style: neither their rows nor their tiles are exported @@ -888,7 +889,7 @@ def _reset_data_folder(data_folder_path: Path) -> None: if data_folder_path.exists(): for item in data_folder_path.iterdir(): if item.is_dir() and not item.is_symlink(): - shutil.rmtree(item) + utils_functions.remove_data_folder(item.name, item) else: item.unlink() else: diff --git a/src/opengeodeweb_back/utils_functions.py b/src/opengeodeweb_back/utils_functions.py index 233b6cc8..e45eea89 100644 --- a/src/opengeodeweb_back/utils_functions.py +++ b/src/opengeodeweb_back/utils_functions.py @@ -9,7 +9,8 @@ import time import uuid import zipfile -from concurrent.futures import ThreadPoolExecutor +from concurrent.futures import Future, ThreadPoolExecutor, wait +from dataclasses import dataclass, field from importlib import metadata from pathlib import Path from typing import TYPE_CHECKING, Any @@ -33,6 +34,11 @@ logger = logging.getLogger(__name__) +# Native files are saved in background: the viewer only needs the viewables. +# Several files can be imported at once, hence the default pool size. +_native_executor = ThreadPoolExecutor(thread_name_prefix="native_save") +_native_saves_lock = threading.Lock() + if TYPE_CHECKING: from collections.abc import Callable, Sequence @@ -303,18 +309,150 @@ def model_components(data_id: str, model: GeodeModel, viewable_file: str | None) } +@dataclass +class _NativeSave: + """A background native save. The object is kept until it is saved, to retry a failure.""" + + future: Future[list[str]] + geode_object: GeodeObject + native_path: str + # Held by a synchronous retry: a later save of the same data waits for it + retry_lock: threading.Lock = field(default_factory=threading.Lock) + retried: bool = False + + +_native_saves: dict[str, _NativeSave] = {} + + +def _save_native_in_background(geode_object: GeodeObject, data_id: str, native_path: str) -> None: + """Save the native file without blocking the request. + + The task only uses the captured geode object: no app context nor DB session. + The Werkzeug debug reloader may kill a save mid-write (dev only). + """ + + def save_native(previous: _NativeSave | None) -> list[str]: + if previous is not None: + # A re-save of the same data supersedes the previous one, whatever its outcome, + # but never writes the same file at the same time. No deadlock: FIFO order puts + # the previous save ahead in the queue or running. + wait([previous.future]) + with previous.retry_lock: + pass + return geode_object.save(native_path) + + # One critical section: two re-saves of the same data cannot chain on the same previous + with _native_saves_lock: + previous = _native_saves.get(data_id) + future = _native_executor.submit(save_native, previous) + _native_saves[data_id] = _NativeSave(future, geode_object, native_path) + # Outside the lock: the callback takes it, and runs here if the save is already done + future.add_done_callback(lambda done: _forget_native_save(data_id, done)) + + +def _forget_native_save(data_id: str, future: Future[list[str]]) -> None: + """Drop a successful save from the registry; failed ones stay to be retried.""" + if future.cancelled() or future.exception() is not None: + return + with _native_saves_lock: + entry = _native_saves.get(data_id) + if entry is not None and entry.future is future: + del _native_saves[data_id] + + +def _drop_native_save(data_id: str, entry: _NativeSave) -> None: + with _native_saves_lock: + if _native_saves.get(data_id) is entry: + del _native_saves[data_id] + + +def discard_native_save(data_id: str) -> None: + """Wait for the native save of data_id, if any, and forget it whatever its outcome.""" + with _native_saves_lock: + entry = _native_saves.get(data_id) + if entry is None: + return + try: + entry.future.result() + except Exception: + logger.warning("Discarded failed native save of %s", data_id, exc_info=True) + # A retry running on another thread must not write in a folder being removed, + # and none may start once the entry is dropped + with entry.retry_lock: + _drop_native_save(data_id, entry) + + +def remove_data_folder( + data_id: str, folder: str | Path | None = None, *, ignore_errors: bool = False +) -> None: + """Remove the folder of data_id once its native save is done (by default its data folder).""" + discard_native_save(data_id) + if folder is None: + folder = geode_functions.data_file_path(data_id) + shutil.rmtree(folder, ignore_errors=ignore_errors) + + +def _settle_native_save(data_id: str, entry: _NativeSave) -> Exception | None: + """Wait for entry; on failure, retry its save once on this thread. None once saved.""" + try: + entry.future.result() + except Exception as error: + with entry.retry_lock: + with _native_saves_lock: + superseded = _native_saves.get(data_id) is not entry + if not entry.retried and not superseded: + logger.warning("Native save of %s failed, retrying", data_id, exc_info=error) + try: + entry.geode_object.save(entry.native_path) + except Exception as retry_error: + logger.exception("Native file of %s could not be saved", data_id) + return retry_error + entry.retried = True + _drop_native_save(data_id, entry) + return None + + +def _ensure_native_saved(data_id: str) -> Exception | None: + """Wait until data_id has no pending save. The error of a save that failed twice, if any.""" + while True: + with _native_saves_lock: + entry = _native_saves.get(data_id) + if entry is None: + return None + # A superseded entry is not dropped: the loop then waits for the newer save + error = _settle_native_save(data_id, entry) + if error is not None: + return error + + +def wait_native_saved(data_id: str) -> None: + """Wait for the background native save of data_id, if any, retrying a failure once.""" + error = _ensure_native_saved(data_id) + if error is not None: + # The failed save stays registered: a later call retries it again + flask.abort(500, f"Native file of {data_id} could not be saved: {error}") + + +def wait_all_native_saved() -> None: + """Wait for every pending background native save, retrying each failure once. + + Aborts once, naming every data whose native file could not be saved. + """ + with _native_saves_lock: + pending = list(_native_saves) + errors = {data_id: _ensure_native_saved(data_id) for data_id in pending} + failed = [f"{data_id} ({error})" for data_id, error in errors.items() if error] + if failed: + flask.abort(500, f"Native files could not be saved: {', '.join(failed)}") + + def save_all_viewables_and_return_info( geode_object: GeodeObject, data: Data, data_path: str, ) -> dict[str, Any]: with ThreadPoolExecutor() as executor: - tasks: list[tuple[Callable[[str], Any], str]] = [ - ( - geode_object.save, - str(Path(data_path) / ("native." + geode_object.native_extension())), - ) - ] + tasks: list[tuple[Callable[[str], Any], str]] = [] if geode_object.is_viewable(): tasks.extend( [ @@ -327,10 +465,9 @@ def save_all_viewables_and_return_info( ) results = list(executor.map(lambda args: args[0](args[1]), tasks)) - native_files = results[0] if geode_object.is_viewable(): - viewable_path = results[1] - light_path = results[2] + viewable_path = results[0] + light_path = results[1] binary_light_viewable = Path(light_path).read_bytes() binary_light_viewable_str = base64.b64encode(binary_light_viewable).decode("ascii") data.viewable_file = Path(viewable_path).name @@ -340,7 +477,7 @@ def save_all_viewables_and_return_info( data.viewable_file = None data.light_viewable_file = None - data.native_file = Path(native_files[0]).name + data.native_file = f"native.{geode_object.native_extension()}" name = geode_object.identifier.name() if not name: @@ -365,6 +502,7 @@ def save_all_viewables_and_return_info( crs = active_crs(geode_object) if crs is not None: response["crs"] = crs + _save_native_in_background(geode_object, data.id, str(Path(data_path) / data.native_file)) return response @@ -426,7 +564,7 @@ def _remove_created_data(created: list[Data]) -> None: session = get_session() for data in created: session.delete(data) - shutil.rmtree(geode_functions.data_file_path(data.id), ignore_errors=True) + remove_data_folder(data.id, ignore_errors=True) session.flush() diff --git a/tests/test_background_native_save.py b/tests/test_background_native_save.py new file mode 100644 index 00000000..d50b9159 --- /dev/null +++ b/tests/test_background_native_save.py @@ -0,0 +1,413 @@ +"""The native file of an import is saved in background, after the route answered.""" + +from __future__ import annotations + +# Standard library imports +import contextlib +import logging +import threading +import time +import zipfile +from dataclasses import dataclass, field +from pathlib import Path +from typing import TYPE_CHECKING, Any + +# Third party imports +import pytest +from opengeodeweb_microservice.database import connection +from werkzeug.exceptions import HTTPException + +# Local application imports +from opengeodeweb_back import geode_functions, test_utils, utils_functions +from opengeodeweb_back.geode_objects.geode_triangulated_surface3d import ( + GeodeTriangulatedSurface3D, +) + +if TYPE_CHECKING: + from collections.abc import Callable, Generator + + from flask.testing import FlaskClient + from werkzeug.test import TestResponse + + from opengeodeweb_back.geode_objects.geode_object import GeodeObject + +GEODE_OBJECT_TYPE = "TriangulatedSurface3D" +FILENAME = "test.og_tsf3d" +NATIVE_FILE = "native.og_tsf3d" +ASSIGN_ROUTE = "/opengeodeweb_back/crs/assign_geographic" +LAMBERT = {"authority": "EPSG", "code": "2154", "name": "RGF93 v1 / Lambert-93"} +SAVE_ROUTE = "/opengeodeweb_back/save_viewable_file" +EXPORT_ROUTE = "/opengeodeweb_back/export_project" +BASEMAP_BUILD_ROUTE = "/opengeodeweb_back/basemap/build" +BASEMAP_DELETE_ROUTE = "/opengeodeweb_back/basemap/delete" +ROUTE_TIMEOUT = 10.0 +# Larger than ROUTE_TIMEOUT: a blocked route fails the test before the save gives up +TIMEOUT = 25.0 +STILL_RUNNING_DELAY = 0.5 + + +@dataclass +class NativeSave: + """Blocks every native save of a TriangulatedSurface3D until released.""" + + release: threading.Event = field(default_factory=threading.Event) + condition: threading.Condition = field(default_factory=threading.Condition) + entered: int = 0 + error: Exception | None = None + # How many saves fail with error, every one if None + failures: int | None = None + # Seconds a released save stays in progress, to widen the window of a write race + hold: float = 0.0 + active: int = 0 + max_active: int = 0 + threads: list[threading.Thread] = field(default_factory=list) + + def wait_entered(self, count: int) -> bool: + with self.condition: + return self.condition.wait_for(lambda: self.entered >= count, TIMEOUT) + + +@dataclass +class Background[T]: + """A call running in a thread, whose result is awaited with a timeout.""" + + thread: threading.Thread + outcome: dict[str, Any] = field(default_factory=dict) + + def is_running_after(self, delay: float) -> bool: + self.thread.join(delay) + return self.thread.is_alive() + + def result(self, timeout: float = ROUTE_TIMEOUT) -> T: + self.thread.join(timeout) + if self.thread.is_alive(): + pytest.fail(f"still running after {timeout}s") + if "error" in self.outcome: + raise self.outcome["error"] + value: T = self.outcome["value"] + return value + + +def _close_thread_session() -> None: + registry = connection._state.scoped_session_registry # noqa: SLF001 + if registry is not None: + registry.remove() + + +@pytest.fixture +def native_save(client: FlaskClient, monkeypatch: pytest.MonkeyPatch) -> Generator[NativeSave]: + state = NativeSave() + original_save = GeodeTriangulatedSurface3D.save + + def blocked_save(self: GeodeTriangulatedSurface3D, filename: str) -> list[str]: + with state.condition: + state.entered += 1 + state.condition.notify_all() + if not state.release.wait(TIMEOUT): + msg = "native save never released" + raise TimeoutError(msg) + with state.condition: + failing = state.error is not None and state.failures != 0 + if failing and state.failures is not None: + state.failures -= 1 + state.active += 1 + state.max_active = max(state.max_active, state.active) + try: + time.sleep(state.hold) + if failing and state.error is not None: + raise state.error + return original_save(self, filename) + finally: + with state.condition: + state.active -= 1 + + monkeypatch.setattr(GeodeTriangulatedSurface3D, "save", blocked_save) + test_utils.check_upload_file(client, FILENAME) + try: + yield state + finally: + state.release.set() + for thread in state.threads: + thread.join(TIMEOUT) + # No pending nor failed native save may leak into the next test + with client.application.app_context(), contextlib.suppress(HTTPException): + utils_functions.wait_all_native_saved() + utils_functions._native_saves.clear() # noqa: SLF001 + + +def _in_thread[T](state: NativeSave, function: Callable[[], T]) -> Background[T]: + outcome: dict[str, Any] = {} + + def run() -> None: + try: + outcome["value"] = function() + except BaseException as error: # noqa: BLE001 + outcome["error"] = error + finally: + _close_thread_session() + + thread = threading.Thread(target=run, daemon=True) + state.threads.append(thread) + thread.start() + return Background(thread, outcome) + + +def _import(client: FlaskClient, state: NativeSave) -> Background[TestResponse]: + return _in_thread( + state, + lambda: client.post( + SAVE_ROUTE, + json={"geode_object_type": GEODE_OBJECT_TYPE, "filename": FILENAME}, + ), + ) + + +def _imported_item(client: FlaskClient, state: NativeSave) -> dict[str, Any]: + """Import while the native save is blocked: the route must answer anyway.""" + response = _import(client, state).result() + assert response.status_code == 200, response.get_json() + item: dict[str, Any] = response.get_json()["data"][0] + assert len(response.get_json()["data"]) == 1 + assert item["native_file"] == NATIVE_FILE + return item + + +def _load_in_app(client: FlaskClient, data_id: str) -> GeodeObject: + with client.application.app_context(): + return geode_functions.load_geode_object(data_id) + + +def test_route_answers_before_native_save(client: FlaskClient, native_save: NativeSave) -> None: + """(a) save_viewable_file answers while the native save is still blocked.""" + item = _imported_item(client, native_save) + assert not native_save.release.is_set() + assert native_save.wait_entered(1) + assert isinstance(item["binary_light_viewable"], str) + + +def test_native_file_saved_after_wait(client: FlaskClient, native_save: NativeSave) -> None: + """(b) After wait_native_saved, the native file exists and loads.""" + item = _imported_item(client, native_save) + native_save.release.set() + with client.application.app_context(): + utils_functions.wait_native_saved(item["id"]) + native_path = Path(geode_functions.data_file_path(item["id"], NATIVE_FILE)) + assert native_path.is_file() + GeodeTriangulatedSurface3D.load_one(str(native_path)) + assert isinstance(geode_functions.load_geode_object(item["id"]), GeodeTriangulatedSurface3D) + + +def test_load_waits_for_native_save(client: FlaskClient, native_save: NativeSave) -> None: + """(c) load_geode_object does not return before the native save is done.""" + item = _imported_item(client, native_save) + load = _in_thread(native_save, lambda: _load_in_app(client, item["id"])) + assert load.is_running_after(STILL_RUNNING_DELAY), "load returned before the native save" + native_save.release.set() + assert isinstance(load.result(), GeodeTriangulatedSurface3D) + + +def test_failed_native_save_aborts_load( + client: FlaskClient, native_save: NativeSave, caplog: pytest.LogCaptureFixture +) -> None: + """(d) A failed native save makes load_geode_object abort with 500, and is logged.""" + native_save.error = RuntimeError("disk exploded") + item = _imported_item(client, native_save) + with caplog.at_level(logging.ERROR): + native_save.release.set() + # The error must be logged by wait_native_saved on the calling thread, + # not from a done-callback: caplog only sees it reliably there. + with pytest.raises(HTTPException) as error: + _load_in_app(client, item["id"]) + assert error.value.code == 500 + assert "could not be saved" in str(error.value.description) + assert "disk exploded" in caplog.text + # A failed save keeps failing the same way + with pytest.raises(HTTPException) as error: + _load_in_app(client, item["id"]) + assert error.value.code == 500 + + +def test_concurrent_imports_save_in_parallel(client: FlaskClient, native_save: NativeSave) -> None: + """(e) Two imports issued concurrently run their native saves in parallel.""" + first = _import(client, native_save) + second = _import(client, native_save) + for import_call in (first, second): + assert import_call.result().status_code == 200 + assert native_save.wait_entered(2), "both native saves should run at once" + native_save.release.set() + with client.application.app_context(): + utils_functions.wait_all_native_saved() + + +def test_export_contains_pending_native_file( + client: FlaskClient, native_save: NativeSave, tmp_path: Path +) -> None: + """(f) export_project waits for pending native saves and exports their files.""" + item = _imported_item(client, native_save) + filename = "background_native_save.vease" + export = _in_thread( + native_save, + lambda: client.post(EXPORT_ROUTE, json={"snapshot": {}, "filename": filename}), + ) + assert export.is_running_after(STILL_RUNNING_DELAY), "export did not wait for the save" + native_save.release.set() + response = export.result() + assert response.status_code == 200 + response.direct_passthrough = False + vease = tmp_path / filename + vease.write_bytes(response.get_data()) + response.close() + (Path(client.application.config["DATA_FOLDER_PATH"]) / filename).unlink(missing_ok=True) + with zipfile.ZipFile(vease) as zip_file: + native_bytes = zip_file.read(f"{item['id']}/{NATIVE_FILE}") + native_copy = tmp_path / NATIVE_FILE + native_copy.write_bytes(native_bytes) + GeodeTriangulatedSurface3D.load_one(str(native_copy)) + + +def test_crs_assignment_waits_for_native_save(client: FlaskClient, native_save: NativeSave) -> None: + """(g) A CRS assignment waits for the native save, then its change is in the final file.""" + item = _imported_item(client, native_save) + assign = _in_thread( + native_save, + lambda: client.post(ASSIGN_ROUTE, json={"id": item["id"], **LAMBERT}), + ) + assert assign.is_running_after(STILL_RUNNING_DELAY), ( + "assignment did not wait for the native save" + ) + native_save.release.set() + response = assign.result() + assert response.status_code == 200, response.get_json() + with client.application.app_context(): + utils_functions.wait_all_native_saved() + geode_object = _load_in_app(client, item["id"]) + assert isinstance(geode_object, GeodeTriangulatedSurface3D) + manager = geode_object.crs_manager() + assert manager.active_coordinate_reference_system_name() == "EPSG:2154" + + +def _test_surface() -> GeodeTriangulatedSurface3D: + return GeodeTriangulatedSurface3D.load_one(str(Path(__file__).parent / "data" / FILENAME)) + + +def _wait_registered_save(data_id: str) -> None: + """Wait for the background save of data_id to end, without settling it.""" + with utils_functions._native_saves_lock: # noqa: SLF001 + entry = utils_functions._native_saves.get(data_id) # noqa: SLF001 + if entry is not None: + entry.future.exception(TIMEOUT) + + +def test_failed_native_save_is_retried(client: FlaskClient, native_save: NativeSave) -> None: + """A failed background save is retried once by the next load, which then succeeds.""" + native_save.error = RuntimeError("transient lock") + native_save.failures = 1 + item = _imported_item(client, native_save) + native_save.release.set() + _wait_registered_save(item["id"]) + assert native_save.failures == 0, "the background save should have failed" + response = client.post(ASSIGN_ROUTE, json={"id": item["id"], **LAMBERT}) + assert response.status_code == 200, response.get_json() + with client.application.app_context(): + utils_functions.wait_all_native_saved() + assert isinstance(_load_in_app(client, item["id"]), GeodeTriangulatedSurface3D) + + +def test_failed_native_save_retry_fails(client: FlaskClient, native_save: NativeSave) -> None: + """When the retry fails too, the load answers 500, and the next call retries again.""" + native_save.error = RuntimeError("disk exploded") + native_save.failures = 2 + item = _imported_item(client, native_save) + native_save.release.set() + response = client.post(ASSIGN_ROUTE, json={"id": item["id"], **LAMBERT}) + assert response.status_code == 500 + assert "disk exploded" in response.get_json()["description"] + assert native_save.failures == 0 + # The data is not lost for the session: the next call retries and heals it + response = client.post(ASSIGN_ROUTE, json={"id": item["id"], **LAMBERT}) + assert response.status_code == 200, response.get_json() + + +def test_export_names_every_failed_native_save( + client: FlaskClient, native_save: NativeSave, tmp_path: Path +) -> None: + """export_project waits for every save, then answers 500 naming each failed data.""" + native_save.error = RuntimeError("disk exploded") + item = _imported_item(client, native_save) + other_id = "other-failing-data" + utils_functions._save_native_in_background( # noqa: SLF001 + _test_surface(), other_id, str(tmp_path / NATIVE_FILE) + ) + native_save.release.set() + response = client.post( + EXPORT_ROUTE, json={"snapshot": {}, "filename": "failed_native_save.vease"} + ) + assert response.status_code == 500 + description = response.get_json()["description"] + assert item["id"] in description + assert other_id in description + + +def test_resaves_of_one_data_never_overlap(client: FlaskClient, native_save: NativeSave) -> None: + """Two re-saves of one data, requested at once, write its native file one at a time.""" + item = _imported_item(client, native_save) + with client.application.app_context(): + native_path = geode_functions.data_file_path(item["id"], NATIVE_FILE) + geode_object = _test_surface() + start = threading.Barrier(2) + + def resave() -> None: + start.wait(TIMEOUT) + utils_functions._save_native_in_background( # noqa: SLF001 + geode_object, item["id"], native_path + ) + + resaves = [_in_thread(native_save, resave) for _ in range(2)] + for call in resaves: + call.result() + native_save.hold = 0.2 + native_save.release.set() + with client.application.app_context(): + utils_functions.wait_native_saved(item["id"]) + assert native_save.entered == 3 + assert native_save.max_active == 1 + + +def test_basemap_delete_waits_for_native_save( + client: FlaskClient, + native_save: NativeSave, + monkeypatch: pytest.MonkeyPatch, + tmp_path: Path, +) -> None: + """Deleting a basemap whose native save is pending waits for it, then removes it all.""" + any_tile = Path(__file__).parent / "data" / "basemap_tiles" / "1" / "0" / "0.png" + monkeypatch.setenv("BASEMAP_TILE_URL", any_tile.as_uri()) + monkeypatch.setenv("BASEMAP_CACHE_FOLDER", str(tmp_path)) + build = client.post( + BASEMAP_BUILD_ROUTE, + json={ + "maps": ["satellite"], + "bounds": { + "x_min": 650_000.0, + "y_min": 6_860_000.0, + "x_max": 655_000.0, + "y_max": 6_865_000.0, + }, + "crs": LAMBERT, + "z": 0.0, + }, + ) + assert build.status_code == 200, build.get_json() + data_id = build.get_json()["id"] + with client.application.app_context(): + folder = Path(geode_functions.data_file_path(data_id)) + delete = _in_thread( + native_save, lambda: client.post(BASEMAP_DELETE_ROUTE, json={"id": data_id}) + ) + assert delete.is_running_after(STILL_RUNNING_DELAY), "delete did not wait for the native save" + native_save.release.set() + response = delete.result() + assert response.status_code == 200, response.get_json() + assert not folder.exists() + with utils_functions._native_saves_lock: # noqa: SLF001 + assert data_id not in utils_functions._native_saves # noqa: SLF001 diff --git a/tests/test_utils_functions.py b/tests/test_utils_functions.py index a4d781d2..eb7ff3ab 100644 --- a/tests/test_utils_functions.py +++ b/tests/test_utils_functions.py @@ -218,6 +218,8 @@ def test_generate_files_from_object( assert data.light_viewable_file.endswith(".vtp") data_path = Path(app.config["DATA_FOLDER_PATH"]) / result["id"] + # The native file is saved in background + utils_functions.wait_native_saved(result["id"]) assert (data_path / result["native_file"]).exists() assert (data_path / result["viewable_file"]).exists() assert (data_path / data.light_viewable_file).exists() @@ -331,13 +333,15 @@ def test_generate_files_from_mixed_file_gives_distinct_geode_ids( app = client.application with app.app_context(): [surface] = utils_functions.generate_files_from_file( - GeodeTriangulatedSurface3D.geode_object_type(), "mixed_polygons_polyhedra.vtu" + GeodeTriangulatedSurface3D.geode_object_type(), + "mixed_polygons_polyhedra.vtu", ) [solid] = utils_functions.generate_files_from_file( GeodeTetrahedralSolid3D.geode_object_type(), "mixed_polygons_polyhedra.vtu" ) [surface_again] = utils_functions.generate_files_from_file( - GeodeTriangulatedSurface3D.geode_object_type(), "mixed_polygons_polyhedra.vtu" + GeodeTriangulatedSurface3D.geode_object_type(), + "mixed_polygons_polyhedra.vtu", ) # Each content family of one file is a distinct object assert surface["geode_id"] != solid["geode_id"] From 120077c53480ecdc22a55aecb1d7493ae72a65b8 Mon Sep 17 00:00:00 2001 From: BotellaA <3213882+BotellaA@users.noreply.github.com> Date: Fri, 20 Nov 2026 18:29:23 +0000 Subject: [PATCH 2/4] Apply prepare changes --- opengeodeweb_back_schemas.json | 1961 ++--------------- opengeodeweb_back_typed_schemas.d.ts | 266 ++- .../routes/basemap/schemas/build.py | 20 +- .../routes/basemap/schemas/delete.py | 6 +- .../routes/create/schemas/edged_curve.py | 25 +- .../routes/create/schemas/horizon_stack.py | 19 +- .../routes/create/schemas/point_set.py | 25 +- .../create/schemas/polygonal_surface.py | 25 +- .../routes/crs/schemas/active.py | 8 +- .../routes/crs/schemas/align.py | 34 +- .../routes/crs/schemas/assign_geographic.py | 35 +- .../routes/crs/schemas/convert_geographic.py | 35 +- .../routes/crs/schemas/geographic_list.py | 9 +- .../routes/schemas/allowed_objects.py | 9 +- .../routes/schemas/apply_time_series.py | 7 +- .../routes/schemas/cell_attribute_names.py | 9 +- .../routes/schemas/cell_attribute_range.py | 7 +- .../routes/schemas/data_missing_files.py | 7 +- .../routes/schemas/edge_attribute_names.py | 9 +- .../routes/schemas/edge_attribute_range.py | 7 +- .../routes/schemas/export_project.py | 5 +- .../schemas/geode_object_inheritance.py | 10 +- .../geode_objects_and_output_extensions.py | 7 +- .../routes/schemas/horizon_stack_info.py | 10 +- .../model_component_edge_attribute_names.py | 10 +- .../model_component_edge_attribute_range.py | 11 +- ...model_component_polygon_attribute_names.py | 10 +- ...model_component_polygon_attribute_range.py | 11 +- ...el_component_polyhedron_attribute_names.py | 10 +- ...el_component_polyhedron_attribute_range.py | 11 +- .../model_component_vertex_attribute_names.py | 10 +- .../model_component_vertex_attribute_range.py | 11 +- .../routes/schemas/polygon_attribute_names.py | 9 +- .../routes/schemas/polygon_attribute_range.py | 7 +- .../schemas/polyhedron_attribute_names.py | 9 +- .../schemas/polyhedron_attribute_range.py | 7 +- .../routes/schemas/save_viewable_file.py | 24 +- .../routes/schemas/texture_coordinates.py | 4 +- .../schemas/time_series_allowed_objects.py | 4 +- .../schemas/time_series_missing_files.py | 4 +- .../routes/schemas/upload_file.py | 5 +- .../routes/schemas/validate.py | 4 +- .../routes/schemas/vertex_attribute_names.py | 9 +- .../routes/schemas/vertex_attribute_range.py | 7 +- 44 files changed, 471 insertions(+), 2261 deletions(-) diff --git a/opengeodeweb_back_schemas.json b/opengeodeweb_back_schemas.json index e3a1dc63..d3bad507 100644 --- a/opengeodeweb_back_schemas.json +++ b/opengeodeweb_back_schemas.json @@ -10,10 +10,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -24,10 +21,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -82,28 +76,7 @@ "additionalProperties": false }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "z": { "type": "number" @@ -133,56 +106,19 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { "type": "string" @@ -194,34 +130,10 @@ "type": "integer" }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "columns": { "type": "integer", @@ -322,25 +234,7 @@ "points": { "type": "array", "items": { - "title": "Point3D", - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "z" - ], - "additionalProperties": false + "title": "Point3D" }, "minItems": 3 }, @@ -369,56 +263,19 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { "type": "string" @@ -432,129 +289,20 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent", - "type": "object", - "properties": { - "viewer_id": { - "title": "ViewerId", - "type": "integer" - }, - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "boundaries": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "internals": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "viewer_id", - "geode_id", - "name", - "type", - "boundaries", - "internals", - "is_active" - ], - "additionalProperties": false + "title": "MeshComponent" } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent", - "type": "object", - "properties": { - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "geode_id", - "name", - "type", - "items", - "is_active" - ], - "additionalProperties": false + "title": "CollectionComponent" } }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -584,25 +332,7 @@ "points": { "type": "array", "items": { - "title": "Point3D", - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "z" - ], - "additionalProperties": false + "title": "Point3D" }, "minItems": 1 } @@ -619,56 +349,19 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { "type": "string" @@ -682,129 +375,20 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent", - "type": "object", - "properties": { - "viewer_id": { - "title": "ViewerId", - "type": "integer" - }, - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "boundaries": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "internals": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "viewer_id", - "geode_id", - "name", - "type", - "boundaries", - "internals", - "is_active" - ], - "additionalProperties": false + "title": "MeshComponent" } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent", - "type": "object", - "properties": { - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "geode_id", - "name", - "type", - "items", - "is_active" - ], - "additionalProperties": false + "title": "CollectionComponent" } }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -860,56 +444,19 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { "type": "string" @@ -923,129 +470,20 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent", - "type": "object", - "properties": { - "viewer_id": { - "title": "ViewerId", - "type": "integer" - }, - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "boundaries": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "internals": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "viewer_id", - "geode_id", - "name", - "type", - "boundaries", - "internals", - "is_active" - ], - "additionalProperties": false + "title": "MeshComponent" } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent", - "type": "object", - "properties": { - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "geode_id", - "name", - "type", - "items", - "is_active" - ], - "additionalProperties": false + "title": "CollectionComponent" } }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -1075,25 +513,7 @@ "points": { "type": "array", "items": { - "title": "Point3D", - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "z" - ], - "additionalProperties": false + "title": "Point3D" }, "minItems": 2 }, @@ -1123,192 +543,46 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { - "type": "string" - }, - "binary_light_viewable": { - "type": "string" - }, - "nb_vertices": { - "type": "integer" - }, - "mesh_components": { - "type": "array", - "items": { - "title": "MeshComponent", - "type": "object", - "properties": { - "viewer_id": { - "title": "ViewerId", - "type": "integer" - }, - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "boundaries": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "internals": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "viewer_id", - "geode_id", - "name", - "type", - "boundaries", - "internals", - "is_active" - ], - "additionalProperties": false + "type": "string" + }, + "binary_light_viewable": { + "type": "string" + }, + "nb_vertices": { + "type": "integer" + }, + "mesh_components": { + "type": "array", + "items": { + "title": "MeshComponent" } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent", - "type": "object", - "properties": { - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "geode_id", - "name", - "type", - "items", - "is_active" - ], - "additionalProperties": false + "title": "CollectionComponent" } }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -1334,36 +608,7 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" } }, "required": [ @@ -1376,28 +621,7 @@ "crs_list": { "type": "array", "items": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } } }, @@ -1416,18 +640,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "linked_ids": { "type": "array", "items": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "uniqueItems": true }, @@ -1458,28 +676,7 @@ "type": "string" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "linked": { "type": "array", @@ -1487,34 +684,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "binary_light_viewable": { "type": "string" @@ -1540,18 +713,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "linked_ids": { "type": "array", "items": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "uniqueItems": true }, @@ -1582,28 +749,7 @@ "type": "object", "properties": { "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "implausible": { "type": "boolean" @@ -1614,34 +760,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "implausible": { "type": "boolean" @@ -1667,18 +789,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "linked_ids": { "type": "array", "items": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "uniqueItems": true }, @@ -1757,28 +873,7 @@ "type": "string" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" }, "linked": { "type": "array", @@ -1786,37 +881,13 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "binary_light_viewable": { "type": "string" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -1839,10 +910,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -1856,28 +924,7 @@ "type": "string" }, "crs_info": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -1896,15 +943,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -1948,10 +990,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -1964,34 +1003,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -2010,10 +1022,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -2054,9 +1063,7 @@ "type": "object", "properties": { "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "additionalProperties": false, @@ -2082,9 +1089,7 @@ "type": "object", "properties": { "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -2127,9 +1132,7 @@ "type": "object", "properties": { "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -2161,10 +1164,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -2196,41 +1196,10 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -2251,56 +1220,19 @@ "type": "string" }, "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType", - "type": "string", - "enum": [ - "mesh", - "model" - ] + "title": "ViewerObjectType" }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "viewable_file": { "type": "string" @@ -2314,129 +1246,20 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent", - "type": "object", - "properties": { - "viewer_id": { - "title": "ViewerId", - "type": "integer" - }, - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "boundaries": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "internals": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "viewer_id", - "geode_id", - "name", - "type", - "boundaries", - "internals", - "is_active" - ], - "additionalProperties": false + "title": "MeshComponent" } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent", - "type": "object", - "properties": { - "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "items": { - "type": "array", - "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 - } - }, - "is_active": { - "type": "boolean" - } - }, - "required": [ - "geode_id", - "name", - "type", - "items", - "is_active" - ], - "additionalProperties": false + "title": "CollectionComponent" } }, "geode_id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "crs": { - "title": "CRS", - "type": "object", - "properties": { - "authority": { - "type": "string", - "minLength": 1 - }, - "code": { - "type": "string", - "minLength": 1 - }, - "name": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "authority", - "code", - "name" - ], - "additionalProperties": false + "title": "CRS" } }, "required": [ @@ -2467,15 +1290,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -2519,10 +1337,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -2535,34 +1350,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -2581,15 +1369,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -2633,10 +1416,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -2649,34 +1429,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -2718,25 +1471,17 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -2781,18 +1526,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 } @@ -2808,34 +1547,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -2854,25 +1566,17 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -2917,18 +1621,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 } @@ -2944,34 +1642,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -2990,25 +1661,17 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -3053,18 +1716,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 } @@ -3080,34 +1737,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -3126,25 +1756,17 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -3189,18 +1811,12 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "component_ids": { "type": "array", "items": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "minItems": 1 } @@ -3216,34 +1832,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -3308,10 +1897,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -3327,10 +1913,7 @@ "type": "object", "properties": { "id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "name": { "type": "string" @@ -3349,10 +1932,7 @@ "type": "object", "properties": { "id": { - "title": "GeodeId", - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "name": { "type": "string" @@ -3382,41 +1962,10 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -3452,36 +2001,7 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" } }, "required": [ @@ -3494,71 +2014,13 @@ "parents": { "type": "array", "items": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" } }, "children": { "type": "array", "items": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" } } }, @@ -3581,9 +2043,7 @@ "type": "object" }, "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -3604,15 +2064,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -3656,10 +2111,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -3672,34 +2124,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -3718,41 +2143,10 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" }, "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -3796,15 +2190,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 + "title": "AttributeName" } }, "required": [ @@ -3848,10 +2237,7 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ @@ -3864,34 +2250,7 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo", - "type": "object", - "properties": { - "attribute_name": { - "title": "AttributeName", - "type": "string", - "minLength": 1 - }, - "attribute_id": { - "type": "string" - }, - "nb_items": { - "type": "integer" - }, - "time_steps": { - "type": "array", - "items": { - "type": "number" - } - } - }, - "required": [ - "attribute_name", - "attribute_id", - "nb_items", - "time_steps" - ], - "additionalProperties": false + "title": "AttributeInfo" } } }, @@ -3910,15 +2269,10 @@ "type": "object", "properties": { "id": { - "title": "DataId", - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -3942,9 +2296,7 @@ "type": "object", "properties": { "filename": { - "title": "Filename", - "type": "string", - "minLength": 1 + "title": "Filename" } }, "required": [ @@ -3980,36 +2332,7 @@ "objects_to_load": { "type": "array", "items": { - "title": "GeodeObjectType", - "type": "string", - "enum": [ - "VertexSet", - "Graph", - "PointSet2D", - "PointSet3D", - "EdgedCurve2D", - "EdgedCurve3D", - "RasterImage2D", - "PolygonalSurface2D", - "PolygonalSurface3D", - "TriangulatedSurface2D", - "TriangulatedSurface3D", - "RegularGrid2D", - "LightRegularGrid2D", - "RasterImage3D", - "PolyhedralSolid3D", - "TetrahedralSolid3D", - "HybridSolid3D", - "RegularGrid3D", - "LightRegularGrid3D", - "BRep", - "Section", - "StructuralModel", - "CrossSection", - "ImplicitStructuralModel", - "ImplicitCrossSection", - "HorizonStack3D" - ] + "title": "GeodeObjectType" } } }, diff --git a/opengeodeweb_back_typed_schemas.d.ts b/opengeodeweb_back_typed_schemas.d.ts index a3d1d297..1bd564d4 100644 --- a/opengeodeweb_back_typed_schemas.d.ts +++ b/opengeodeweb_back_typed_schemas.d.ts @@ -1,21 +1,17 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_back_schemas.json"; -import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeInfo, AttributeName, CRS, CollectionComponent, Filename, MeshComponent, Point3D, ViewerId } from "@geode/opengeodeweb-back/schema_types"; -import type { GeodeObjectType, ViewerObjectType } from "@geode/opengeodeweb-microservice/data_types"; - export interface BasemapDeleteParams { - id: DataId; + id: any; } export interface BasemapDeleteResponse { - id: DataId; + id: any; } export interface BasemapBuildParams { bounds: Bounds; - crs: CRS; + crs: any; maps: Map[]; margin?: boolean; max_pixels?: number; @@ -36,10 +32,10 @@ export interface BasemapBuildResponse { binary_light_viewable?: string; bounds: MeshBounds; columns: number; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; maps: MapElement[]; name: string; @@ -47,7 +43,7 @@ export interface BasemapBuildResponse { nb_vertices?: number; rows: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; zoom: number; } @@ -65,45 +61,45 @@ export interface MapElement { export interface CreatePolygonalSurfaceParams { name: string; - points: Point3D[]; + points: any[]; polygons: Array; } export interface CreatePolygonalSurfaceResponse { binary_light_viewable?: string; - collection_components?: CollectionComponent[]; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + collection_components?: any[]; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; - mesh_components?: MeshComponent[]; + mesh_components?: any[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; } export interface CreatePointSetParams { name: string; - points: Point3D[]; + points: any[]; } export interface CreatePointSetResponse { binary_light_viewable?: string; - collection_components?: CollectionComponent[]; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + collection_components?: any[]; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; - mesh_components?: MeshComponent[]; + mesh_components?: any[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; } export interface CreateHorizonStackParams { @@ -114,96 +110,96 @@ export interface CreateHorizonStackParams { export interface CreateHorizonStackResponse { binary_light_viewable?: string; - collection_components?: CollectionComponent[]; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + collection_components?: any[]; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; - mesh_components?: MeshComponent[]; + mesh_components?: any[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; } export interface CreateEdgedCurveParams { edges: Array; name: string; - points: Point3D[]; + points: any[]; } export interface CreateEdgedCurveResponse { binary_light_viewable?: string; - collection_components?: CollectionComponent[]; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + collection_components?: any[]; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; - mesh_components?: MeshComponent[]; + mesh_components?: any[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; } export interface CRSGeographicListParams { - geode_object_type: GeodeObjectType; + geode_object_type: any; } export interface CRSGeographicListResponse { - crs_list: CRS[]; + crs_list: any[]; } export interface CRSConvertGeographicParams { authority: string; code: string; - id: DataId; - linked_ids?: DataId[]; + id: any; + linked_ids?: any[]; name: string; } export interface CRSConvertGeographicResponse { binary_light_viewable?: string; - crs?: CRS; + crs?: any; linked?: CRSConvertGeographicResponseLinked[]; } export interface CRSConvertGeographicResponseLinked { binary_light_viewable?: string; - crs?: CRS; - id: DataId; + crs?: any; + id: any; } export interface CRSAssignGeographicParams { authority: string; code: string; - id: DataId; - linked_ids?: DataId[]; + id: any; + linked_ids?: any[]; name: string; only_plausible?: boolean; } export interface CRSAssignGeographicResponse { - crs?: CRS; + crs?: any; implausible?: boolean; linked?: CRSAssignGeographicResponseLinked[]; } export interface CRSAssignGeographicResponseLinked { - crs?: CRS; - id: DataId; + crs?: any; + id: any; implausible?: boolean; } export interface CRSAlignParams { authority: string; code: string; - id: DataId; - linked_ids?: DataId[]; + id: any; + linked_ids?: any[]; name: string; source_points: SourcePoint[]; target_points: TargetPoint[]; @@ -222,28 +218,28 @@ export interface TargetPoint { export interface CRSAlignResponse { binary_light_viewable?: string; - crs?: CRS; + crs?: any; linked?: CRSAlignResponseLinked[]; } export interface CRSAlignResponseLinked { binary_light_viewable?: string; - crs?: CRS; - id: DataId; + crs?: any; + id: any; } export interface CRSActiveParams { - id: DataId; + id: any; } export interface CRSActiveResponse { - crs_info?: CRS; + crs_info?: any; crs_name: string; } export interface VertexAttributeRangeParams { - attribute_name: AttributeName; - id: DataId; + attribute_name: any; + id: any; } export interface VertexAttributeRangeResponse { @@ -253,15 +249,15 @@ export interface VertexAttributeRangeResponse { } export interface VertexAttributeNamesParams { - id: DataId; + id: any; } export interface VertexAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface ValidateParams { - id: DataId; + id: any; } export interface ValidateResponse { @@ -271,7 +267,7 @@ export interface ValidateResponse { } export interface UploadFileParams { - filename?: Filename; + filename?: any; } export interface UploadFileResponse { @@ -279,7 +275,7 @@ export interface UploadFileResponse { } export interface TimeSeriesMissingFilesParams { - filename: Filename; + filename: any; } export interface TimeSeriesMissingFilesResponse { @@ -289,7 +285,7 @@ export interface TimeSeriesMissingFilesResponse { } export interface TimeSeriesAllowedObjectsParams { - filename: Filename; + filename: any; } export interface TimeSeriesAllowedObjectsResponse { @@ -297,7 +293,7 @@ export interface TimeSeriesAllowedObjectsResponse { } export interface TextureCoordinatesParams { - id: DataId; + id: any; } export interface TextureCoordinatesResponse { @@ -305,8 +301,8 @@ export interface TextureCoordinatesResponse { } export interface SaveViewableFileParams { - filename: Filename; - geode_object_type: GeodeObjectType; + filename: any; + geode_object_type: any; } export interface SaveViewableFileResponse { @@ -315,23 +311,23 @@ export interface SaveViewableFileResponse { export interface SaveViewableFileItem { binary_light_viewable?: string; - collection_components?: CollectionComponent[]; - crs?: CRS; - geode_id: GeodeId; - geode_object_type: GeodeObjectType; - id: DataId; + collection_components?: any[]; + crs?: any; + geode_id: any; + geode_object_type: any; + id: any; is_viewable: boolean; - mesh_components?: MeshComponent[]; + mesh_components?: any[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: ViewerObjectType; + viewer_object_type: any; } export interface PolyhedronAttributeRangeParams { - attribute_name: AttributeName; - id: DataId; + attribute_name: any; + id: any; } export interface PolyhedronAttributeRangeResponse { @@ -341,16 +337,16 @@ export interface PolyhedronAttributeRangeResponse { } export interface PolyhedronAttributeNamesParams { - id: DataId; + id: any; } export interface PolyhedronAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface PolygonAttributeRangeParams { - attribute_name: AttributeName; - id: DataId; + attribute_name: any; + id: any; } export interface PolygonAttributeRangeResponse { @@ -360,11 +356,11 @@ export interface PolygonAttributeRangeResponse { } export interface PolygonAttributeNamesParams { - id: DataId; + id: any; } export interface PolygonAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface PingParams { @@ -375,9 +371,9 @@ export interface PingResponse { } export interface ModelComponentVertexAttributeRangeParams { - attribute_name: AttributeName; - component_ids: GeodeId[]; - id: DataId; + attribute_name: any; + component_ids: any[]; + id: any; } export interface ModelComponentVertexAttributeRangeResponse { @@ -387,18 +383,18 @@ export interface ModelComponentVertexAttributeRangeResponse { } export interface ModelComponentVertexAttributeNamesParams { - component_ids: GeodeId[]; - id: DataId; + component_ids: any[]; + id: any; } export interface ModelComponentVertexAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface ModelComponentPolyhedronAttributeRangeParams { - attribute_name: AttributeName; - component_ids: GeodeId[]; - id: DataId; + attribute_name: any; + component_ids: any[]; + id: any; } export interface ModelComponentPolyhedronAttributeRangeResponse { @@ -408,18 +404,18 @@ export interface ModelComponentPolyhedronAttributeRangeResponse { } export interface ModelComponentPolyhedronAttributeNamesParams { - component_ids: GeodeId[]; - id: DataId; + component_ids: any[]; + id: any; } export interface ModelComponentPolyhedronAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface ModelComponentPolygonAttributeRangeParams { - attribute_name: AttributeName; - component_ids: GeodeId[]; - id: DataId; + attribute_name: any; + component_ids: any[]; + id: any; } export interface ModelComponentPolygonAttributeRangeResponse { @@ -429,18 +425,18 @@ export interface ModelComponentPolygonAttributeRangeResponse { } export interface ModelComponentPolygonAttributeNamesParams { - component_ids: GeodeId[]; - id: DataId; + component_ids: any[]; + id: any; } export interface ModelComponentPolygonAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface ModelComponentEdgeAttributeRangeParams { - attribute_name: AttributeName; - component_ids: GeodeId[]; - id: DataId; + attribute_name: any; + component_ids: any[]; + id: any; } export interface ModelComponentEdgeAttributeRangeResponse { @@ -450,12 +446,12 @@ export interface ModelComponentEdgeAttributeRangeResponse { } export interface ModelComponentEdgeAttributeNamesParams { - component_ids: GeodeId[]; - id: DataId; + component_ids: any[]; + id: any; } export interface ModelComponentEdgeAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface KillParams { @@ -473,7 +469,7 @@ export interface ImportProjectResponse { } export interface HorizonStackInfoParams { - id: DataId; + id: any; } export interface HorizonStackInfoResponse { @@ -482,18 +478,18 @@ export interface HorizonStackInfoResponse { } export interface Horizon { - id: GeodeId; + id: any; name: string; } export interface Unit { - id: GeodeId; + id: any; name: string; } export interface GeodeObjectsAndOutputExtensionsParams { - filename: Filename; - geode_object_type: GeodeObjectType; + filename: any; + geode_object_type: any; } export interface GeodeObjectsAndOutputExtensionsResponse { @@ -501,22 +497,22 @@ export interface GeodeObjectsAndOutputExtensionsResponse { } export interface GeodeObjectInheritanceParams { - geode_object_type: GeodeObjectType; + geode_object_type: any; } export interface GeodeObjectInheritanceResponse { - children: GeodeObjectType[]; - parents: GeodeObjectType[]; + children: any[]; + parents: any[]; } export interface ExportProjectParams { - filename: Filename; + filename: any; snapshot: { [key: string]: any }; } export interface EdgeAttributeRangeParams { - attribute_name: AttributeName; - id: DataId; + attribute_name: any; + id: any; } export interface EdgeAttributeRangeResponse { @@ -526,16 +522,16 @@ export interface EdgeAttributeRangeResponse { } export interface EdgeAttributeNamesParams { - id: DataId; + id: any; } export interface EdgeAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface DataMissingFilesParams { - filename: Filename; - geode_object_type: GeodeObjectType; + filename: any; + geode_object_type: any; } export interface DataMissingFilesResponse { @@ -545,8 +541,8 @@ export interface DataMissingFilesResponse { } export interface CellAttributeRangeParams { - attribute_name: AttributeName; - id: DataId; + attribute_name: any; + id: any; } export interface CellAttributeRangeResponse { @@ -556,28 +552,28 @@ export interface CellAttributeRangeResponse { } export interface CellAttributeNamesParams { - id: DataId; + id: any; } export interface CellAttributeNamesResponse { - attributes: AttributeInfo[]; + attributes: any[]; } export interface ApplyTimeSeriesParams { - filename: Filename; - id: DataId; + filename: any; + id: any; } export interface ApplyTimeSeriesResponse { } export interface AllowedObjectsParams { - filename: Filename; + filename: any; } export interface AllowedObjectsResponse { allowed_objects: { [key: string]: AllowedObject }; - objects_to_load: GeodeObjectType[]; + objects_to_load: any[]; } export interface AllowedObject { diff --git a/src/opengeodeweb_back/routes/basemap/schemas/build.py b/src/opengeodeweb_back/routes/basemap/schemas/build.py index b798c0cd..4afa8f54 100644 --- a/src/opengeodeweb_back/routes/basemap/schemas/build.py +++ b/src/opengeodeweb_back/routes/basemap/schemas/build.py @@ -1,13 +1,11 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType -from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import List, Any, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass from enum import Enum -from typing import List, Optional +from typing import Any, List, Optional @dataclass @@ -33,7 +31,7 @@ def __post_init__(self) -> None: print_dataclass(self) bounds: Bounds - crs: CRS + crs: Any maps: List[Map] z: float margin: Optional[bool] = None @@ -68,18 +66,18 @@ def __post_init__(self) -> None: attribution: str bounds: MeshBounds columns: int - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool maps: List[MapElement] name: str native_file: str rows: int - viewer_object_type: ViewerObjectType + viewer_object_type: Any zoom: int binary_light_viewable: Optional[str] = None - crs: Optional[CRS] = None + crs: Any nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -90,4 +88,4 @@ def __post_init__(self) -> None: response=BuildResponse, ) -__all__ = ["Bounds", "CRS", "Build", "BuildResponse", "build_route"] +__all__ = ["Bounds", "Build", "BuildResponse", "build_route"] diff --git a/src/opengeodeweb_back/routes/basemap/schemas/delete.py b/src/opengeodeweb_back/routes/basemap/schemas/delete.py index 4b3d7e7e..be729d6a 100644 --- a/src/opengeodeweb_back/routes/basemap/schemas/delete.py +++ b/src/opengeodeweb_back/routes/basemap/schemas/delete.py @@ -1,9 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -11,7 +11,7 @@ class Delete(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -19,7 +19,7 @@ class DeleteResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any delete_route = Route( diff --git a/src/opengeodeweb_back/routes/create/schemas/edged_curve.py b/src/opengeodeweb_back/routes/create/schemas/edged_curve.py index fb16e388..1ab2b516 100644 --- a/src/opengeodeweb_back/routes/create/schemas/edged_curve.py +++ b/src/opengeodeweb_back/routes/create/schemas/edged_curve.py @@ -1,13 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -17,7 +14,7 @@ def __post_init__(self) -> None: edges: List[List[int]] name: str - points: List[Point3D] + points: List[Any] @dataclass @@ -25,17 +22,17 @@ class EdgedCurveResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool name: str native_file: str - viewer_object_type: ViewerObjectType + viewer_object_type: Any binary_light_viewable: Optional[str] = None - collection_components: Optional[List[CollectionComponent]] = None - crs: Optional[CRS] = None - mesh_components: Optional[List[MeshComponent]] = None + collection_components: Optional[List[Any]] = None + crs: Any + mesh_components: Optional[List[Any]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -46,4 +43,4 @@ def __post_init__(self) -> None: response=EdgedCurveResponse, ) -__all__ = ["Point3D", "EdgedCurve", "EdgedCurveResponse", "edged_curve_route"] +__all__ = ["EdgedCurve", "EdgedCurveResponse", "edged_curve_route"] diff --git a/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py b/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py index d446c63c..3eb39f58 100644 --- a/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py +++ b/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py @@ -1,9 +1,6 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, ViewerId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass @@ -25,17 +22,17 @@ class HorizonStackResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool name: str native_file: str - viewer_object_type: ViewerObjectType + viewer_object_type: Any binary_light_viewable: Optional[str] = None - collection_components: Optional[List[CollectionComponent]] = None - crs: Optional[CRS] = None - mesh_components: Optional[List[MeshComponent]] = None + collection_components: Optional[List[Any]] = None + crs: Any + mesh_components: Optional[List[Any]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None diff --git a/src/opengeodeweb_back/routes/create/schemas/point_set.py b/src/opengeodeweb_back/routes/create/schemas/point_set.py index e0af2779..6566b62a 100644 --- a/src/opengeodeweb_back/routes/create/schemas/point_set.py +++ b/src/opengeodeweb_back/routes/create/schemas/point_set.py @@ -1,13 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -16,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) name: str - points: List[Point3D] + points: List[Any] @dataclass @@ -24,17 +21,17 @@ class PointSetResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool name: str native_file: str - viewer_object_type: ViewerObjectType + viewer_object_type: Any binary_light_viewable: Optional[str] = None - collection_components: Optional[List[CollectionComponent]] = None - crs: Optional[CRS] = None - mesh_components: Optional[List[MeshComponent]] = None + collection_components: Optional[List[Any]] = None + crs: Any + mesh_components: Optional[List[Any]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -45,4 +42,4 @@ def __post_init__(self) -> None: response=PointSetResponse, ) -__all__ = ["Point3D", "PointSet", "PointSetResponse", "point_set_route"] +__all__ = ["PointSet", "PointSetResponse", "point_set_route"] diff --git a/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py b/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py index bcb9c117..c17395f2 100644 --- a/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py +++ b/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py @@ -1,13 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -16,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) name: str - points: List[Point3D] + points: List[Any] polygons: List[List[int]] @@ -25,17 +22,17 @@ class PolygonalSurfaceResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool name: str native_file: str - viewer_object_type: ViewerObjectType + viewer_object_type: Any binary_light_viewable: Optional[str] = None - collection_components: Optional[List[CollectionComponent]] = None - crs: Optional[CRS] = None - mesh_components: Optional[List[MeshComponent]] = None + collection_components: Optional[List[Any]] = None + crs: Any + mesh_components: Optional[List[Any]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -46,4 +43,4 @@ def __post_init__(self) -> None: response=PolygonalSurfaceResponse, ) -__all__ = ["Point3D", "PolygonalSurface", "PolygonalSurfaceResponse", "polygonal_surface_route"] +__all__ = ["PolygonalSurface", "PolygonalSurfaceResponse", "polygonal_surface_route"] diff --git a/src/opengeodeweb_back/routes/crs/schemas/active.py b/src/opengeodeweb_back/routes/crs/schemas/active.py index 75269a65..ed50aaed 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/active.py +++ b/src/opengeodeweb_back/routes/crs/schemas/active.py @@ -1,11 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +11,7 @@ class Active(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -22,7 +20,7 @@ def __post_init__(self) -> None: print_dataclass(self) crs_name: str - crs_info: Optional[CRS] = None + crs_info: Any active_route = Route( diff --git a/src/opengeodeweb_back/routes/crs/schemas/align.py b/src/opengeodeweb_back/routes/crs/schemas/align.py index 3dc1ad00..a6fa2fa8 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/align.py +++ b/src/opengeodeweb_back/routes/crs/schemas/align.py @@ -1,10 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Optional, List +from typing import Optional, Any, List @dataclass @@ -33,31 +33,11 @@ def __post_init__(self) -> None: authority: str code: str - id: DataId + id: Any name: str source_points: List[SourcePoint] target_points: List[TargetPoint] - linked_ids: Optional[List[DataId]] = None - - -@dataclass -class AlignResponseCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str - name: str - - -@dataclass -class LinkedCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str - name: str + linked_ids: Optional[List[Any]] = None @dataclass @@ -65,9 +45,9 @@ class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any binary_light_viewable: Optional[str] = None - crs: Optional[LinkedCRS] = None + crs: Any @dataclass @@ -76,7 +56,7 @@ def __post_init__(self) -> None: print_dataclass(self) binary_light_viewable: Optional[str] = None - crs: Optional[AlignResponseCRS] = None + crs: Any linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py b/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py index 96a9cbbd..3008ddca 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py +++ b/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Optional, List +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Optional +from typing import Any, List, Optional @dataclass @@ -15,39 +14,19 @@ def __post_init__(self) -> None: authority: str code: str - id: DataId + id: Any name: str - linked_ids: Optional[List[DataId]] = None + linked_ids: Optional[List[Any]] = None only_plausible: Optional[bool] = None -@dataclass -class AssignGeographicResponseCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str - name: str - - -@dataclass -class LinkedCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str - name: str - - @dataclass class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId - crs: Optional[LinkedCRS] = None + id: Any + crs: Any implausible: Optional[bool] = None @@ -56,7 +35,7 @@ class AssignGeographicResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - crs: Optional[AssignGeographicResponseCRS] = None + crs: Any implausible: Optional[bool] = None linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py b/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py index 465c3446..d83cf42a 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py +++ b/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Optional, List +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Optional +from typing import Any, List, Optional @dataclass @@ -15,29 +14,9 @@ def __post_init__(self) -> None: authority: str code: str - id: DataId - name: str - linked_ids: Optional[List[DataId]] = None - - -@dataclass -class ConvertGeographicResponseCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str - name: str - - -@dataclass -class LinkedCRS(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - authority: str - code: str + id: Any name: str + linked_ids: Optional[List[Any]] = None @dataclass @@ -45,9 +24,9 @@ class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any binary_light_viewable: Optional[str] = None - crs: Optional[LinkedCRS] = None + crs: Any @dataclass @@ -56,7 +35,7 @@ def __post_init__(self) -> None: print_dataclass(self) binary_light_viewable: Optional[str] = None - crs: Optional[ConvertGeographicResponseCRS] = None + crs: Any linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py b/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py index e3af1b35..8bb08fbd 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py +++ b/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.database.data_types import GeodeObjectType -from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class GeographicList(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_object_type: GeodeObjectType + geode_object_type: Any @dataclass @@ -21,7 +20,7 @@ class GeographicListResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - crs_list: List[CRS] + crs_list: List[Any] geographic_list_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/allowed_objects.py b/src/opengeodeweb_back/routes/schemas/allowed_objects.py index cde049f0..ecc2b7fa 100644 --- a/src/opengeodeweb_back/routes/schemas/allowed_objects.py +++ b/src/opengeodeweb_back/routes/schemas/allowed_objects.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import Filename -from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Dict, List +from typing import Dict, List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class AllowedObjects(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename + filename: Any @dataclass @@ -32,7 +31,7 @@ def __post_init__(self) -> None: print_dataclass(self) allowed_objects: Dict[str, AllowedObject] - objects_to_load: List[GeodeObjectType] + objects_to_load: List[Any] allowed_objects_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/apply_time_series.py b/src/opengeodeweb_back/routes/schemas/apply_time_series.py index 5657177b..f2bda381 100644 --- a/src/opengeodeweb_back/routes/schemas/apply_time_series.py +++ b/src/opengeodeweb_back/routes/schemas/apply_time_series.py @@ -1,10 +1,9 @@ -from opengeodeweb_back.schema_types import Filename -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,8 +11,8 @@ class ApplyTimeSeries(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename - id: DataId + filename: Any + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py index eb8de15e..d3e1a414 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class CellAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -21,7 +20,7 @@ class CellAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] cell_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py b/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py index bbcc0e6a..f74cde9c 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class CellAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - id: DataId + attribute_name: Any + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/data_missing_files.py b/src/opengeodeweb_back/routes/schemas/data_missing_files.py index e8f81973..881900bb 100644 --- a/src/opengeodeweb_back/routes/schemas/data_missing_files.py +++ b/src/opengeodeweb_back/routes/schemas/data_missing_files.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import Filename -from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class DataMissingFiles(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename - geode_object_type: GeodeObjectType + filename: Any + geode_object_type: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py index 05be560c..56110658 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class EdgeAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -21,7 +20,7 @@ class EdgeAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] edge_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py b/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py index 84bab5f0..353fdb5e 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class EdgeAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - id: DataId + attribute_name: Any + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/export_project.py b/src/opengeodeweb_back/routes/schemas/export_project.py index adc4fbf7..ade611ad 100644 --- a/src/opengeodeweb_back/routes/schemas/export_project.py +++ b/src/opengeodeweb_back/routes/schemas/export_project.py @@ -1,10 +1,9 @@ -from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import BinaryResponse, Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Dict, Any +from typing import Any, Dict @dataclass @@ -12,7 +11,7 @@ class ExportProject(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename + filename: Any snapshot: Dict[str, Any] diff --git a/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py b/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py index da05441f..9eba0954 100644 --- a/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py +++ b/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py @@ -1,10 +1,10 @@ -from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class GeodeObjectInheritance(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_object_type: GeodeObjectType + geode_object_type: Any @dataclass @@ -20,8 +20,8 @@ class GeodeObjectInheritanceResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - children: List[GeodeObjectType] - parents: List[GeodeObjectType] + children: List[Any] + parents: List[Any] geode_object_inheritance_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py b/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py index ea3cf144..95216af9 100644 --- a/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py +++ b/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import Filename -from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Dict from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class GeodeObjectsAndOutputExtensions(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename - geode_object_type: GeodeObjectType + filename: Any + geode_object_type: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py b/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py index a89f4bd2..c877c7fe 100644 --- a/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py +++ b/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py @@ -1,10 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import Any, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class HorizonStackInfo(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -20,7 +20,7 @@ class Horizon(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: GeodeId + id: Any name: str @@ -29,7 +29,7 @@ class Unit(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: GeodeId + id: Any name: str diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py index 040fba15..5e42591a 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py @@ -1,11 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -13,8 +11,8 @@ class ModelComponentEdgeAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[GeodeId] - id: DataId + component_ids: List[Any] + id: Any @dataclass @@ -22,7 +20,7 @@ class ModelComponentEdgeAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] model_component_edge_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py index 1236947f..a49ef4c9 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import Any, List @dataclass @@ -13,9 +12,9 @@ class ModelComponentEdgeAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - component_ids: List[GeodeId] - id: DataId + attribute_name: Any + component_ids: List[Any] + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py index 6fac784b..e72c3b88 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py @@ -1,11 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -13,8 +11,8 @@ class ModelComponentPolygonAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[GeodeId] - id: DataId + component_ids: List[Any] + id: Any @dataclass @@ -22,7 +20,7 @@ class ModelComponentPolygonAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] model_component_polygon_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py index 584f8ab4..fbe6a9cb 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import Any, List @dataclass @@ -13,9 +12,9 @@ class ModelComponentPolygonAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - component_ids: List[GeodeId] - id: DataId + attribute_name: Any + component_ids: List[Any] + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py index cc3e0574..b58034b0 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py @@ -1,11 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -13,8 +11,8 @@ class ModelComponentPolyhedronAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[GeodeId] - id: DataId + component_ids: List[Any] + id: Any @dataclass @@ -22,7 +20,7 @@ class ModelComponentPolyhedronAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] model_component_polyhedron_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py index be4da6a0..b1e11c36 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import Any, List @dataclass @@ -13,9 +12,9 @@ class ModelComponentPolyhedronAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - component_ids: List[GeodeId] - id: DataId + attribute_name: Any + component_ids: List[Any] + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py index c64fc22b..55b5f23a 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py @@ -1,11 +1,9 @@ -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import List, Any @dataclass @@ -13,8 +11,8 @@ class ModelComponentVertexAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[GeodeId] - id: DataId + component_ids: List[Any] + id: Any @dataclass @@ -22,7 +20,7 @@ class ModelComponentVertexAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] model_component_vertex_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py index 6385f12e..62a47c4b 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List +from typing import Any, List @dataclass @@ -13,9 +12,9 @@ class ModelComponentVertexAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - component_ids: List[GeodeId] - id: DataId + attribute_name: Any + component_ids: List[Any] + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py index 31c818db..b2edcaf4 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class PolygonAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -21,7 +20,7 @@ class PolygonAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] polygon_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py b/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py index 0c76afe2..93627de0 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class PolygonAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - id: DataId + attribute_name: Any + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py index f8b7f8fe..3d30b4f3 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class PolyhedronAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -21,7 +20,7 @@ class PolyhedronAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] polyhedron_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py index bd91f0aa..b9732640 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class PolyhedronAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - id: DataId + attribute_name: Any + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/save_viewable_file.py b/src/opengeodeweb_back/routes/schemas/save_viewable_file.py index 2db115e7..b2e34958 100644 --- a/src/opengeodeweb_back/routes/schemas/save_viewable_file.py +++ b/src/opengeodeweb_back/routes/schemas/save_viewable_file.py @@ -1,12 +1,10 @@ -from opengeodeweb_back.schema_types import CRS, CollectionComponent, Filename, MeshComponent, ViewerId -from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -14,8 +12,8 @@ class SaveViewableFile(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename - geode_object_type: GeodeObjectType + filename: Any + geode_object_type: Any @dataclass @@ -23,17 +21,17 @@ class SaveViewableFileItem(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: GeodeId - geode_object_type: GeodeObjectType - id: DataId + geode_id: Any + geode_object_type: Any + id: Any is_viewable: bool name: str native_file: str - viewer_object_type: ViewerObjectType + viewer_object_type: Any binary_light_viewable: Optional[str] = None - collection_components: Optional[List[CollectionComponent]] = None - crs: Optional[CRS] = None - mesh_components: Optional[List[MeshComponent]] = None + collection_components: Optional[List[Any]] = None + crs: Any + mesh_components: Optional[List[Any]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None diff --git a/src/opengeodeweb_back/routes/schemas/texture_coordinates.py b/src/opengeodeweb_back/routes/schemas/texture_coordinates.py index 2d92f661..412bbf89 100644 --- a/src/opengeodeweb_back/routes/schemas/texture_coordinates.py +++ b/src/opengeodeweb_back/routes/schemas/texture_coordinates.py @@ -1,10 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class TextureCoordinates(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py b/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py index 5e18ddc0..432cdb29 100644 --- a/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py +++ b/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py @@ -1,10 +1,10 @@ -from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class TimeSeriesAllowedObjects(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename + filename: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py b/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py index d8d53f42..c30b13fc 100644 --- a/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py +++ b/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py @@ -1,10 +1,10 @@ -from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class TimeSeriesMissingFiles(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Filename + filename: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/upload_file.py b/src/opengeodeweb_back/routes/schemas/upload_file.py index 1b30bd37..01e99de3 100644 --- a/src/opengeodeweb_back/routes/schemas/upload_file.py +++ b/src/opengeodeweb_back/routes/schemas/upload_file.py @@ -1,10 +1,9 @@ -from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Optional +from typing import Any @dataclass @@ -12,7 +11,7 @@ class UploadFile(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Optional[Filename] = None + filename: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/validate.py b/src/opengeodeweb_back/routes/schemas/validate.py index 92840ee6..55376038 100644 --- a/src/opengeodeweb_back/routes/schemas/validate.py +++ b/src/opengeodeweb_back/routes/schemas/validate.py @@ -1,10 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -12,7 +12,7 @@ class Validate(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py index 01a588f8..dd0a417f 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py @@ -1,11 +1,10 @@ -from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List +from typing import List, Any from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,7 +12,7 @@ class VertexAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: DataId + id: Any @dataclass @@ -21,7 +20,7 @@ class VertexAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[AttributeInfo] + attributes: List[Any] vertex_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py b/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py index ad4ab0de..f0dc9e5d 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py @@ -1,11 +1,10 @@ -from opengeodeweb_back.schema_types import AttributeName -from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Any @dataclass @@ -13,8 +12,8 @@ class VertexAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: AttributeName - id: DataId + attribute_name: Any + id: Any @dataclass From e924d254f2276017b45a57515549d51a61087d51 Mon Sep 17 00:00:00 2001 From: Arnaud Botella Date: Fri, 20 Nov 2026 20:05:34 +0100 Subject: [PATCH 3/4] Revert "Apply prepare changes" This reverts commit 120077c53480ecdc22a55aecb1d7493ae72a65b8. --- opengeodeweb_back_schemas.json | 1939 +++++++++++++++-- opengeodeweb_back_typed_schemas.d.ts | 266 +-- .../routes/basemap/schemas/build.py | 20 +- .../routes/basemap/schemas/delete.py | 6 +- .../routes/create/schemas/edged_curve.py | 25 +- .../routes/create/schemas/horizon_stack.py | 19 +- .../routes/create/schemas/point_set.py | 25 +- .../create/schemas/polygonal_surface.py | 25 +- .../routes/crs/schemas/active.py | 8 +- .../routes/crs/schemas/align.py | 34 +- .../routes/crs/schemas/assign_geographic.py | 35 +- .../routes/crs/schemas/convert_geographic.py | 35 +- .../routes/crs/schemas/geographic_list.py | 9 +- .../routes/schemas/allowed_objects.py | 9 +- .../routes/schemas/apply_time_series.py | 7 +- .../routes/schemas/cell_attribute_names.py | 9 +- .../routes/schemas/cell_attribute_range.py | 7 +- .../routes/schemas/data_missing_files.py | 7 +- .../routes/schemas/edge_attribute_names.py | 9 +- .../routes/schemas/edge_attribute_range.py | 7 +- .../routes/schemas/export_project.py | 5 +- .../schemas/geode_object_inheritance.py | 10 +- .../geode_objects_and_output_extensions.py | 7 +- .../routes/schemas/horizon_stack_info.py | 10 +- .../model_component_edge_attribute_names.py | 10 +- .../model_component_edge_attribute_range.py | 11 +- ...model_component_polygon_attribute_names.py | 10 +- ...model_component_polygon_attribute_range.py | 11 +- ...el_component_polyhedron_attribute_names.py | 10 +- ...el_component_polyhedron_attribute_range.py | 11 +- .../model_component_vertex_attribute_names.py | 10 +- .../model_component_vertex_attribute_range.py | 11 +- .../routes/schemas/polygon_attribute_names.py | 9 +- .../routes/schemas/polygon_attribute_range.py | 7 +- .../schemas/polyhedron_attribute_names.py | 9 +- .../schemas/polyhedron_attribute_range.py | 7 +- .../routes/schemas/save_viewable_file.py | 24 +- .../routes/schemas/texture_coordinates.py | 4 +- .../schemas/time_series_allowed_objects.py | 4 +- .../schemas/time_series_missing_files.py | 4 +- .../routes/schemas/upload_file.py | 5 +- .../routes/schemas/validate.py | 4 +- .../routes/schemas/vertex_attribute_names.py | 9 +- .../routes/schemas/vertex_attribute_range.py | 7 +- 44 files changed, 2250 insertions(+), 460 deletions(-) diff --git a/opengeodeweb_back_schemas.json b/opengeodeweb_back_schemas.json index d3bad507..e3a1dc63 100644 --- a/opengeodeweb_back_schemas.json +++ b/opengeodeweb_back_schemas.json @@ -10,7 +10,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -21,7 +24,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -76,7 +82,28 @@ "additionalProperties": false }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "z": { "type": "number" @@ -106,19 +133,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -130,10 +194,34 @@ "type": "integer" }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "columns": { "type": "integer", @@ -234,7 +322,25 @@ "points": { "type": "array", "items": { - "title": "Point3D" + "title": "Point3D", + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false }, "minItems": 3 }, @@ -263,19 +369,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -289,20 +432,129 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent" + "title": "MeshComponent", + "type": "object", + "properties": { + "viewer_id": { + "title": "ViewerId", + "type": "integer" + }, + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "boundaries": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "internals": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "viewer_id", + "geode_id", + "name", + "type", + "boundaries", + "internals", + "is_active" + ], + "additionalProperties": false } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent" + "title": "CollectionComponent", + "type": "object", + "properties": { + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "geode_id", + "name", + "type", + "items", + "is_active" + ], + "additionalProperties": false } }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -332,7 +584,25 @@ "points": { "type": "array", "items": { - "title": "Point3D" + "title": "Point3D", + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false }, "minItems": 1 } @@ -349,19 +619,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -375,20 +682,129 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent" + "title": "MeshComponent", + "type": "object", + "properties": { + "viewer_id": { + "title": "ViewerId", + "type": "integer" + }, + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "boundaries": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "internals": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "viewer_id", + "geode_id", + "name", + "type", + "boundaries", + "internals", + "is_active" + ], + "additionalProperties": false } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent" + "title": "CollectionComponent", + "type": "object", + "properties": { + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "geode_id", + "name", + "type", + "items", + "is_active" + ], + "additionalProperties": false } }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -444,19 +860,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -470,20 +923,129 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent" + "title": "MeshComponent", + "type": "object", + "properties": { + "viewer_id": { + "title": "ViewerId", + "type": "integer" + }, + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "boundaries": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "internals": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "viewer_id", + "geode_id", + "name", + "type", + "boundaries", + "internals", + "is_active" + ], + "additionalProperties": false } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent" + "title": "CollectionComponent", + "type": "object", + "properties": { + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "geode_id", + "name", + "type", + "items", + "is_active" + ], + "additionalProperties": false } }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -513,7 +1075,25 @@ "points": { "type": "array", "items": { - "title": "Point3D" + "title": "Point3D", + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false }, "minItems": 2 }, @@ -543,19 +1123,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -569,20 +1186,129 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent" + "title": "MeshComponent", + "type": "object", + "properties": { + "viewer_id": { + "title": "ViewerId", + "type": "integer" + }, + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "boundaries": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "internals": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "viewer_id", + "geode_id", + "name", + "type", + "boundaries", + "internals", + "is_active" + ], + "additionalProperties": false } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent" + "title": "CollectionComponent", + "type": "object", + "properties": { + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "geode_id", + "name", + "type", + "items", + "is_active" + ], + "additionalProperties": false } }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -608,7 +1334,36 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] } }, "required": [ @@ -621,7 +1376,28 @@ "crs_list": { "type": "array", "items": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } } }, @@ -640,12 +1416,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "linked_ids": { "type": "array", "items": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "uniqueItems": true }, @@ -676,7 +1458,28 @@ "type": "string" }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "linked": { "type": "array", @@ -684,10 +1487,34 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "binary_light_viewable": { "type": "string" @@ -713,12 +1540,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "linked_ids": { "type": "array", "items": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "uniqueItems": true }, @@ -749,7 +1582,28 @@ "type": "object", "properties": { "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "implausible": { "type": "boolean" @@ -760,10 +1614,34 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "implausible": { "type": "boolean" @@ -789,12 +1667,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "linked_ids": { "type": "array", "items": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "uniqueItems": true }, @@ -873,7 +1757,28 @@ "type": "string" }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false }, "linked": { "type": "array", @@ -881,13 +1786,37 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "binary_light_viewable": { "type": "string" }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -910,7 +1839,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -924,7 +1856,28 @@ "type": "string" }, "crs_info": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -943,10 +1896,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -990,7 +1948,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1003,7 +1964,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1022,7 +2010,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1063,7 +2054,9 @@ "type": "object", "properties": { "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "additionalProperties": false, @@ -1089,7 +2082,9 @@ "type": "object", "properties": { "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1132,7 +2127,9 @@ "type": "object", "properties": { "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1164,7 +2161,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1196,10 +2196,41 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1220,19 +2251,56 @@ "type": "string" }, "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "name": { "type": "string" }, "viewer_object_type": { - "title": "ViewerObjectType" + "title": "ViewerObjectType", + "type": "string", + "enum": [ + "mesh", + "model" + ] }, "is_viewable": { "type": "boolean" }, "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "viewable_file": { "type": "string" @@ -1246,20 +2314,129 @@ "mesh_components": { "type": "array", "items": { - "title": "MeshComponent" + "title": "MeshComponent", + "type": "object", + "properties": { + "viewer_id": { + "title": "ViewerId", + "type": "integer" + }, + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "boundaries": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "internals": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "viewer_id", + "geode_id", + "name", + "type", + "boundaries", + "internals", + "is_active" + ], + "additionalProperties": false } }, "collection_components": { "type": "array", "items": { - "title": "CollectionComponent" + "title": "CollectionComponent", + "type": "object", + "properties": { + "geode_id": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 + } + }, + "is_active": { + "type": "boolean" + } + }, + "required": [ + "geode_id", + "name", + "type", + "items", + "is_active" + ], + "additionalProperties": false } }, "geode_id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "crs": { - "title": "CRS" + "title": "CRS", + "type": "object", + "properties": { + "authority": { + "type": "string", + "minLength": 1 + }, + "code": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "authority", + "code", + "name" + ], + "additionalProperties": false } }, "required": [ @@ -1290,10 +2467,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1337,7 +2519,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1350,7 +2535,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1369,10 +2581,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1416,7 +2633,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1429,7 +2649,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1471,17 +2718,25 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1526,12 +2781,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 } @@ -1547,7 +2808,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1566,17 +2854,25 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1621,12 +2917,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 } @@ -1642,7 +2944,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1661,17 +2990,25 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1716,12 +3053,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 } @@ -1737,7 +3080,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1756,17 +3126,25 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -1811,12 +3189,18 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "component_ids": { "type": "array", "items": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "minItems": 1 } @@ -1832,7 +3216,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -1897,7 +3308,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -1913,7 +3327,10 @@ "type": "object", "properties": { "id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "name": { "type": "string" @@ -1932,7 +3349,10 @@ "type": "object", "properties": { "id": { - "title": "GeodeId" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "name": { "type": "string" @@ -1962,10 +3382,41 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2001,7 +3452,36 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] } }, "required": [ @@ -2014,13 +3494,71 @@ "parents": { "type": "array", "items": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] } }, "children": { "type": "array", "items": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] } } }, @@ -2043,7 +3581,9 @@ "type": "object" }, "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2064,10 +3604,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2111,7 +3656,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -2124,7 +3672,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -2143,10 +3718,41 @@ "type": "object", "properties": { "geode_object_type": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] }, "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2190,10 +3796,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "attribute_name": { - "title": "AttributeName" + "title": "AttributeName", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2237,7 +3848,10 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "required": [ @@ -2250,7 +3864,34 @@ "attributes": { "type": "array", "items": { - "title": "AttributeInfo" + "title": "AttributeInfo", + "type": "object", + "properties": { + "attribute_name": { + "title": "AttributeName", + "type": "string", + "minLength": 1 + }, + "attribute_id": { + "type": "string" + }, + "nb_items": { + "type": "integer" + }, + "time_steps": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "attribute_name", + "attribute_id", + "nb_items", + "time_steps" + ], + "additionalProperties": false } } }, @@ -2269,10 +3910,15 @@ "type": "object", "properties": { "id": { - "title": "DataId" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2296,7 +3942,9 @@ "type": "object", "properties": { "filename": { - "title": "Filename" + "title": "Filename", + "type": "string", + "minLength": 1 } }, "required": [ @@ -2332,7 +3980,36 @@ "objects_to_load": { "type": "array", "items": { - "title": "GeodeObjectType" + "title": "GeodeObjectType", + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D", + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] } } }, diff --git a/opengeodeweb_back_typed_schemas.d.ts b/opengeodeweb_back_typed_schemas.d.ts index 1bd564d4..a3d1d297 100644 --- a/opengeodeweb_back_typed_schemas.d.ts +++ b/opengeodeweb_back_typed_schemas.d.ts @@ -1,17 +1,21 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_back_schemas.json"; +import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; +import type { AttributeInfo, AttributeName, CRS, CollectionComponent, Filename, MeshComponent, Point3D, ViewerId } from "@geode/opengeodeweb-back/schema_types"; +import type { GeodeObjectType, ViewerObjectType } from "@geode/opengeodeweb-microservice/data_types"; + export interface BasemapDeleteParams { - id: any; + id: DataId; } export interface BasemapDeleteResponse { - id: any; + id: DataId; } export interface BasemapBuildParams { bounds: Bounds; - crs: any; + crs: CRS; maps: Map[]; margin?: boolean; max_pixels?: number; @@ -32,10 +36,10 @@ export interface BasemapBuildResponse { binary_light_viewable?: string; bounds: MeshBounds; columns: number; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; maps: MapElement[]; name: string; @@ -43,7 +47,7 @@ export interface BasemapBuildResponse { nb_vertices?: number; rows: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; zoom: number; } @@ -61,45 +65,45 @@ export interface MapElement { export interface CreatePolygonalSurfaceParams { name: string; - points: any[]; + points: Point3D[]; polygons: Array; } export interface CreatePolygonalSurfaceResponse { binary_light_viewable?: string; - collection_components?: any[]; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + collection_components?: CollectionComponent[]; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; - mesh_components?: any[]; + mesh_components?: MeshComponent[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; } export interface CreatePointSetParams { name: string; - points: any[]; + points: Point3D[]; } export interface CreatePointSetResponse { binary_light_viewable?: string; - collection_components?: any[]; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + collection_components?: CollectionComponent[]; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; - mesh_components?: any[]; + mesh_components?: MeshComponent[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; } export interface CreateHorizonStackParams { @@ -110,96 +114,96 @@ export interface CreateHorizonStackParams { export interface CreateHorizonStackResponse { binary_light_viewable?: string; - collection_components?: any[]; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + collection_components?: CollectionComponent[]; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; - mesh_components?: any[]; + mesh_components?: MeshComponent[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; } export interface CreateEdgedCurveParams { edges: Array; name: string; - points: any[]; + points: Point3D[]; } export interface CreateEdgedCurveResponse { binary_light_viewable?: string; - collection_components?: any[]; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + collection_components?: CollectionComponent[]; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; - mesh_components?: any[]; + mesh_components?: MeshComponent[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; } export interface CRSGeographicListParams { - geode_object_type: any; + geode_object_type: GeodeObjectType; } export interface CRSGeographicListResponse { - crs_list: any[]; + crs_list: CRS[]; } export interface CRSConvertGeographicParams { authority: string; code: string; - id: any; - linked_ids?: any[]; + id: DataId; + linked_ids?: DataId[]; name: string; } export interface CRSConvertGeographicResponse { binary_light_viewable?: string; - crs?: any; + crs?: CRS; linked?: CRSConvertGeographicResponseLinked[]; } export interface CRSConvertGeographicResponseLinked { binary_light_viewable?: string; - crs?: any; - id: any; + crs?: CRS; + id: DataId; } export interface CRSAssignGeographicParams { authority: string; code: string; - id: any; - linked_ids?: any[]; + id: DataId; + linked_ids?: DataId[]; name: string; only_plausible?: boolean; } export interface CRSAssignGeographicResponse { - crs?: any; + crs?: CRS; implausible?: boolean; linked?: CRSAssignGeographicResponseLinked[]; } export interface CRSAssignGeographicResponseLinked { - crs?: any; - id: any; + crs?: CRS; + id: DataId; implausible?: boolean; } export interface CRSAlignParams { authority: string; code: string; - id: any; - linked_ids?: any[]; + id: DataId; + linked_ids?: DataId[]; name: string; source_points: SourcePoint[]; target_points: TargetPoint[]; @@ -218,28 +222,28 @@ export interface TargetPoint { export interface CRSAlignResponse { binary_light_viewable?: string; - crs?: any; + crs?: CRS; linked?: CRSAlignResponseLinked[]; } export interface CRSAlignResponseLinked { binary_light_viewable?: string; - crs?: any; - id: any; + crs?: CRS; + id: DataId; } export interface CRSActiveParams { - id: any; + id: DataId; } export interface CRSActiveResponse { - crs_info?: any; + crs_info?: CRS; crs_name: string; } export interface VertexAttributeRangeParams { - attribute_name: any; - id: any; + attribute_name: AttributeName; + id: DataId; } export interface VertexAttributeRangeResponse { @@ -249,15 +253,15 @@ export interface VertexAttributeRangeResponse { } export interface VertexAttributeNamesParams { - id: any; + id: DataId; } export interface VertexAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface ValidateParams { - id: any; + id: DataId; } export interface ValidateResponse { @@ -267,7 +271,7 @@ export interface ValidateResponse { } export interface UploadFileParams { - filename?: any; + filename?: Filename; } export interface UploadFileResponse { @@ -275,7 +279,7 @@ export interface UploadFileResponse { } export interface TimeSeriesMissingFilesParams { - filename: any; + filename: Filename; } export interface TimeSeriesMissingFilesResponse { @@ -285,7 +289,7 @@ export interface TimeSeriesMissingFilesResponse { } export interface TimeSeriesAllowedObjectsParams { - filename: any; + filename: Filename; } export interface TimeSeriesAllowedObjectsResponse { @@ -293,7 +297,7 @@ export interface TimeSeriesAllowedObjectsResponse { } export interface TextureCoordinatesParams { - id: any; + id: DataId; } export interface TextureCoordinatesResponse { @@ -301,8 +305,8 @@ export interface TextureCoordinatesResponse { } export interface SaveViewableFileParams { - filename: any; - geode_object_type: any; + filename: Filename; + geode_object_type: GeodeObjectType; } export interface SaveViewableFileResponse { @@ -311,23 +315,23 @@ export interface SaveViewableFileResponse { export interface SaveViewableFileItem { binary_light_viewable?: string; - collection_components?: any[]; - crs?: any; - geode_id: any; - geode_object_type: any; - id: any; + collection_components?: CollectionComponent[]; + crs?: CRS; + geode_id: GeodeId; + geode_object_type: GeodeObjectType; + id: DataId; is_viewable: boolean; - mesh_components?: any[]; + mesh_components?: MeshComponent[]; name: string; native_file: string; nb_vertices?: number; viewable_file?: string; - viewer_object_type: any; + viewer_object_type: ViewerObjectType; } export interface PolyhedronAttributeRangeParams { - attribute_name: any; - id: any; + attribute_name: AttributeName; + id: DataId; } export interface PolyhedronAttributeRangeResponse { @@ -337,16 +341,16 @@ export interface PolyhedronAttributeRangeResponse { } export interface PolyhedronAttributeNamesParams { - id: any; + id: DataId; } export interface PolyhedronAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface PolygonAttributeRangeParams { - attribute_name: any; - id: any; + attribute_name: AttributeName; + id: DataId; } export interface PolygonAttributeRangeResponse { @@ -356,11 +360,11 @@ export interface PolygonAttributeRangeResponse { } export interface PolygonAttributeNamesParams { - id: any; + id: DataId; } export interface PolygonAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface PingParams { @@ -371,9 +375,9 @@ export interface PingResponse { } export interface ModelComponentVertexAttributeRangeParams { - attribute_name: any; - component_ids: any[]; - id: any; + attribute_name: AttributeName; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentVertexAttributeRangeResponse { @@ -383,18 +387,18 @@ export interface ModelComponentVertexAttributeRangeResponse { } export interface ModelComponentVertexAttributeNamesParams { - component_ids: any[]; - id: any; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentVertexAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface ModelComponentPolyhedronAttributeRangeParams { - attribute_name: any; - component_ids: any[]; - id: any; + attribute_name: AttributeName; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentPolyhedronAttributeRangeResponse { @@ -404,18 +408,18 @@ export interface ModelComponentPolyhedronAttributeRangeResponse { } export interface ModelComponentPolyhedronAttributeNamesParams { - component_ids: any[]; - id: any; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentPolyhedronAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface ModelComponentPolygonAttributeRangeParams { - attribute_name: any; - component_ids: any[]; - id: any; + attribute_name: AttributeName; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentPolygonAttributeRangeResponse { @@ -425,18 +429,18 @@ export interface ModelComponentPolygonAttributeRangeResponse { } export interface ModelComponentPolygonAttributeNamesParams { - component_ids: any[]; - id: any; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentPolygonAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface ModelComponentEdgeAttributeRangeParams { - attribute_name: any; - component_ids: any[]; - id: any; + attribute_name: AttributeName; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentEdgeAttributeRangeResponse { @@ -446,12 +450,12 @@ export interface ModelComponentEdgeAttributeRangeResponse { } export interface ModelComponentEdgeAttributeNamesParams { - component_ids: any[]; - id: any; + component_ids: GeodeId[]; + id: DataId; } export interface ModelComponentEdgeAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface KillParams { @@ -469,7 +473,7 @@ export interface ImportProjectResponse { } export interface HorizonStackInfoParams { - id: any; + id: DataId; } export interface HorizonStackInfoResponse { @@ -478,18 +482,18 @@ export interface HorizonStackInfoResponse { } export interface Horizon { - id: any; + id: GeodeId; name: string; } export interface Unit { - id: any; + id: GeodeId; name: string; } export interface GeodeObjectsAndOutputExtensionsParams { - filename: any; - geode_object_type: any; + filename: Filename; + geode_object_type: GeodeObjectType; } export interface GeodeObjectsAndOutputExtensionsResponse { @@ -497,22 +501,22 @@ export interface GeodeObjectsAndOutputExtensionsResponse { } export interface GeodeObjectInheritanceParams { - geode_object_type: any; + geode_object_type: GeodeObjectType; } export interface GeodeObjectInheritanceResponse { - children: any[]; - parents: any[]; + children: GeodeObjectType[]; + parents: GeodeObjectType[]; } export interface ExportProjectParams { - filename: any; + filename: Filename; snapshot: { [key: string]: any }; } export interface EdgeAttributeRangeParams { - attribute_name: any; - id: any; + attribute_name: AttributeName; + id: DataId; } export interface EdgeAttributeRangeResponse { @@ -522,16 +526,16 @@ export interface EdgeAttributeRangeResponse { } export interface EdgeAttributeNamesParams { - id: any; + id: DataId; } export interface EdgeAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface DataMissingFilesParams { - filename: any; - geode_object_type: any; + filename: Filename; + geode_object_type: GeodeObjectType; } export interface DataMissingFilesResponse { @@ -541,8 +545,8 @@ export interface DataMissingFilesResponse { } export interface CellAttributeRangeParams { - attribute_name: any; - id: any; + attribute_name: AttributeName; + id: DataId; } export interface CellAttributeRangeResponse { @@ -552,28 +556,28 @@ export interface CellAttributeRangeResponse { } export interface CellAttributeNamesParams { - id: any; + id: DataId; } export interface CellAttributeNamesResponse { - attributes: any[]; + attributes: AttributeInfo[]; } export interface ApplyTimeSeriesParams { - filename: any; - id: any; + filename: Filename; + id: DataId; } export interface ApplyTimeSeriesResponse { } export interface AllowedObjectsParams { - filename: any; + filename: Filename; } export interface AllowedObjectsResponse { allowed_objects: { [key: string]: AllowedObject }; - objects_to_load: any[]; + objects_to_load: GeodeObjectType[]; } export interface AllowedObject { diff --git a/src/opengeodeweb_back/routes/basemap/schemas/build.py b/src/opengeodeweb_back/routes/basemap/schemas/build.py index 4afa8f54..b798c0cd 100644 --- a/src/opengeodeweb_back/routes/basemap/schemas/build.py +++ b/src/opengeodeweb_back/routes/basemap/schemas/build.py @@ -1,11 +1,13 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType +from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass from enum import Enum -from typing import Any, List, Optional +from typing import List, Optional @dataclass @@ -31,7 +33,7 @@ def __post_init__(self) -> None: print_dataclass(self) bounds: Bounds - crs: Any + crs: CRS maps: List[Map] z: float margin: Optional[bool] = None @@ -66,18 +68,18 @@ def __post_init__(self) -> None: attribution: str bounds: MeshBounds columns: int - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool maps: List[MapElement] name: str native_file: str rows: int - viewer_object_type: Any + viewer_object_type: ViewerObjectType zoom: int binary_light_viewable: Optional[str] = None - crs: Any + crs: Optional[CRS] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -88,4 +90,4 @@ def __post_init__(self) -> None: response=BuildResponse, ) -__all__ = ["Bounds", "Build", "BuildResponse", "build_route"] +__all__ = ["Bounds", "CRS", "Build", "BuildResponse", "build_route"] diff --git a/src/opengeodeweb_back/routes/basemap/schemas/delete.py b/src/opengeodeweb_back/routes/basemap/schemas/delete.py index be729d6a..4b3d7e7e 100644 --- a/src/opengeodeweb_back/routes/basemap/schemas/delete.py +++ b/src/opengeodeweb_back/routes/basemap/schemas/delete.py @@ -1,9 +1,9 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -11,7 +11,7 @@ class Delete(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -19,7 +19,7 @@ class DeleteResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId delete_route = Route( diff --git a/src/opengeodeweb_back/routes/create/schemas/edged_curve.py b/src/opengeodeweb_back/routes/create/schemas/edged_curve.py index 1ab2b516..fb16e388 100644 --- a/src/opengeodeweb_back/routes/create/schemas/edged_curve.py +++ b/src/opengeodeweb_back/routes/create/schemas/edged_curve.py @@ -1,10 +1,13 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -14,7 +17,7 @@ def __post_init__(self) -> None: edges: List[List[int]] name: str - points: List[Any] + points: List[Point3D] @dataclass @@ -22,17 +25,17 @@ class EdgedCurveResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool name: str native_file: str - viewer_object_type: Any + viewer_object_type: ViewerObjectType binary_light_viewable: Optional[str] = None - collection_components: Optional[List[Any]] = None - crs: Any - mesh_components: Optional[List[Any]] = None + collection_components: Optional[List[CollectionComponent]] = None + crs: Optional[CRS] = None + mesh_components: Optional[List[MeshComponent]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -43,4 +46,4 @@ def __post_init__(self) -> None: response=EdgedCurveResponse, ) -__all__ = ["EdgedCurve", "EdgedCurveResponse", "edged_curve_route"] +__all__ = ["Point3D", "EdgedCurve", "EdgedCurveResponse", "edged_curve_route"] diff --git a/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py b/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py index 3eb39f58..d446c63c 100644 --- a/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py +++ b/src/opengeodeweb_back/routes/create/schemas/horizon_stack.py @@ -1,6 +1,9 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, ViewerId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass @@ -22,17 +25,17 @@ class HorizonStackResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool name: str native_file: str - viewer_object_type: Any + viewer_object_type: ViewerObjectType binary_light_viewable: Optional[str] = None - collection_components: Optional[List[Any]] = None - crs: Any - mesh_components: Optional[List[Any]] = None + collection_components: Optional[List[CollectionComponent]] = None + crs: Optional[CRS] = None + mesh_components: Optional[List[MeshComponent]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None diff --git a/src/opengeodeweb_back/routes/create/schemas/point_set.py b/src/opengeodeweb_back/routes/create/schemas/point_set.py index 6566b62a..e0af2779 100644 --- a/src/opengeodeweb_back/routes/create/schemas/point_set.py +++ b/src/opengeodeweb_back/routes/create/schemas/point_set.py @@ -1,10 +1,13 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -13,7 +16,7 @@ def __post_init__(self) -> None: print_dataclass(self) name: str - points: List[Any] + points: List[Point3D] @dataclass @@ -21,17 +24,17 @@ class PointSetResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool name: str native_file: str - viewer_object_type: Any + viewer_object_type: ViewerObjectType binary_light_viewable: Optional[str] = None - collection_components: Optional[List[Any]] = None - crs: Any - mesh_components: Optional[List[Any]] = None + collection_components: Optional[List[CollectionComponent]] = None + crs: Optional[CRS] = None + mesh_components: Optional[List[MeshComponent]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -42,4 +45,4 @@ def __post_init__(self) -> None: response=PointSetResponse, ) -__all__ = ["PointSet", "PointSetResponse", "point_set_route"] +__all__ = ["Point3D", "PointSet", "PointSetResponse", "point_set_route"] diff --git a/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py b/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py index c17395f2..bcb9c117 100644 --- a/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py +++ b/src/opengeodeweb_back/routes/create/schemas/polygonal_surface.py @@ -1,10 +1,13 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import CRS, CollectionComponent, MeshComponent, Point3D, ViewerId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -13,7 +16,7 @@ def __post_init__(self) -> None: print_dataclass(self) name: str - points: List[Any] + points: List[Point3D] polygons: List[List[int]] @@ -22,17 +25,17 @@ class PolygonalSurfaceResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool name: str native_file: str - viewer_object_type: Any + viewer_object_type: ViewerObjectType binary_light_viewable: Optional[str] = None - collection_components: Optional[List[Any]] = None - crs: Any - mesh_components: Optional[List[Any]] = None + collection_components: Optional[List[CollectionComponent]] = None + crs: Optional[CRS] = None + mesh_components: Optional[List[MeshComponent]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None @@ -43,4 +46,4 @@ def __post_init__(self) -> None: response=PolygonalSurfaceResponse, ) -__all__ = ["PolygonalSurface", "PolygonalSurfaceResponse", "polygonal_surface_route"] +__all__ = ["Point3D", "PolygonalSurface", "PolygonalSurfaceResponse", "polygonal_surface_route"] diff --git a/src/opengeodeweb_back/routes/crs/schemas/active.py b/src/opengeodeweb_back/routes/crs/schemas/active.py index ed50aaed..75269a65 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/active.py +++ b/src/opengeodeweb_back/routes/crs/schemas/active.py @@ -1,9 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema +from typing import Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -11,7 +13,7 @@ class Active(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +22,7 @@ def __post_init__(self) -> None: print_dataclass(self) crs_name: str - crs_info: Any + crs_info: Optional[CRS] = None active_route = Route( diff --git a/src/opengeodeweb_back/routes/crs/schemas/align.py b/src/opengeodeweb_back/routes/crs/schemas/align.py index a6fa2fa8..3dc1ad00 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/align.py +++ b/src/opengeodeweb_back/routes/crs/schemas/align.py @@ -1,10 +1,10 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Optional, Any, List +from typing import Optional, List @dataclass @@ -33,11 +33,31 @@ def __post_init__(self) -> None: authority: str code: str - id: Any + id: DataId name: str source_points: List[SourcePoint] target_points: List[TargetPoint] - linked_ids: Optional[List[Any]] = None + linked_ids: Optional[List[DataId]] = None + + +@dataclass +class AlignResponseCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str + name: str + + +@dataclass +class LinkedCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str + name: str @dataclass @@ -45,9 +65,9 @@ class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId binary_light_viewable: Optional[str] = None - crs: Any + crs: Optional[LinkedCRS] = None @dataclass @@ -56,7 +76,7 @@ def __post_init__(self) -> None: print_dataclass(self) binary_light_viewable: Optional[str] = None - crs: Any + crs: Optional[AlignResponseCRS] = None linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py b/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py index 3008ddca..96a9cbbd 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py +++ b/src/opengeodeweb_back/routes/crs/schemas/assign_geographic.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List, Optional +from typing import List, Optional @dataclass @@ -14,19 +15,39 @@ def __post_init__(self) -> None: authority: str code: str - id: Any + id: DataId name: str - linked_ids: Optional[List[Any]] = None + linked_ids: Optional[List[DataId]] = None only_plausible: Optional[bool] = None +@dataclass +class AssignGeographicResponseCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str + name: str + + +@dataclass +class LinkedCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str + name: str + + @dataclass class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any - crs: Any + id: DataId + crs: Optional[LinkedCRS] = None implausible: Optional[bool] = None @@ -35,7 +56,7 @@ class AssignGeographicResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - crs: Any + crs: Optional[AssignGeographicResponseCRS] = None implausible: Optional[bool] = None linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py b/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py index d83cf42a..465c3446 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py +++ b/src/opengeodeweb_back/routes/crs/schemas/convert_geographic.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import Optional, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List, Optional +from typing import List, Optional @dataclass @@ -14,9 +15,29 @@ def __post_init__(self) -> None: authority: str code: str - id: Any + id: DataId + name: str + linked_ids: Optional[List[DataId]] = None + + +@dataclass +class ConvertGeographicResponseCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str + name: str + + +@dataclass +class LinkedCRS(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + authority: str + code: str name: str - linked_ids: Optional[List[Any]] = None @dataclass @@ -24,9 +45,9 @@ class Linked(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId binary_light_viewable: Optional[str] = None - crs: Any + crs: Optional[LinkedCRS] = None @dataclass @@ -35,7 +56,7 @@ def __post_init__(self) -> None: print_dataclass(self) binary_light_viewable: Optional[str] = None - crs: Any + crs: Optional[ConvertGeographicResponseCRS] = None linked: Optional[List[Linked]] = None diff --git a/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py b/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py index 8bb08fbd..e3af1b35 100644 --- a/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py +++ b/src/opengeodeweb_back/routes/crs/schemas/geographic_list.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.database.data_types import GeodeObjectType +from opengeodeweb_back.schema_types import CRS from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class GeographicList(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_object_type: Any + geode_object_type: GeodeObjectType @dataclass @@ -20,7 +21,7 @@ class GeographicListResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - crs_list: List[Any] + crs_list: List[CRS] geographic_list_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/allowed_objects.py b/src/opengeodeweb_back/routes/schemas/allowed_objects.py index ecc2b7fa..cde049f0 100644 --- a/src/opengeodeweb_back/routes/schemas/allowed_objects.py +++ b/src/opengeodeweb_back/routes/schemas/allowed_objects.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import Filename +from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Dict, List, Any +from typing import Dict, List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class AllowedObjects(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any + filename: Filename @dataclass @@ -31,7 +32,7 @@ def __post_init__(self) -> None: print_dataclass(self) allowed_objects: Dict[str, AllowedObject] - objects_to_load: List[Any] + objects_to_load: List[GeodeObjectType] allowed_objects_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/apply_time_series.py b/src/opengeodeweb_back/routes/schemas/apply_time_series.py index f2bda381..5657177b 100644 --- a/src/opengeodeweb_back/routes/schemas/apply_time_series.py +++ b/src/opengeodeweb_back/routes/schemas/apply_time_series.py @@ -1,9 +1,10 @@ +from opengeodeweb_back.schema_types import Filename +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -11,8 +12,8 @@ class ApplyTimeSeries(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any - id: Any + filename: Filename + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py index d3e1a414..eb8de15e 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_names.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class CellAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +21,7 @@ class CellAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] cell_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py b/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py index f74cde9c..bbcc0e6a 100644 --- a/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/cell_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class CellAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - id: Any + attribute_name: AttributeName + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/data_missing_files.py b/src/opengeodeweb_back/routes/schemas/data_missing_files.py index 881900bb..e8f81973 100644 --- a/src/opengeodeweb_back/routes/schemas/data_missing_files.py +++ b/src/opengeodeweb_back/routes/schemas/data_missing_files.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import Filename +from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class DataMissingFiles(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any - geode_object_type: Any + filename: Filename + geode_object_type: GeodeObjectType @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py index 56110658..05be560c 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_names.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class EdgeAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +21,7 @@ class EdgeAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] edge_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py b/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py index 353fdb5e..84bab5f0 100644 --- a/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/edge_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class EdgeAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - id: Any + attribute_name: AttributeName + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/export_project.py b/src/opengeodeweb_back/routes/schemas/export_project.py index ade611ad..adc4fbf7 100644 --- a/src/opengeodeweb_back/routes/schemas/export_project.py +++ b/src/opengeodeweb_back/routes/schemas/export_project.py @@ -1,9 +1,10 @@ +from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import BinaryResponse, Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, Dict +from typing import Dict, Any @dataclass @@ -11,7 +12,7 @@ class ExportProject(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any + filename: Filename snapshot: Dict[str, Any] diff --git a/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py b/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py index 9eba0954..da05441f 100644 --- a/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py +++ b/src/opengeodeweb_back/routes/schemas/geode_object_inheritance.py @@ -1,10 +1,10 @@ +from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class GeodeObjectInheritance(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_object_type: Any + geode_object_type: GeodeObjectType @dataclass @@ -20,8 +20,8 @@ class GeodeObjectInheritanceResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - children: List[Any] - parents: List[Any] + children: List[GeodeObjectType] + parents: List[GeodeObjectType] geode_object_inheritance_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py b/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py index 95216af9..ea3cf144 100644 --- a/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py +++ b/src/opengeodeweb_back/routes/schemas/geode_objects_and_output_extensions.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import Filename +from opengeodeweb_microservice.database.data_types import GeodeObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Dict from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class GeodeObjectsAndOutputExtensions(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any - geode_object_type: Any + filename: Filename + geode_object_type: GeodeObjectType @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py b/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py index c877c7fe..a89f4bd2 100644 --- a/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py +++ b/src/opengeodeweb_back/routes/schemas/horizon_stack_info.py @@ -1,10 +1,10 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, List +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class HorizonStackInfo(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +20,7 @@ class Horizon(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: GeodeId name: str @@ -29,7 +29,7 @@ class Unit(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: GeodeId name: str diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py index 5e42591a..040fba15 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_names.py @@ -1,9 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -11,8 +13,8 @@ class ModelComponentEdgeAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[Any] - id: Any + component_ids: List[GeodeId] + id: DataId @dataclass @@ -20,7 +22,7 @@ class ModelComponentEdgeAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] model_component_edge_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py index a49ef4c9..1236947f 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_edge_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List +from typing import List @dataclass @@ -12,9 +13,9 @@ class ModelComponentEdgeAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - component_ids: List[Any] - id: Any + attribute_name: AttributeName + component_ids: List[GeodeId] + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py index e72c3b88..6fac784b 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_names.py @@ -1,9 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -11,8 +13,8 @@ class ModelComponentPolygonAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[Any] - id: Any + component_ids: List[GeodeId] + id: DataId @dataclass @@ -20,7 +22,7 @@ class ModelComponentPolygonAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] model_component_polygon_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py index fbe6a9cb..584f8ab4 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polygon_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List +from typing import List @dataclass @@ -12,9 +13,9 @@ class ModelComponentPolygonAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - component_ids: List[Any] - id: Any + attribute_name: AttributeName + component_ids: List[GeodeId] + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py index b58034b0..cc3e0574 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_names.py @@ -1,9 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -11,8 +13,8 @@ class ModelComponentPolyhedronAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[Any] - id: Any + component_ids: List[GeodeId] + id: DataId @dataclass @@ -20,7 +22,7 @@ class ModelComponentPolyhedronAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] model_component_polyhedron_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py index b1e11c36..be4da6a0 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_polyhedron_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List +from typing import List @dataclass @@ -12,9 +13,9 @@ class ModelComponentPolyhedronAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - component_ids: List[Any] - id: Any + attribute_name: AttributeName + component_ids: List[GeodeId] + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py index 55b5f23a..c64fc22b 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_names.py @@ -1,9 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import List, Any +from typing import List @dataclass @@ -11,8 +13,8 @@ class ModelComponentVertexAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - component_ids: List[Any] - id: Any + component_ids: List[GeodeId] + id: DataId @dataclass @@ -20,7 +22,7 @@ class ModelComponentVertexAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] model_component_vertex_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py index 62a47c4b..6385f12e 100644 --- a/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/model_component_vertex_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any, List +from typing import List @dataclass @@ -12,9 +13,9 @@ class ModelComponentVertexAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - component_ids: List[Any] - id: Any + attribute_name: AttributeName + component_ids: List[GeodeId] + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py index b2edcaf4..31c818db 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_names.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class PolygonAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +21,7 @@ class PolygonAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] polygon_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py b/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py index 93627de0..0c76afe2 100644 --- a/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/polygon_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class PolygonAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - id: Any + attribute_name: AttributeName + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py index 3d30b4f3..f8b7f8fe 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_names.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class PolyhedronAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +21,7 @@ class PolyhedronAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] polyhedron_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py index b9732640..bd91f0aa 100644 --- a/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/polyhedron_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class PolyhedronAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - id: Any + attribute_name: AttributeName + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/save_viewable_file.py b/src/opengeodeweb_back/routes/schemas/save_viewable_file.py index b2e34958..2db115e7 100644 --- a/src/opengeodeweb_back/routes/schemas/save_viewable_file.py +++ b/src/opengeodeweb_back/routes/schemas/save_viewable_file.py @@ -1,10 +1,12 @@ +from opengeodeweb_back.schema_types import CRS, CollectionComponent, Filename, MeshComponent, ViewerId +from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_microservice.database.data_types import GeodeObjectType, ViewerObjectType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Any, Optional, List +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +14,8 @@ class SaveViewableFile(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any - geode_object_type: Any + filename: Filename + geode_object_type: GeodeObjectType @dataclass @@ -21,17 +23,17 @@ class SaveViewableFileItem(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - geode_id: Any - geode_object_type: Any - id: Any + geode_id: GeodeId + geode_object_type: GeodeObjectType + id: DataId is_viewable: bool name: str native_file: str - viewer_object_type: Any + viewer_object_type: ViewerObjectType binary_light_viewable: Optional[str] = None - collection_components: Optional[List[Any]] = None - crs: Any - mesh_components: Optional[List[Any]] = None + collection_components: Optional[List[CollectionComponent]] = None + crs: Optional[CRS] = None + mesh_components: Optional[List[MeshComponent]] = None nb_vertices: Optional[int] = None viewable_file: Optional[str] = None diff --git a/src/opengeodeweb_back/routes/schemas/texture_coordinates.py b/src/opengeodeweb_back/routes/schemas/texture_coordinates.py index 412bbf89..2d92f661 100644 --- a/src/opengeodeweb_back/routes/schemas/texture_coordinates.py +++ b/src/opengeodeweb_back/routes/schemas/texture_coordinates.py @@ -1,10 +1,10 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class TextureCoordinates(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py b/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py index 432cdb29..5e18ddc0 100644 --- a/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py +++ b/src/opengeodeweb_back/routes/schemas/time_series_allowed_objects.py @@ -1,10 +1,10 @@ +from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class TimeSeriesAllowedObjects(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any + filename: Filename @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py b/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py index c30b13fc..d8d53f42 100644 --- a/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py +++ b/src/opengeodeweb_back/routes/schemas/time_series_missing_files.py @@ -1,10 +1,10 @@ +from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class TimeSeriesMissingFiles(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any + filename: Filename @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/upload_file.py b/src/opengeodeweb_back/routes/schemas/upload_file.py index 01e99de3..1b30bd37 100644 --- a/src/opengeodeweb_back/routes/schemas/upload_file.py +++ b/src/opengeodeweb_back/routes/schemas/upload_file.py @@ -1,9 +1,10 @@ +from opengeodeweb_back.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any +from typing import Optional @dataclass @@ -11,7 +12,7 @@ class UploadFile(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: Any + filename: Optional[Filename] = None @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/validate.py b/src/opengeodeweb_back/routes/schemas/validate.py index 55376038..92840ee6 100644 --- a/src/opengeodeweb_back/routes/schemas/validate.py +++ b/src/opengeodeweb_back/routes/schemas/validate.py @@ -1,10 +1,10 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +12,7 @@ class Validate(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py index dd0a417f..01a588f8 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_names.py @@ -1,10 +1,11 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_back.schema_types import AttributeInfo, AttributeName from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Any +from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,7 +13,7 @@ class VertexAttributeNames(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: Any + id: DataId @dataclass @@ -20,7 +21,7 @@ class VertexAttributeNamesResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attributes: List[Any] + attributes: List[AttributeInfo] vertex_attribute_names_route = Route( diff --git a/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py b/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py index f0dc9e5d..ad4ab0de 100644 --- a/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py +++ b/src/opengeodeweb_back/routes/schemas/vertex_attribute_range.py @@ -1,10 +1,11 @@ +from opengeodeweb_back.schema_types import AttributeName +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Any @dataclass @@ -12,8 +13,8 @@ class VertexAttributeRange(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - attribute_name: Any - id: Any + attribute_name: AttributeName + id: DataId @dataclass From 71b3f9e960c14ce4007a7fe064f361c8089ca197 Mon Sep 17 00:00:00 2001 From: BotellaA <3213882+BotellaA@users.noreply.github.com> Date: Fri, 20 Nov 2026 19:06:15 +0000 Subject: [PATCH 4/4] Apply prepare changes --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 923abd14..597e5178 100644 --- a/requirements.txt +++ b/requirements.txt @@ -84,4 +84,3 @@ werkzeug==3.1.8 # flask # flask-cors -opengeodeweb-microservice==1.*,>=1.4.0rc1