From 37a4892be216e0a987a191feffb9ae107d19aac5 Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 15:15:27 +0100 Subject: [PATCH 01/14] fix(schemas): define the color, style and attribute item types ColorRGB is now {red, green, blue} and ColorRGBA extends it with alpha. They are imported from @geode/opengeodeweb-viewer/schema_types or opengeodeweb_viewer.schema_types. Co-Authored-By: Claude Opus 5.5 --- package.json | 8 ++- src/opengeodeweb_viewer/schema_types.d.ts | 11 ++++ src/opengeodeweb_viewer/schema_types.json | 68 +++++++++++++++++++++++ src/opengeodeweb_viewer/schema_types.py | 27 +++++++++ 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 src/opengeodeweb_viewer/schema_types.d.ts create mode 100644 src/opengeodeweb_viewer/schema_types.json create mode 100644 src/opengeodeweb_viewer/schema_types.py diff --git a/package.json b/package.json index 55701feb..391aaf72 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,10 @@ "files": [ "opengeodeweb_viewer_schemas.json", "opengeodeweb_viewer_typed_schemas.js", - "opengeodeweb_viewer_typed_schemas.d.ts" + "opengeodeweb_viewer_typed_schemas.d.ts", + "src/opengeodeweb_viewer/schema_types.json", + "src/opengeodeweb_viewer/schema_types.d.ts", + "src/opengeodeweb_viewer/schema_types.py" ], "exports": { "./opengeodeweb_viewer_schemas.json": { @@ -29,6 +32,9 @@ "./opengeodeweb_viewer_typed_schemas.js": { "types": "./opengeodeweb_viewer_typed_schemas.d.ts", "default": "./opengeodeweb_viewer_typed_schemas.js" + }, + "./schema_types": { + "types": "./src/opengeodeweb_viewer/schema_types.d.ts" } }, "publishConfig": { diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts new file mode 100644 index 00000000..78de3ad2 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -0,0 +1,11 @@ +// Generated by generate_schema_types.js from schema_types.json: do not edit + +export interface ColorRGB { + blue: number; + green: number; + red: number; +} + +export interface ColorRGBA extends ColorRGB { + alpha: number; +} diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json new file mode 100644 index 00000000..c418ea3d --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.json @@ -0,0 +1,68 @@ +{ + "BlockIds": { + "type": "array", + "items": { + "title": "ViewerId" + }, + "minItems": 1 + }, + "Visibility": { + "type": "boolean" + }, + "Opacity": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "PointSize": { + "type": "number" + }, + "EdgeWidth": { + "type": "number" + }, + "ColorRGB": { + "type": "object", + "properties": { + "red": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "green": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "blue": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + }, + "required": ["red", "green", "blue"], + "additionalProperties": false + }, + "ColorRGBA": { + "extends": "ColorRGB", + "properties": { + "alpha": { + "type": "number", + "minimum": 0, + "maximum": 1 + } + }, + "required": ["alpha"] + }, + "ColorMapPoints": { + "description": "Flat array of [value, r, g, b, ...]", + "type": "array", + "items": { + "type": "number" + }, + "minItems": 8 + }, + "AttributeItem": { + "type": "integer", + "minimum": 0 + } +} diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py new file mode 100644 index 00000000..3e87c504 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.py @@ -0,0 +1,27 @@ +"""Generated by generate_schema_types.js from schema_types.json: do not edit""" + +from dataclasses import dataclass + +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass + + +@dataclass +class ColorRGB(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + blue: int + green: int + red: int + + +@dataclass +class ColorRGBA(ColorRGB): + alpha: float + + +__all__ = [ + "ColorRGB", + "ColorRGBA", +] From 81b345bca86c41a3ac5be14eb48f86c6028f8a1c Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 15:15:27 +0100 Subject: [PATCH 02/14] fix(schemas): rpc schemas only name the shared types they use The colors of set_background_color and set_text_style are now red/green/blue, like every other color. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 508 +++++++++++++++--- opengeodeweb_viewer_typed_schemas.d.ts | 402 ++------------ pyproject.toml | 1 + .../rpc/generic/schemas/deregister.json | 4 +- .../rpc/generic/schemas/register.json | 4 +- .../attribute/cell/schemas/attribute.json | 48 +- .../cells/attribute/cell/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 48 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/mesh/cells/schemas/color.json | 35 +- .../rpc/mesh/cells/schemas/color.py | 16 +- .../rpc/mesh/cells/schemas/opacity.json | 8 +- .../rpc/mesh/cells/schemas/visibility.json | 6 +- .../attribute/edge/schemas/attribute.json | 48 +- .../edges/attribute/edge/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 48 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/mesh/edges/schemas/color.json | 35 +- .../rpc/mesh/edges/schemas/color.py | 16 +- .../rpc/mesh/edges/schemas/opacity.json | 8 +- .../rpc/mesh/edges/schemas/visibility.json | 6 +- .../rpc/mesh/edges/schemas/width.json | 6 +- .../attribute/vertex/schemas/attribute.json | 48 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/mesh/points/schemas/color.json | 35 +- .../rpc/mesh/points/schemas/color.py | 16 +- .../rpc/mesh/points/schemas/opacity.json | 8 +- .../rpc/mesh/points/schemas/size.json | 6 +- .../rpc/mesh/points/schemas/visibility.json | 10 +- .../attribute/polygon/schemas/attribute.json | 48 +- .../attribute/polygon/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 48 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/mesh/polygons/schemas/color.json | 35 +- .../rpc/mesh/polygons/schemas/color.py | 16 +- .../rpc/mesh/polygons/schemas/opacity.json | 8 +- .../rpc/mesh/polygons/schemas/visibility.json | 6 +- .../polyhedron/schemas/attribute.json | 48 +- .../attribute/polyhedron/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 48 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/mesh/polyhedra/schemas/color.json | 35 +- .../rpc/mesh/polyhedra/schemas/color.py | 16 +- .../rpc/mesh/polyhedra/schemas/opacity.json | 8 +- .../mesh/polyhedra/schemas/visibility.json | 6 +- .../rpc/mesh/schemas/apply_basemap.json | 8 +- .../rpc/mesh/schemas/apply_textures.json | 8 +- .../rpc/mesh/schemas/basemap_drape.json | 4 +- .../rpc/mesh/schemas/basemap_layers.json | 40 +- .../rpc/mesh/schemas/color.json | 35 +- .../rpc/mesh/schemas/color.py | 16 +- .../rpc/mesh/schemas/deregister.json | 4 +- .../rpc/mesh/schemas/highlight.json | 6 +- .../rpc/mesh/schemas/register.json | 4 +- .../rpc/mesh/schemas/visibility.json | 6 +- .../polyhedron/schemas/attribute.json | 54 +- .../attribute/polyhedron/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/model/blocks/edges/schemas/color.json | 41 +- .../rpc/model/blocks/edges/schemas/color.py | 16 +- .../blocks/edges/schemas/visibility.json | 12 +- .../rpc/model/blocks/edges/schemas/width.json | 12 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../model/blocks/points/schemas/color.json | 41 +- .../rpc/model/blocks/points/schemas/color.py | 16 +- .../rpc/model/blocks/points/schemas/size.json | 12 +- .../blocks/points/schemas/visibility.json | 12 +- .../rpc/model/blocks/schemas/color.json | 73 +-- .../rpc/model/blocks/schemas/color.py | 27 +- .../rpc/model/blocks/schemas/visibility.json | 12 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/model/corners/schemas/color.json | 73 +-- .../rpc/model/corners/schemas/color.py | 27 +- .../rpc/model/corners/schemas/visibility.json | 12 +- .../rpc/model/edges/schemas/visibility.json | 6 +- .../rpc/model/edges/schemas/width.json | 6 +- .../attribute/edge/schemas/attribute.json | 54 +- .../lines/attribute/edge/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../rpc/model/lines/points/schemas/color.json | 41 +- .../rpc/model/lines/points/schemas/color.py | 16 +- .../rpc/model/lines/points/schemas/size.json | 12 +- .../lines/points/schemas/visibility.json | 12 +- .../rpc/model/lines/schemas/color.json | 73 +-- .../rpc/model/lines/schemas/color.py | 27 +- .../rpc/model/lines/schemas/visibility.json | 12 +- .../rpc/model/points/schemas/size.json | 6 +- .../rpc/model/points/schemas/visibility.json | 6 +- .../rpc/model/schemas/deregister.json | 4 +- .../rpc/model/schemas/get_blocks_bounds.json | 9 +- .../rpc/model/schemas/highlight.json | 11 +- .../rpc/model/schemas/register.json | 4 +- .../rpc/model/schemas/visibility.json | 6 +- .../attribute/polygon/schemas/attribute.json | 54 +- .../attribute/polygon/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../model/surfaces/edges/schemas/color.json | 41 +- .../rpc/model/surfaces/edges/schemas/color.py | 16 +- .../surfaces/edges/schemas/visibility.json | 12 +- .../model/surfaces/edges/schemas/width.json | 12 +- .../attribute/vertex/schemas/attribute.json | 54 +- .../attribute/vertex/schemas/attribute.py | 16 +- .../model/surfaces/points/schemas/color.json | 41 +- .../model/surfaces/points/schemas/color.py | 16 +- .../model/surfaces/points/schemas/size.json | 12 +- .../surfaces/points/schemas/visibility.json | 12 +- .../surfaces/schemas/apply_textures.json | 4 +- .../rpc/model/surfaces/schemas/color.json | 73 +-- .../rpc/model/surfaces/schemas/color.py | 27 +- .../model/surfaces/schemas/visibility.json | 12 +- .../rpc/viewer/schemas/axes.json | 2 +- .../rpc/viewer/schemas/clipping_planes.json | 36 +- .../rpc/viewer/schemas/clipping_planes.py | 16 +- .../rpc/viewer/schemas/explode.json | 4 +- .../rpc/viewer/schemas/grid_scale.json | 2 +- .../rpc/viewer/schemas/highlight.json | 8 +- .../rpc/viewer/schemas/pick_colormap.json | 5 +- .../rpc/viewer/schemas/picked_ids.json | 15 +- .../rpc/viewer/schemas/preview_points.json | 19 +- .../rpc/viewer/schemas/preview_points.py | 15 +- .../viewer/schemas/set_background_color.json | 25 +- .../viewer/schemas/set_background_color.py | 15 +- .../rpc/viewer/schemas/set_text_style.json | 30 +- .../rpc/viewer/schemas/set_text_style.py | 15 +- .../rpc/viewer/schemas/shrink.json | 4 +- .../rpc/viewer/schemas/slice.json | 4 +- .../rpc/viewer/schemas/take_screenshot.json | 3 +- .../rpc/viewer/schemas/threshold.json | 7 +- .../rpc/viewer/schemas/update_data.json | 4 +- .../schema_definitions.json | 256 +++++++++ 141 files changed, 1198 insertions(+), 3009 deletions(-) create mode 100644 src/opengeodeweb_viewer/schema_definitions.json diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index d0cf0494..d72db4e2 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -7,6 +7,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -33,6 +34,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -60,21 +62,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -87,6 +93,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -143,21 +150,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -170,6 +181,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -226,11 +238,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -252,11 +266,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -280,11 +296,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -339,21 +357,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -366,6 +388,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -422,21 +445,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -449,6 +476,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -505,11 +533,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -531,11 +561,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -557,11 +589,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -585,11 +619,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -644,21 +680,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -671,6 +711,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -727,11 +768,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -744,9 +787,13 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -763,11 +810,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -789,11 +838,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -817,11 +868,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -876,21 +929,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -903,6 +960,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -959,21 +1017,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -986,6 +1048,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1042,11 +1105,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1068,11 +1133,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1096,11 +1163,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1155,21 +1224,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -1182,6 +1255,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1238,21 +1312,25 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -1265,6 +1343,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1321,11 +1400,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1347,11 +1428,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1375,11 +1458,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1431,11 +1516,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1457,6 +1544,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1483,11 +1571,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1509,6 +1599,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1531,11 +1622,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1586,6 +1679,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1603,6 +1697,7 @@ "type": "boolean" }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1639,6 +1734,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1668,6 +1764,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1682,6 +1779,7 @@ "minLength": 1 }, "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1714,6 +1812,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1770,6 +1869,7 @@ "type": "boolean" }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1814,28 +1914,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -1848,6 +1954,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1905,28 +2012,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -1939,6 +2052,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1999,28 +2113,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -2033,6 +2153,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2090,18 +2211,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -2124,18 +2249,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2158,18 +2287,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2225,28 +2358,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -2259,6 +2398,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2316,18 +2456,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2350,18 +2494,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -2384,18 +2532,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2448,18 +2600,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2482,13 +2638,16 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 @@ -2501,11 +2660,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2554,26 +2715,38 @@ "title": "ColorResult", "properties": { "viewer_id": { + "title": "ViewerId", "type": "integer" }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "color": { - "type": "object", "title": "ColorRGBA", + "type": "object", "properties": { "red": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "green": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "blue": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "alpha": { - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 1 } }, "required": [ @@ -2610,28 +2783,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -2644,6 +2823,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2701,18 +2881,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2735,13 +2919,16 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 @@ -2754,11 +2941,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2807,26 +2996,38 @@ "title": "ColorResult", "properties": { "viewer_id": { + "title": "ViewerId", "type": "integer" }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "color": { - "type": "object", "title": "ColorRGBA", + "type": "object", "properties": { "red": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "green": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "blue": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "alpha": { - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 1 } }, "required": [ @@ -2861,11 +3062,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -2887,11 +3090,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2917,28 +3122,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -2951,6 +3162,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3008,28 +3220,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -3042,6 +3260,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3102,28 +3321,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -3136,6 +3361,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3193,18 +3419,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3227,18 +3457,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -3261,18 +3495,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3325,18 +3563,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3359,13 +3601,16 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 @@ -3378,11 +3623,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3431,26 +3678,38 @@ "title": "ColorResult", "properties": { "viewer_id": { + "title": "ViewerId", "type": "integer" }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "color": { - "type": "object", "title": "ColorRGBA", + "type": "object", "properties": { "red": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "green": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "blue": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "alpha": { - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 1 } }, "required": [ @@ -3485,11 +3744,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3511,11 +3772,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -3538,11 +3801,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3564,6 +3829,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3590,17 +3856,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" - } + }, + "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3623,15 +3894,19 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" - } + }, + "minItems": 1 } }, "required": [ @@ -3663,6 +3938,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3688,28 +3964,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -3722,6 +4004,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3779,28 +4062,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -3813,6 +4102,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3873,28 +4163,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -3907,6 +4203,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3964,18 +4261,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -3998,18 +4299,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -4032,18 +4337,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4099,28 +4408,34 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "name": { + "title": "AttributeName", "type": "string", "minLength": 1 }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "points": { - "type": "array", + "title": "ColorMapPoints", "description": "Flat array of [value, r, g, b, ...]", + "type": "array", "items": { "type": "number" }, @@ -4133,6 +4448,7 @@ "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4190,18 +4506,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -4224,18 +4544,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -4258,18 +4582,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4322,18 +4650,22 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -4356,13 +4688,16 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" }, "minItems": 1 @@ -4375,11 +4710,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4428,26 +4765,38 @@ "title": "ColorResult", "properties": { "viewer_id": { + "title": "ViewerId", "type": "integer" }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "color": { - "type": "object", "title": "ColorRGBA", + "type": "object", "properties": { "red": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "green": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "blue": { - "type": "integer" + "type": "integer", + "minimum": 0, + "maximum": 255 }, "alpha": { - "type": "number" + "type": "number", + "minimum": 0, + "maximum": 1 } }, "required": [ @@ -4480,6 +4829,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4593,6 +4943,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4680,6 +5031,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4702,6 +5054,7 @@ ] }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, @@ -4741,6 +5094,7 @@ "type": "object", "properties": { "filename": { + "title": "Filename", "type": "string", "minLength": 1 }, @@ -4793,6 +5147,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4852,6 +5207,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4902,29 +5258,29 @@ "type": "object", "properties": { "color": { - "title": "TextColor", + "title": "ColorRGB", "type": "object", "properties": { - "r": { + "red": { "type": "integer", "minimum": 0, "maximum": 255 }, - "g": { + "green": { "type": "integer", "minimum": 0, "maximum": 255 }, - "b": { + "blue": { "type": "integer", "minimum": 0, "maximum": 255 } }, "required": [ - "r", - "g", - "b" + "red", + "green", + "blue" ], "additionalProperties": false }, @@ -4937,6 +5293,7 @@ ] }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -4985,28 +5342,29 @@ "type": "object", "properties": { "color": { + "title": "ColorRGB", "type": "object", "properties": { - "r": { + "red": { "type": "integer", "minimum": 0, "maximum": 255 }, - "g": { + "green": { "type": "integer", "minimum": 0, "maximum": 255 }, - "b": { + "blue": { "type": "integer", "minimum": 0, "maximum": 255 } }, "required": [ - "r", - "g", - "b" + "red", + "green", + "blue" ], "additionalProperties": false } @@ -5135,6 +5493,7 @@ "points": { "type": "array", "items": { + "title": "Point3D", "type": "object", "properties": { "x": { @@ -5193,8 +5552,10 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", - "minLength": 1 + "minLength": 32, + "maxLength": 32 } } }, @@ -5214,6 +5575,7 @@ } }, "viewer_id": { + "title": "ViewerId", "type": "integer" } }, @@ -5247,10 +5609,13 @@ "type": "string" }, "block_ids": { + "title": "BlockIds", "type": "array", "items": { + "title": "ViewerId", "type": "integer" - } + }, + "minItems": 1 } }, "required": [], @@ -5277,6 +5642,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5294,7 +5660,10 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "picked_id": { "type": "integer" @@ -5307,7 +5676,10 @@ ] }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "attributes": { "type": "object", @@ -5336,6 +5708,7 @@ "type": "object", "properties": { "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -5396,6 +5769,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5427,6 +5801,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5454,7 +5829,7 @@ "maxItems": 3 }, "color": { - "title": "PlaneColor", + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -5513,6 +5888,7 @@ "type": "object", "properties": { "visibility": { + "title": "Visibility", "type": "boolean" } }, diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 9181c7f1..b8681306 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1,6 +1,9 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_viewer_schemas.json"; +import type { ColorRGB, ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types"; +import type { Point3D } from "@geode/opengeodeweb-microservice/schema_types"; + export interface GenericRegisterParams { id: string; name: string; @@ -22,20 +25,13 @@ export interface MeshCellsAttributeCellAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshCellsAttributeCellAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshCellsAttributeCellAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshCellsAttributeCellAttributeResponse { } @@ -45,20 +41,13 @@ export interface MeshCellsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshCellsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshCellsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshCellsAttributeVertexAttributeResponse { } @@ -79,17 +68,10 @@ export interface MeshCellsOpacityResponse { } export interface MeshCellsColorParams { - color: MeshCellsColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshCellsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshCellsColorResponse { } @@ -99,20 +81,13 @@ export interface MeshEdgesAttributeEdgeAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshEdgesAttributeEdgeAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshEdgesAttributeEdgeAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshEdgesAttributeEdgeAttributeResponse { } @@ -122,20 +97,13 @@ export interface MeshEdgesAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshEdgesAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshEdgesAttributeVertexAttributeResponse { } @@ -164,17 +132,10 @@ export interface MeshEdgesOpacityResponse { } export interface MeshEdgesColorParams { - color: MeshEdgesColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshEdgesColorResponse { } @@ -184,20 +145,13 @@ export interface MeshPointsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshPointsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPointsAttributeVertexAttributeResponse { } @@ -228,17 +182,10 @@ export interface MeshPointsOpacityResponse { } export interface MeshPointsColorParams { - color: MeshPointsColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPointsColorResponse { } @@ -248,20 +195,13 @@ export interface MeshPolygonsAttributePolygonAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshPolygonsAttributePolygonAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshPolygonsAttributePolygonAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolygonsAttributePolygonAttributeResponse { } @@ -271,20 +211,13 @@ export interface MeshPolygonsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshPolygonsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshPolygonsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolygonsAttributeVertexAttributeResponse { } @@ -305,17 +238,10 @@ export interface MeshPolygonsOpacityResponse { } export interface MeshPolygonsColorParams { - color: MeshPolygonsColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshPolygonsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolygonsColorResponse { } @@ -325,20 +251,13 @@ export interface MeshPolyhedraAttributePolyhedronAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshPolyhedraAttributePolyhedronAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshPolyhedraAttributePolyhedronAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolyhedraAttributePolyhedronAttributeResponse { } @@ -348,20 +267,13 @@ export interface MeshPolyhedraAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: MeshPolyhedraAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface MeshPolyhedraAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolyhedraAttributeVertexAttributeResponse { } @@ -382,17 +294,10 @@ export interface MeshPolyhedraOpacityResponse { } export interface MeshPolyhedraColorParams { - color: MeshPolyhedraColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshPolyhedraColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshPolyhedraColorResponse { } @@ -428,17 +333,10 @@ export interface MeshDeregisterResponse { } export interface MeshColorParams { - color: MeshColorParamsColor; + color: ColorRGBA; id: string; } -export interface MeshColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface MeshColorResponse { } @@ -509,20 +407,13 @@ export interface ModelBlocksAttributePolyhedronAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelBlocksAttributePolyhedronAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelBlocksAttributePolyhedronAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksAttributePolyhedronAttributeResponse { } @@ -533,20 +424,13 @@ export interface ModelBlocksAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelBlocksAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelBlocksAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksAttributeVertexAttributeResponse { } @@ -557,20 +441,13 @@ export interface ModelBlocksEdgesAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelBlocksEdgesAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelBlocksEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksEdgesAttributeVertexAttributeResponse { } @@ -594,17 +471,10 @@ export interface ModelBlocksEdgesVisibilityResponse { export interface ModelBlocksEdgesColorParams { block_ids: number[]; - color: ModelBlocksEdgesColorParamsColor; + color: ColorRGBA; id: string; } -export interface ModelBlocksEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksEdgesColorResponse { } @@ -615,20 +485,13 @@ export interface ModelBlocksPointsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelBlocksPointsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelBlocksPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksPointsAttributeVertexAttributeResponse { } @@ -652,17 +515,10 @@ export interface ModelBlocksPointsSizeResponse { export interface ModelBlocksPointsColorParams { block_ids: number[]; - color: ModelBlocksPointsColorParamsColor; + color: ColorRGBA; id: string; } -export interface ModelBlocksPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelBlocksPointsColorResponse { } @@ -678,18 +534,11 @@ export interface ModelBlocksVisibilityResponse { export interface ModelBlocksColorParams { block_ids: number[]; collection_id?: string; - color?: ModelBlocksColorParamsColor; + color?: ColorRGBA; color_mode: ColorMode; id: string; } -export interface ModelBlocksColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export type ColorMode = "constant" | "random"; export interface ModelBlocksColorResponse { @@ -697,18 +546,11 @@ export interface ModelBlocksColorResponse { } export interface ModelBlocksColorResponseColor { - color: PurpleColorRGBA; + color: ColorRGBA; geode_id: string; viewer_id: number; } -export interface PurpleColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelCornersAttributeVertexAttributeParams { block_ids: number[]; id: string; @@ -716,20 +558,13 @@ export interface ModelCornersAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelCornersAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelCornersAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelCornersAttributeVertexAttributeResponse { } @@ -745,35 +580,21 @@ export interface ModelCornersVisibilityResponse { export interface ModelCornersColorParams { block_ids: number[]; collection_id?: string; - color?: ModelCornersColorParamsColor; + color?: ColorRGBA; color_mode: ColorMode; id: string; } -export interface ModelCornersColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelCornersColorResponse { colors: ModelCornersColorResponseColor[]; } export interface ModelCornersColorResponseColor { - color: FluffyColorRGBA; + color: ColorRGBA; geode_id: string; viewer_id: number; } -export interface FluffyColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelEdgesWidthParams { id: string; width: number; @@ -797,20 +618,13 @@ export interface ModelLinesAttributeEdgeAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelLinesAttributeEdgeAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelLinesAttributeEdgeAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelLinesAttributeEdgeAttributeResponse { } @@ -821,20 +635,13 @@ export interface ModelLinesAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelLinesAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelLinesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelLinesAttributeVertexAttributeResponse { } @@ -845,20 +652,13 @@ export interface ModelLinesPointsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelLinesPointsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelLinesPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelLinesPointsAttributeVertexAttributeResponse { } @@ -882,17 +682,10 @@ export interface ModelLinesPointsSizeResponse { export interface ModelLinesPointsColorParams { block_ids: number[]; - color: ModelLinesPointsColorParamsColor; + color: ColorRGBA; id: string; } -export interface ModelLinesPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelLinesPointsColorResponse { } @@ -908,35 +701,21 @@ export interface ModelLinesVisibilityResponse { export interface ModelLinesColorParams { block_ids: number[]; collection_id?: string; - color?: ModelLinesColorParamsColor; + color?: ColorRGBA; color_mode: ColorMode; id: string; } -export interface ModelLinesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelLinesColorResponse { colors: ModelLinesColorResponseColor[]; } export interface ModelLinesColorResponseColor { - color: TentacledColorRGBA; + color: ColorRGBA; geode_id: string; viewer_id: number; } -export interface TentacledColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelPointsVisibilityParams { id: string; visibility: boolean; @@ -1001,20 +780,13 @@ export interface ModelSurfacesAttributePolygonAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelSurfacesAttributePolygonAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelSurfacesAttributePolygonAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesAttributePolygonAttributeResponse { } @@ -1025,20 +797,13 @@ export interface ModelSurfacesAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelSurfacesAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelSurfacesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesAttributeVertexAttributeResponse { } @@ -1049,20 +814,13 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelSurfacesEdgesAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelSurfacesEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { } @@ -1086,17 +844,10 @@ export interface ModelSurfacesEdgesVisibilityResponse { export interface ModelSurfacesEdgesColorParams { block_ids: number[]; - color: ModelSurfacesEdgesColorParamsColor; + color: ColorRGBA; id: string; } -export interface ModelSurfacesEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesEdgesColorResponse { } @@ -1107,20 +858,13 @@ export interface ModelSurfacesPointsAttributeVertexAttributeParams { maximum: number; minimum: number; name: string; - no_data_color?: ModelSurfacesPointsAttributeVertexAttributeParamsNoDataColor; + no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ points: number[]; } -export interface ModelSurfacesPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesPointsAttributeVertexAttributeResponse { } @@ -1144,17 +888,10 @@ export interface ModelSurfacesPointsSizeResponse { export interface ModelSurfacesPointsColorParams { block_ids: number[]; - color: ModelSurfacesPointsColorParamsColor; + color: ColorRGBA; id: string; } -export interface ModelSurfacesPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesPointsColorResponse { } @@ -1170,35 +907,21 @@ export interface ModelSurfacesVisibilityResponse { export interface ModelSurfacesColorParams { block_ids: number[]; collection_id?: string; - color?: ModelSurfacesColorParamsColor; + color?: ColorRGBA; color_mode: ColorMode; id: string; } -export interface ModelSurfacesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesColorResponse { colors: ModelSurfacesColorResponseColor[]; } export interface ModelSurfacesColorResponseColor { - color: StickyColorRGBA; + color: ColorRGBA; geode_id: string; viewer_id: number; } -export interface StickyColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ModelSurfacesApplyTexturesParams { id: string; textures: ModelSurfacesApplyTexturesParamsTexture[]; @@ -1326,17 +1049,11 @@ export interface ViewerSetZScalingResponse { } export interface ViewerSetTextStyleParams { - color: TextColor; + color: ColorRGB; font_family: FontFamily; opacity: number; } -export interface TextColor { - b: number; - g: number; - r: number; -} - export type FontFamily = "arial" | "courier" | "times"; export interface ViewerSetTextStyleResponse { @@ -1352,13 +1069,7 @@ export interface ViewerSetOrientationWidgetResponse { } export interface ViewerSetBackgroundColorParams { - color: ViewerSetBackgroundColorParamsColor; -} - -export interface ViewerSetBackgroundColorParamsColor { - b: number; - g: number; - r: number; + color: ColorRGB; } export interface ViewerSetBackgroundColorResponse { @@ -1400,16 +1111,10 @@ export interface ViewerRenderResponse { export interface ViewerPreviewPointsParams { closed?: boolean; - points: Point[]; + points: Point3D[]; style: Style; } -export interface Point { - x: number; - y: number; - z: number; -} - export type Style = "points" | "curve" | "surface"; export interface ViewerPreviewPointsResponse { @@ -1466,12 +1171,6 @@ export interface ViewerGetPointPositionParams { y: number; } -export interface ViewerGetPointPositionResponse { - x: number; - y: number; - z: number; -} - export interface ViewerExplodeParams { explode_factor: number; ids: string[]; @@ -1486,18 +1185,11 @@ export interface ViewerClippingPlanesParams { } export interface Plane { - color?: PlaneColor; + color?: ColorRGBA; normal: number[]; origin: number[]; } -export interface PlaneColor { - alpha: number; - blue: number; - green: number; - red: number; -} - export interface ViewerClippingPlanesResponse { } diff --git a/pyproject.toml b/pyproject.toml index 95b9d21c..c389061c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ dependencies = { file = ["requirements.txt"] } where = ["src"] [tool.setuptools.package-data] +"opengeodeweb_viewer" = ["schema_definitions.json"] "opengeodeweb_viewer.rpc.schemas" = ["*.json"] "opengeodeweb_viewer.rpc.generic.schemas" = ["*.json"] "opengeodeweb_viewer.rpc.mesh.schemas" = ["*.json"] diff --git a/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.json b/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.json index a6c92d34..c6dd7af5 100644 --- a/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.json +++ b/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/generic/schemas/register.json b/src/opengeodeweb_viewer/rpc/generic/schemas/register.json index 6a2288ee..fc37da38 100644 --- a/src/opengeodeweb_viewer/rpc/generic/schemas/register.json +++ b/src/opengeodeweb_viewer/rpc/generic/schemas/register.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json index 1189b1f5..efc0eb49 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json @@ -3,14 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json index 1189b1f5..efc0eb49 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json @@ -3,14 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json index 7fd55c44..3040c522 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "width": { - "type": "number" + "title": "EdgeWidth" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json index 1189b1f5..efc0eb49 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json @@ -3,14 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json index f440cf32..d3c64bd9 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "size": { - "type": "number" + "title": "PointSize" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json index b1aeb211..8baebe36 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ @@ -20,10 +18,10 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json index 1189b1f5..efc0eb49 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json @@ -3,14 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index c0d43ed4..2e220d16 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json @@ -3,25 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -30,36 +21,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index e47d566d..381f12ef 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -30,7 +20,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,4 +37,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json index 1189b1f5..efc0eb49 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json @@ -3,14 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.json index 3bd069fd..696f4a3f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "detail_of": { "type": "string", @@ -59,9 +57,7 @@ "type": "boolean" }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" }, "crop": { "type": "boolean" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json index 3209bd58..f5f7c4b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "textures": { "type": "array", @@ -17,9 +15,7 @@ "minLength": 1 }, "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.json index 456b6b58..a2db3623 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "data_ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.json index 280e4214..0c97cd9c 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.json @@ -2,23 +2,47 @@ "rpc": "basemap_layers", "type": "object", "properties": { - "id": { "type": "string", "minLength": 32, "maxLength": 32 }, + "id": { + "title": "DataId" + }, "layers": { "type": "array", "items": { "type": "object", "properties": { - "map": { "type": "string", "minLength": 1 }, - "visible": { "type": "boolean" }, - "opacity": { "type": "number", "minimum": 0, "maximum": 1 }, - "crop": { "type": "boolean" } + "map": { + "type": "string", + "minLength": 1 + }, + "visible": { + "type": "boolean" + }, + "opacity": { + "title": "Opacity" + }, + "crop": { + "type": "boolean" + } }, - "required": ["map", "visible", "opacity", "crop"], + "required": [ + "map", + "visible", + "opacity", + "crop" + ], "additionalProperties": false } } }, - "required": ["id", "layers"], + "required": [ + "id", + "layers" + ], "additionalProperties": false, - "response": { "type": "object", "properties": {}, "required": [], "additionalProperties": false } + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } } diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json index ffb568ec..39c9c6b2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json @@ -3,41 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py index 3fb4bb69..d32a6fc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,23 +6,12 @@ from dataclasses import dataclass -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: ColorClass + color: ColorRGBA id: str @@ -39,4 +29,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.json index a6c92d34..c6dd7af5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json index d8b11d69..fddb90d0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/register.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/register.json index 6a2288ee..fc37da38 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/register.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/register.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json index 54fcb685..4decd739 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json @@ -3,48 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py index 68d42901..2aa1879b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,24 +7,13 @@ from typing import List -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) block_ids: List[int] - color: ColorClass + color: ColorRGBA id: str @@ -41,4 +31,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json index d98585fe..3f46e4b5 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "width": { - "type": "number" + "title": "EdgeWidth" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json index 54fcb685..4decd739 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json @@ -3,48 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py index 68d42901..2aa1879b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,24 +7,13 @@ from typing import List -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) block_ids: List[int] - color: ColorClass + color: ColorRGBA id: str @@ -41,4 +31,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json index 4f313a99..b4a3fc4b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "size": { - "type": "number" + "title": "PointSize" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json index 6afe2b18..615f31f7 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json @@ -3,16 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color_mode": { "type": "string", @@ -22,41 +16,10 @@ ] }, "collection_id": { - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ @@ -75,35 +38,13 @@ "title": "ColorResult", "properties": { "viewer_id": { - "type": "integer" + "title": "ViewerId" }, "geode_id": { - "type": "string" + "title": "GeodeId" }, "color": { - "type": "object", - "title": "ColorRGBA", - "properties": { - "red": { - "type": "integer" - }, - "green": { - "type": "integer" - }, - "blue": { - "type": "integer" - }, - "alpha": { - "type": "number" - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index e6345609..f4b30bc4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List @@ -8,17 +9,6 @@ from typing import List, Optional -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - class ColorMode(Enum): CONSTANT = "constant" RANDOM = "random" @@ -33,18 +23,7 @@ def __post_init__(self) -> None: color_mode: ColorMode id: str collection_id: Optional[str] = None - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + color: Optional[ColorRGBA] = None @dataclass @@ -71,4 +50,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json index 6afe2b18..615f31f7 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json @@ -3,16 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color_mode": { "type": "string", @@ -22,41 +16,10 @@ ] }, "collection_id": { - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ @@ -75,35 +38,13 @@ "title": "ColorResult", "properties": { "viewer_id": { - "type": "integer" + "title": "ViewerId" }, "geode_id": { - "type": "string" + "title": "GeodeId" }, "color": { - "type": "object", - "title": "ColorRGBA", - "properties": { - "red": { - "type": "integer" - }, - "green": { - "type": "integer" - }, - "blue": { - "type": "integer" - }, - "alpha": { - "type": "number" - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index e6345609..f4b30bc4 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List @@ -8,17 +9,6 @@ from typing import List, Optional -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - class ColorMode(Enum): CONSTANT = "constant" RANDOM = "random" @@ -33,18 +23,7 @@ def __post_init__(self) -> None: color_mode: ColorMode id: str collection_id: Optional[str] = None - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + color: Optional[ColorRGBA] = None @dataclass @@ -71,4 +50,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json index 7fd55c44..3040c522 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "width": { - "type": "number" + "title": "EdgeWidth" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json index 54fcb685..4decd739 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json @@ -3,48 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py index 68d42901..2aa1879b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,24 +7,13 @@ from typing import List -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) block_ids: List[int] - color: ColorClass + color: ColorRGBA id: str @@ -41,4 +31,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json index 4f313a99..b4a3fc4b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "size": { - "type": "number" + "title": "PointSize" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json index 6afe2b18..615f31f7 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json @@ -3,16 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color_mode": { "type": "string", @@ -22,41 +16,10 @@ ] }, "collection_id": { - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ @@ -75,35 +38,13 @@ "title": "ColorResult", "properties": { "viewer_id": { - "type": "integer" + "title": "ViewerId" }, "geode_id": { - "type": "string" + "title": "GeodeId" }, "color": { - "type": "object", - "title": "ColorRGBA", - "properties": { - "red": { - "type": "integer" - }, - "green": { - "type": "integer" - }, - "blue": { - "type": "integer" - }, - "alpha": { - "type": "number" - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index e6345609..f4b30bc4 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List @@ -8,17 +9,6 @@ from typing import List, Optional -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - class ColorMode(Enum): CONSTANT = "constant" RANDOM = "random" @@ -33,18 +23,7 @@ def __post_init__(self) -> None: color_mode: ColorMode id: str collection_id: Optional[str] = None - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + color: Optional[ColorRGBA] = None @dataclass @@ -71,4 +50,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json index f440cf32..d3c64bd9 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "size": { - "type": "number" + "title": "PointSize" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/deregister.json b/src/opengeodeweb_viewer/rpc/model/schemas/deregister.json index a6c92d34..c6dd7af5 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/deregister.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/deregister.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json index 8f3a692d..bcfbbbf0 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json @@ -3,15 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - } + "title": "BlockIds" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 034c7dd6..2b6c03e4 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -3,18 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - } + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/register.json b/src/opengeodeweb_viewer/rpc/model/schemas/register.json index 6a2288ee..fc37da38 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/register.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/register.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "name": { "type": "string" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json index 3b180aa4..5e918a3e 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json @@ -3,12 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json index 54fcb685..4decd739 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json @@ -3,48 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py index 68d42901..2aa1879b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,24 +7,13 @@ from typing import List -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) block_ids: List[int] - color: ColorClass + color: ColorRGBA id: str @@ -41,4 +31,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json index d98585fe..3f46e4b5 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "width": { - "type": "number" + "title": "EdgeWidth" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index bf36e3b9..2de9222a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json @@ -3,32 +3,19 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "name": { - "type": "string", - "minLength": 1 + "title": "AttributeName" }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "points": { - "type": "array", - "description": "Flat array of [value, r, g, b, ...]", - "items": { - "type": "number" - }, - "minItems": 8 + "title": "ColorMapPoints" }, "minimum": { "type": "number" @@ -37,36 +24,7 @@ "type": "number" }, "no_data_color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index 3c07a38b..bcd13991 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class NoDataColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: @@ -31,7 +21,7 @@ def __post_init__(self) -> None: points: List[float] """Flat array of [value, r, g, b, ...]""" - no_data_color: Optional[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +38,4 @@ def __post_init__(self) -> None: response=AttributeResponse, ) -__all__ = ["NoDataColor", "Attribute", "AttributeResponse", "attribute_route"] +__all__ = ["ColorRGBA", "Attribute", "AttributeResponse", "attribute_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json index 54fcb685..4decd739 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json @@ -3,48 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py index 68d42901..2aa1879b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,24 +7,13 @@ from typing import List -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) block_ids: List[int] - color: ColorClass + color: ColorRGBA id: str @@ -41,4 +31,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json index 4f313a99..b4a3fc4b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "size": { - "type": "number" + "title": "PointSize" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json index 9ab9e3b0..d621593a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "textures": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json index 6afe2b18..615f31f7 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json @@ -3,16 +3,10 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "color_mode": { "type": "string", @@ -22,41 +16,10 @@ ] }, "collection_id": { - "type": "string", - "minLength": 36, - "maxLength": 36 + "title": "GeodeId" }, "color": { - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ @@ -75,35 +38,13 @@ "title": "ColorResult", "properties": { "viewer_id": { - "type": "integer" + "title": "ViewerId" }, "geode_id": { - "type": "string" + "title": "GeodeId" }, "color": { - "type": "object", - "title": "ColorRGBA", - "properties": { - "red": { - "type": "integer" - }, - "green": { - "type": "integer" - }, - "blue": { - "type": "integer" - }, - "alpha": { - "type": "number" - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index e6345609..f4b30bc4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List @@ -8,17 +9,6 @@ from typing import List, Optional -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - class ColorMode(Enum): CONSTANT = "constant" RANDOM = "random" @@ -33,18 +23,7 @@ def __post_init__(self) -> None: color_mode: ColorMode id: str collection_id: Optional[str] = None - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + color: Optional[ColorRGBA] = None @dataclass @@ -71,4 +50,4 @@ def __post_init__(self) -> None: response=ColorResponse, ) -__all__ = ["ColorClass", "Color", "ColorResponse", "color_route"] +__all__ = ["ColorRGBA", "Color", "ColorResponse", "color_route"] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json index 77b18063..488d6b3b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json @@ -3,19 +3,13 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - }, - "minItems": 1 + "title": "BlockIds" }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json index 2129153d..c5b93464 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json index b86a2572..ad6cb406 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json @@ -5,9 +5,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "planes": { @@ -32,37 +30,7 @@ "maxItems": 3 }, "color": { - "title": "PlaneColor", - "type": "object", - "properties": { - "red": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "green": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "blue": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "alpha": { - "type": "number", - "minimum": 0, - "maximum": 1 - } - }, - "required": [ - "red", - "green", - "blue", - "alpha" - ], - "additionalProperties": false + "title": "ColorRGBA" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py index 73f2ff00..b4cdfeb7 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,17 +7,6 @@ from typing import List, Optional -@dataclass -class PlaneColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int - - @dataclass class Plane(DataClassJsonMixin): def __post_init__(self) -> None: @@ -24,7 +14,7 @@ def __post_init__(self) -> None: normal: List[float] origin: List[float] - color: Optional[PlaneColor] = None + color: Optional[ColorRGBA] = None @dataclass @@ -50,4 +40,4 @@ def __post_init__(self) -> None: response=ClippingPlanesResponse, ) -__all__ = ["PlaneColor", "Plane", "ClippingPlanes", "ClippingPlanesResponse", "clipping_planes_route"] +__all__ = ["ColorRGBA", "Plane", "ClippingPlanes", "ClippingPlanesResponse", "clipping_planes_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json index 8c62e604..5d100cb6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json @@ -5,9 +5,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "explode_factor": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json index ff8e13c3..32fcb4f6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json @@ -3,7 +3,7 @@ "type": "object", "properties": { "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json index ca6fa8f6..46264c19 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json @@ -17,9 +17,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } } }, @@ -34,7 +32,7 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId" }, "picked_id": { "type": "integer" @@ -47,7 +45,7 @@ ] }, "geode_id": { - "type": "string" + "title": "GeodeId" }, "attributes": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index 497e0836..bf74cbd1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -21,10 +21,7 @@ "type": "string" }, "block_ids": { - "type": "array", - "items": { - "type": "integer" - } + "title": "BlockIds" } }, "required": [], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index a8e9227c..d736ad1b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -11,12 +11,15 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 1 + "title": "DataId" } } }, - "required": ["x", "y", "ids"], + "required": [ + "x", + "y", + "ids" + ], "additionalProperties": false, "response": { "type": "object", @@ -28,10 +31,12 @@ } }, "viewer_id": { - "type": "integer" + "title": "ViewerId" } }, - "required": ["array_ids"], + "required": [ + "array_ids" + ], "additionalProperties": false } } diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json index 4dbdc0d8..35132b78 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json @@ -5,24 +5,7 @@ "points": { "type": "array", "items": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - }, - "required": [ - "x", - "y", - "z" - ], - "additionalProperties": false + "title": "Point3D" } }, "style": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py index 57c47db2..e2ba6f46 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import Point3D from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -7,16 +8,6 @@ from typing import List, Optional -@dataclass -class Point(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - x: float - y: float - z: float - - class Style(Enum): CURVE = "curve" POINTS = "points" @@ -28,7 +19,7 @@ class PreviewPoints(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - points: List[Point] + points: List[Point3D] style: Style closed: Optional[bool] = None @@ -47,4 +38,4 @@ def __post_init__(self) -> None: response=PreviewPointsResponse, ) -__all__ = ["Point", "PreviewPoints", "PreviewPointsResponse", "preview_points_route"] +__all__ = ["Point3D", "PreviewPoints", "PreviewPointsResponse", "preview_points_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json index a05c4bed..93a39cb9 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json @@ -3,30 +3,7 @@ "type": "object", "properties": { "color": { - "type": "object", - "properties": { - "r": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "g": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "b": { - "type": "integer", - "minimum": 0, - "maximum": 255 - } - }, - "required": [ - "r", - "g", - "b" - ], - "additionalProperties": false + "title": "ColorRGB" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py index 4f6068bf..4153a3b7 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGB from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -5,22 +6,12 @@ from dataclasses import dataclass -@dataclass -class Color(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - b: int - g: int - r: int - - @dataclass class SetBackgroundColor(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: Color + color: ColorRGB @dataclass @@ -37,4 +28,4 @@ def __post_init__(self) -> None: response=SetBackgroundColorResponse, ) -__all__ = ["Color", "SetBackgroundColor", "SetBackgroundColorResponse", "set_background_color_route"] +__all__ = ["ColorRGB", "SetBackgroundColor", "SetBackgroundColorResponse", "set_background_color_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json index 605a2f8f..a143e39d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json @@ -3,31 +3,7 @@ "type": "object", "properties": { "color": { - "title": "TextColor", - "type": "object", - "properties": { - "r": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "g": { - "type": "integer", - "minimum": 0, - "maximum": 255 - }, - "b": { - "type": "integer", - "minimum": 0, - "maximum": 255 - } - }, - "required": [ - "r", - "g", - "b" - ], - "additionalProperties": false + "title": "ColorRGB" }, "font_family": { "type": "string", @@ -38,9 +14,7 @@ ] }, "opacity": { - "type": "number", - "minimum": 0, - "maximum": 1 + "title": "Opacity" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py index a84ed1ee..c68a8db8 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ColorRGB from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -6,16 +7,6 @@ from enum import Enum -@dataclass -class TextColor(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - b: int - g: int - r: int - - class FontFamily(Enum): ARIAL = "arial" COURIER = "courier" @@ -27,7 +18,7 @@ class SetTextStyle(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: TextColor + color: ColorRGB font_family: FontFamily opacity: float @@ -46,4 +37,4 @@ def __post_init__(self) -> None: response=SetTextStyleResponse, ) -__all__ = ["TextColor", "SetTextStyle", "SetTextStyleResponse", "set_text_style_route"] +__all__ = ["ColorRGB", "SetTextStyle", "SetTextStyleResponse", "set_text_style_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json index e47a1a73..f94a3034 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json @@ -5,9 +5,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "shrink_factor": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json index cf6292d1..829c8694 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json @@ -5,9 +5,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "slices": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json index 5706f3fa..23fccf3f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "filename": { - "type": "string", - "minLength": 1 + "title": "Filename" }, "output_extension": { "type": "string", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index 15fe03b2..04752700 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json @@ -5,9 +5,7 @@ "ids": { "type": "array", "items": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "attributes": { @@ -27,8 +25,7 @@ ] }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "minimum": { "type": "number" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json index d4d3e1d9..c31da78c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json @@ -3,9 +3,7 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json new file mode 100644 index 00000000..d22727a5 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -0,0 +1,256 @@ +{ + "AttributeItem": { + "type": "integer", + "minimum": 0 + }, + "AttributeName": { + "type": "string", + "minLength": 1 + }, + "BlockIds": { + "type": "array", + "items": { + "title": "ViewerId", + "type": "integer" + }, + "minItems": 1 + }, + "ColorMapPoints": { + "description": "Flat array of [value, r, g, b, ...]", + "type": "array", + "items": { + "type": "number" + }, + "minItems": 8 + }, + "ColorRGB": { + "type": "object", + "properties": { + "red": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "green": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "blue": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + }, + "required": [ + "red", + "green", + "blue" + ], + "additionalProperties": false + }, + "ColorRGBA": { + "type": "object", + "properties": { + "red": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "green": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "blue": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "alpha": { + "type": "number", + "minimum": 0, + "maximum": 1 + } + }, + "required": [ + "red", + "green", + "blue", + "alpha" + ], + "additionalProperties": false + }, + "DataId": { + "type": "string", + "minLength": 32, + "maxLength": 32 + }, + "EdgeWidth": { + "type": "number" + }, + "Filename": { + "type": "string", + "minLength": 1 + }, + "GeodeEdgeMeshType": { + "type": "string", + "enum": [ + "EdgedCurve2D", + "EdgedCurve3D" + ] + }, + "GeodeId": { + "type": "string", + "minLength": 36, + "maxLength": 36 + }, + "GeodeMeshType": { + "type": "string", + "enum": [ + "VertexSet", + "Graph", + "PointSet2D", + "PointSet3D", + "EdgedCurve2D", + "EdgedCurve3D", + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D", + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D" + ] + }, + "GeodeModelType": { + "type": "string", + "enum": [ + "BRep", + "Section", + "StructuralModel", + "CrossSection", + "ImplicitStructuralModel", + "ImplicitCrossSection", + "HorizonStack3D" + ] + }, + "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" + ] + }, + "GeodePointMeshType": { + "type": "string", + "enum": [ + "PointSet2D", + "PointSet3D" + ] + }, + "GeodePolygonMeshType": { + "type": "string", + "enum": [ + "RasterImage2D", + "PolygonalSurface2D", + "PolygonalSurface3D", + "TriangulatedSurface2D", + "TriangulatedSurface3D", + "RegularGrid2D", + "LightRegularGrid2D" + ] + }, + "GeodePolyhedronMeshType": { + "type": "string", + "enum": [ + "RasterImage3D", + "PolyhedralSolid3D", + "TetrahedralSolid3D", + "HybridSolid3D", + "RegularGrid3D", + "LightRegularGrid3D" + ] + }, + "Opacity": { + "type": "number", + "minimum": 0, + "maximum": 1 + }, + "Point3D": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, + "PointSize": { + "type": "number" + }, + "ViewerElementsType": { + "type": "string", + "enum": [ + "points", + "edges", + "polygons", + "polyhedra", + "default" + ] + }, + "ViewerId": { + "type": "integer" + }, + "ViewerObjectType": { + "type": "string", + "enum": [ + "mesh", + "model" + ] + }, + "Visibility": { + "type": "boolean" + } +} From 783d910b39364956cfade234979a39e3de6b2bdc Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 15:15:27 +0100 Subject: [PATCH 03/14] fix(viewer): read the red/green/blue channels of the colors Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py | 4 ++-- tests/test_utils_protocols.py | 2 +- tests/test_viewer_protocols.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 06f31df2..2864e355 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -114,7 +114,7 @@ def set_background_color( render_window = self.getView("-1") renderer = render_window.GetRenderers().GetFirstRenderer() - renderer.SetBackground([color.r / 255, color.g / 255, color.b / 255]) + renderer.SetBackground([color.red / 255, color.green / 255, color.blue / 255]) return schemas.SetBackgroundColorResponse() @typed_rpc(viewer_prefix, schemas.set_text_style_route) @@ -122,7 +122,7 @@ def update_text_style(self, params: schemas.SetTextStyle) -> schemas.SetTextStyl color = params.color self.set_scene_text_style( TextStyle( - color=(color.r, color.g, color.b), + color=(color.red, color.green, color.blue), font_family=params.font_family.value, opacity=params.opacity, ) diff --git a/tests/test_utils_protocols.py b/tests/test_utils_protocols.py index 217d4704..d9e58f4d 100644 --- a/tests/test_utils_protocols.py +++ b/tests/test_utils_protocols.py @@ -66,7 +66,7 @@ def test_scene_style_after_import(server: ServerMonitor) -> None: ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"r": 255, "g": 0, "b": 0}, "font_family": "arial", "opacity": 1.0}], + [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], ) server.call( VtkViewerView.viewer_prefix diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index 7e8538b1..f1dca7cf 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -53,7 +53,7 @@ def test_set_viewer_background_color(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_background_color"]["rpc"], - [{"color": {"r": 0, "g": 0, "b": 255}}], + [{"color": {"red": 0, "green": 0, "blue": 255}}], ) assert server.compare_image("viewer/set_background_color.jpeg") @@ -62,7 +62,7 @@ def test_set_text_style(server: ServerMonitor, dataset_factory: Callable[..., st test_grid_scale(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"r": 255, "g": 0, "b": 0}, "font_family": "courier", "opacity": 0.5}], + [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "courier", "opacity": 0.5}], ) assert server.compare_image("viewer/set_text_style.jpeg") @@ -73,7 +73,7 @@ def test_set_text_style_then_attribute( test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"r": 255, "g": 0, "b": 0}, "font_family": "times", "opacity": 1.0}], + [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "times", "opacity": 1.0}], ) test_register_points(server, dataset_factory) server.call( @@ -329,7 +329,7 @@ def test_set_orientation_widget_compass(server: ServerMonitor) -> None: test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"r": 255, "g": 0, "b": 0}, "font_family": "arial", "opacity": 1.0}], + [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], ) server.call( VtkViewerView.viewer_prefix @@ -350,7 +350,7 @@ def test_set_text_style_after_compass(server: ServerMonitor) -> None: ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"r": 255, "g": 0, "b": 0}, "font_family": "arial", "opacity": 1.0}], + [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") From 2c6438a4fdf581b5d14ed991301a723017d66aa3 Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 15:15:27 +0100 Subject: [PATCH 04/14] fix(tests): use valid ids in the test data The ids are now checked against their schema type. Co-Authored-By: Claude Opus 5.5 --- tests/data/cube.vtm | 86 ++++++++++++++++++++-------------------- tests/test_typed_rpcs.py | 2 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/tests/data/cube.vtm b/tests/data/cube.vtm index f6918d7a..a8310b99 100644 --- a/tests/data/cube.vtm +++ b/tests/data/cube.vtm @@ -2,53 +2,53 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + diff --git a/tests/test_typed_rpcs.py b/tests/test_typed_rpcs.py index f2a55e66..3a8fa5a7 100644 --- a/tests/test_typed_rpcs.py +++ b/tests/test_typed_rpcs.py @@ -63,7 +63,7 @@ def invalid_payload( @typed_rpc(PREFIX, schemas.highlight_route) def highlight(self, _params: schemas.Highlight) -> schemas.HighlightResponse: return schemas.HighlightResponse( - id="data", + id="0" * 32, picked_id=0, field_type=schemas.highlight.PickedFieldType.POINT, ) From 6220ab9159ae0786600a4c53fed4157ae3be237a Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 15:52:44 +0100 Subject: [PATCH 05/14] fix(schemas): generate the aliases of the non object schema types Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/schema_types.d.ts | 8 ++++++++ src/opengeodeweb_viewer/schema_types.py | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index 78de3ad2..e6173d4a 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -1,5 +1,13 @@ // Generated by generate_schema_types.js from schema_types.json: do not edit +export type BlockIds = number[]; +export type Visibility = boolean; +export type Opacity = number; +export type PointSize = number; +export type EdgeWidth = number; +export type ColorMapPoints = number[]; +export type AttributeItem = number; + export interface ColorRGB { blue: number; green: number; diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index 3e87c504..159da75f 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -5,6 +5,14 @@ from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass +BlockIds = list[int] +Visibility = bool +Opacity = float +PointSize = float +EdgeWidth = float +ColorMapPoints = list[float] +AttributeItem = int + @dataclass class ColorRGB(DataClassJsonMixin): @@ -22,6 +30,13 @@ class ColorRGBA(ColorRGB): __all__ = [ + "AttributeItem", + "BlockIds", + "ColorMapPoints", "ColorRGB", "ColorRGBA", + "EdgeWidth", + "Opacity", + "PointSize", + "Visibility", ] From 9de000119b4b9fa11243621fd643f40158cf2f13 Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 16:24:55 +0100 Subject: [PATCH 06/14] fix(schemas): define AttributeRangeMinimum and AttributeRangeMaximum The bounds of the range the color map of an attribute covers. Co-Authored-By: Claude Opus 5.5 --- .../cells/attribute/cell/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../edges/attribute/edge/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/polygon/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/polyhedron/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/polyhedron/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../lines/attribute/edge/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/polygon/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../attribute/vertex/schemas/attribute.json | 4 ++-- .../rpc/viewer/schemas/threshold.json | 4 ++-- src/opengeodeweb_viewer/schema_types.d.ts | 2 ++ src/opengeodeweb_viewer/schema_types.json | 16 ++++++++++++++-- src/opengeodeweb_viewer/schema_types.py | 4 ++++ 25 files changed, 64 insertions(+), 46 deletions(-) diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index 2e220d16..58a71266 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json @@ -15,10 +15,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index 2de9222a..31af0dd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json @@ -18,10 +18,10 @@ "title": "ColorMapPoints" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "no_data_color": { "title": "ColorRGBA" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index 04752700..f57b5613 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json @@ -28,10 +28,10 @@ "title": "AttributeItem" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" } }, "required": [ diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index e6173d4a..2a656097 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -7,6 +7,8 @@ export type PointSize = number; export type EdgeWidth = number; export type ColorMapPoints = number[]; export type AttributeItem = number; +export type AttributeRangeMinimum = number; +export type AttributeRangeMaximum = number; export interface ColorRGB { blue: number; diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json index c418ea3d..6ac25503 100644 --- a/src/opengeodeweb_viewer/schema_types.json +++ b/src/opengeodeweb_viewer/schema_types.json @@ -39,7 +39,11 @@ "maximum": 255 } }, - "required": ["red", "green", "blue"], + "required": [ + "red", + "green", + "blue" + ], "additionalProperties": false }, "ColorRGBA": { @@ -51,7 +55,9 @@ "maximum": 1 } }, - "required": ["alpha"] + "required": [ + "alpha" + ] }, "ColorMapPoints": { "description": "Flat array of [value, r, g, b, ...]", @@ -64,5 +70,11 @@ "AttributeItem": { "type": "integer", "minimum": 0 + }, + "AttributeRangeMinimum": { + "type": "number" + }, + "AttributeRangeMaximum": { + "type": "number" } } diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index 159da75f..24e019fb 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -12,6 +12,8 @@ EdgeWidth = float ColorMapPoints = list[float] AttributeItem = int +AttributeRangeMinimum = float +AttributeRangeMaximum = float @dataclass @@ -31,6 +33,8 @@ class ColorRGBA(ColorRGB): __all__ = [ "AttributeItem", + "AttributeRangeMaximum", + "AttributeRangeMinimum", "BlockIds", "ColorMapPoints", "ColorRGB", From 5d9f8bd3265aac5e8b3034248144acd04d414a4c Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 16:24:55 +0100 Subject: [PATCH 07/14] fix(schemas): name the alias types in the generated code Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 44 ++ opengeodeweb_viewer_typed_schemas.d.ts | 595 +++++++++--------- .../rpc/generic/schemas/deregister.py | 3 +- .../rpc/generic/schemas/register.py | 3 +- .../cells/attribute/cell/schemas/attribute.py | 17 +- .../attribute/vertex/schemas/attribute.py | 17 +- .../rpc/mesh/cells/schemas/color.py | 3 +- .../rpc/mesh/cells/schemas/opacity.py | 6 +- .../rpc/mesh/cells/schemas/visibility.py | 6 +- .../edges/attribute/edge/schemas/attribute.py | 17 +- .../attribute/vertex/schemas/attribute.py | 17 +- .../rpc/mesh/edges/schemas/color.py | 3 +- .../rpc/mesh/edges/schemas/opacity.py | 6 +- .../rpc/mesh/edges/schemas/visibility.py | 6 +- .../rpc/mesh/edges/schemas/width.py | 6 +- .../attribute/vertex/schemas/attribute.py | 17 +- .../rpc/mesh/points/schemas/color.py | 3 +- .../rpc/mesh/points/schemas/opacity.py | 6 +- .../rpc/mesh/points/schemas/size.py | 6 +- .../rpc/mesh/points/schemas/visibility.py | 10 +- .../attribute/polygon/schemas/attribute.py | 17 +- .../attribute/vertex/schemas/attribute.py | 17 +- .../rpc/mesh/polygons/schemas/color.py | 3 +- .../rpc/mesh/polygons/schemas/opacity.py | 6 +- .../rpc/mesh/polygons/schemas/visibility.py | 6 +- .../attribute/polyhedron/schemas/attribute.py | 17 +- .../attribute/vertex/schemas/attribute.py | 17 +- .../rpc/mesh/polyhedra/schemas/color.py | 3 +- .../rpc/mesh/polyhedra/schemas/opacity.py | 6 +- .../rpc/mesh/polyhedra/schemas/visibility.py | 6 +- .../rpc/mesh/schemas/apply_basemap.py | 6 +- .../rpc/mesh/schemas/apply_textures.py | 5 +- .../rpc/mesh/schemas/basemap_drape.py | 3 +- .../rpc/mesh/schemas/basemap_layers.py | 6 +- .../rpc/mesh/schemas/color.py | 3 +- .../rpc/mesh/schemas/deregister.py | 3 +- .../rpc/mesh/schemas/highlight.py | 6 +- .../rpc/mesh/schemas/register.py | 3 +- .../rpc/mesh/schemas/visibility.py | 6 +- .../attribute/polyhedron/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../rpc/model/blocks/edges/schemas/color.py | 8 +- .../model/blocks/edges/schemas/visibility.py | 9 +- .../rpc/model/blocks/edges/schemas/width.py | 9 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../rpc/model/blocks/points/schemas/color.py | 8 +- .../rpc/model/blocks/points/schemas/size.py | 9 +- .../model/blocks/points/schemas/visibility.py | 9 +- .../rpc/model/blocks/schemas/color.py | 17 +- .../rpc/model/blocks/schemas/visibility.py | 9 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../rpc/model/corners/schemas/color.py | 17 +- .../rpc/model/corners/schemas/visibility.py | 9 +- .../rpc/model/edges/schemas/visibility.py | 6 +- .../rpc/model/edges/schemas/width.py | 6 +- .../lines/attribute/edge/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../rpc/model/lines/points/schemas/color.py | 8 +- .../rpc/model/lines/points/schemas/size.py | 9 +- .../model/lines/points/schemas/visibility.py | 9 +- .../rpc/model/lines/schemas/color.py | 17 +- .../rpc/model/lines/schemas/visibility.py | 9 +- .../rpc/model/points/schemas/size.py | 6 +- .../rpc/model/points/schemas/visibility.py | 6 +- .../rpc/model/schemas/deregister.py | 3 +- .../rpc/model/schemas/get_blocks_bounds.py | 8 +- .../rpc/model/schemas/highlight.py | 9 +- .../rpc/model/schemas/register.py | 3 +- .../rpc/model/schemas/visibility.py | 6 +- .../attribute/polygon/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../rpc/model/surfaces/edges/schemas/color.py | 8 +- .../surfaces/edges/schemas/visibility.py | 9 +- .../rpc/model/surfaces/edges/schemas/width.py | 9 +- .../attribute/vertex/schemas/attribute.py | 19 +- .../model/surfaces/points/schemas/color.py | 8 +- .../rpc/model/surfaces/points/schemas/size.py | 9 +- .../surfaces/points/schemas/visibility.py | 9 +- .../model/surfaces/schemas/apply_textures.py | 3 +- .../rpc/model/surfaces/schemas/color.py | 17 +- .../rpc/model/surfaces/schemas/visibility.py | 9 +- .../rpc/viewer/schemas/axes.py | 3 +- .../rpc/viewer/schemas/clipping_planes.py | 3 +- .../rpc/viewer/schemas/explode.py | 3 +- .../rpc/viewer/schemas/grid_scale.py | 3 +- .../rpc/viewer/schemas/highlight.py | 7 +- .../rpc/viewer/schemas/pick_colormap.py | 5 +- .../rpc/viewer/schemas/picked_ids.py | 5 +- .../rpc/viewer/schemas/set_text_style.py | 4 +- .../rpc/viewer/schemas/shrink.py | 3 +- .../rpc/viewer/schemas/slice.py | 3 +- .../rpc/viewer/schemas/take_screenshot.py | 3 +- .../rpc/viewer/schemas/threshold.py | 10 +- .../rpc/viewer/schemas/update_data.py | 3 +- .../schema_definitions.json | 6 + 98 files changed, 837 insertions(+), 672 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index d72db4e2..d0463c7d 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -87,9 +87,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -175,9 +177,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -382,9 +386,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -470,9 +476,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -705,9 +713,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -954,9 +964,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -1042,9 +1054,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -1249,9 +1263,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -1337,9 +1353,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -1948,9 +1966,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -2046,9 +2066,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -2147,9 +2169,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -2392,9 +2416,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -2817,9 +2843,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -3156,9 +3184,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -3254,9 +3284,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -3355,9 +3387,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -3998,9 +4032,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -4096,9 +4132,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -4197,9 +4235,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -4442,9 +4482,11 @@ "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { @@ -5059,9 +5101,11 @@ "minimum": 0 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" } }, diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index b8681306..816c38b8 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1,11 +1,11 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_viewer_schemas.json"; -import type { ColorRGB, ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types"; -import type { Point3D } from "@geode/opengeodeweb-microservice/schema_types"; +import type { AttributeName, DataId, Filename, GeodeId, Point3D, ViewerId } from "@geode/opengeodeweb-microservice/schema_types"; +import type { AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Opacity, PointSize, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { - id: string; + id: DataId; name: string; } @@ -13,55 +13,58 @@ export interface GenericRegisterResponse { } export interface GenericDeregisterParams { - id: string; + id: DataId; } export interface GenericDeregisterResponse { } export interface MeshCellsAttributeCellAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } +/** + * Flat array of [value, r, g, b, ...] + */ export interface MeshCellsAttributeCellAttributeResponse { } export interface MeshCellsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshCellsAttributeVertexAttributeResponse { } export interface MeshCellsVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshCellsVisibilityResponse { } export interface MeshCellsOpacityParams { - id: string; - opacity: number; + id: DataId; + opacity: Opacity; } export interface MeshCellsOpacityResponse { @@ -69,63 +72,63 @@ export interface MeshCellsOpacityResponse { export interface MeshCellsColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshCellsColorResponse { } export interface MeshEdgesAttributeEdgeAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshEdgesAttributeEdgeAttributeResponse { } export interface MeshEdgesAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshEdgesAttributeVertexAttributeResponse { } export interface MeshEdgesWidthParams { - id: string; - width: number; + id: DataId; + width: EdgeWidth; } export interface MeshEdgesWidthResponse { } export interface MeshEdgesVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshEdgesVisibilityResponse { } export interface MeshEdgesOpacityParams { - id: string; - opacity: number; + id: DataId; + opacity: Opacity; } export interface MeshEdgesOpacityResponse { @@ -133,49 +136,49 @@ export interface MeshEdgesOpacityResponse { export interface MeshEdgesColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshEdgesColorResponse { } export interface MeshPointsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshPointsAttributeVertexAttributeResponse { } export interface MeshPointsVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshPointsVisibilityResponse { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshPointsSizeParams { - id: string; - size: number; + id: DataId; + size: PointSize; } export interface MeshPointsSizeResponse { } export interface MeshPointsOpacityParams { - id: string; - opacity: number; + id: DataId; + opacity: Opacity; } export interface MeshPointsOpacityResponse { @@ -183,55 +186,55 @@ export interface MeshPointsOpacityResponse { export interface MeshPointsColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshPointsColorResponse { } export interface MeshPolygonsAttributePolygonAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshPolygonsAttributePolygonAttributeResponse { } export interface MeshPolygonsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshPolygonsAttributeVertexAttributeResponse { } export interface MeshPolygonsVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshPolygonsVisibilityResponse { } export interface MeshPolygonsOpacityParams { - id: string; - opacity: number; + id: DataId; + opacity: Opacity; } export interface MeshPolygonsOpacityResponse { @@ -239,55 +242,55 @@ export interface MeshPolygonsOpacityResponse { export interface MeshPolygonsColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshPolygonsColorResponse { } export interface MeshPolyhedraAttributePolyhedronAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshPolyhedraAttributePolyhedronAttributeResponse { } export interface MeshPolyhedraAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface MeshPolyhedraAttributeVertexAttributeResponse { } export interface MeshPolyhedraVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshPolyhedraVisibilityResponse { } export interface MeshPolyhedraOpacityParams { - id: string; - opacity: number; + id: DataId; + opacity: Opacity; } export interface MeshPolyhedraOpacityResponse { @@ -295,22 +298,22 @@ export interface MeshPolyhedraOpacityResponse { export interface MeshPolyhedraColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshPolyhedraColorResponse { } export interface MeshVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshVisibilityResponse { } export interface MeshRegisterParams { - id: string; + id: DataId; name: string; } @@ -318,15 +321,15 @@ export interface MeshRegisterResponse { } export interface MeshHighlightParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface MeshHighlightResponse { } export interface MeshDeregisterParams { - id: string; + id: DataId; } export interface MeshDeregisterResponse { @@ -334,21 +337,21 @@ export interface MeshDeregisterResponse { export interface MeshColorParams { color: ColorRGBA; - id: string; + id: DataId; } export interface MeshColorResponse { } export interface MeshBasemapLayersParams { - id: string; + id: DataId; layers: Layer[]; } export interface Layer { crop: boolean; map: string; - opacity: number; + opacity: Opacity; visible: boolean; } @@ -357,19 +360,19 @@ export interface MeshBasemapLayersResponse { export interface MeshBasemapDrapeParams { data_ids: string[]; - id: string; + id: DataId; } export interface MeshBasemapDrapeResponse { } export interface MeshApplyTexturesParams { - id: string; + id: DataId; textures: MeshApplyTexturesParamsTexture[]; } export interface MeshApplyTexturesParamsTexture { - id: string; + id: DataId; texture_name: string; } @@ -379,7 +382,7 @@ export interface MeshApplyTexturesResponse { export interface MeshApplyBasemapParams { columns: number; detail_of?: string; - id: string; + id: DataId; layers: MapState[]; maps: Map[]; rows: number; @@ -388,7 +391,7 @@ export interface MeshApplyBasemapParams { export interface MapState { crop: boolean; map: string; - opacity: number; + opacity: Opacity; visible: boolean; } @@ -401,142 +404,142 @@ export interface MeshApplyBasemapResponse { } export interface ModelBlocksAttributePolyhedronAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelBlocksAttributePolyhedronAttributeResponse { } export interface ModelBlocksAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelBlocksAttributeVertexAttributeResponse { } export interface ModelBlocksEdgesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelBlocksEdgesAttributeVertexAttributeResponse { } export interface ModelBlocksEdgesWidthParams { - block_ids: number[]; - id: string; - width: number; + block_ids: BlockIds; + id: DataId; + width: EdgeWidth; } export interface ModelBlocksEdgesWidthResponse { } export interface ModelBlocksEdgesVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelBlocksEdgesVisibilityResponse { } export interface ModelBlocksEdgesColorParams { - block_ids: number[]; + block_ids: BlockIds; color: ColorRGBA; - id: string; + id: DataId; } export interface ModelBlocksEdgesColorResponse { } export interface ModelBlocksPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelBlocksPointsAttributeVertexAttributeResponse { } export interface ModelBlocksPointsVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelBlocksPointsVisibilityResponse { } export interface ModelBlocksPointsSizeParams { - block_ids: number[]; - id: string; - size: number; + block_ids: BlockIds; + id: DataId; + size: PointSize; } export interface ModelBlocksPointsSizeResponse { } export interface ModelBlocksPointsColorParams { - block_ids: number[]; + block_ids: BlockIds; color: ColorRGBA; - id: string; + id: DataId; } export interface ModelBlocksPointsColorResponse { } export interface ModelBlocksVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelBlocksVisibilityResponse { } export interface ModelBlocksColorParams { - block_ids: number[]; - collection_id?: string; + block_ids: BlockIds; + collection_id?: GeodeId; color?: ColorRGBA; color_mode: ColorMode; - id: string; + id: DataId; } export type ColorMode = "constant" | "random"; @@ -547,42 +550,42 @@ export interface ModelBlocksColorResponse { export interface ModelBlocksColorResponseColor { color: ColorRGBA; - geode_id: string; - viewer_id: number; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelCornersAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelCornersAttributeVertexAttributeResponse { } export interface ModelCornersVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelCornersVisibilityResponse { } export interface ModelCornersColorParams { - block_ids: number[]; - collection_id?: string; + block_ids: BlockIds; + collection_id?: GeodeId; color?: ColorRGBA; color_mode: ColorMode; - id: string; + id: DataId; } export interface ModelCornersColorResponse { @@ -591,119 +594,119 @@ export interface ModelCornersColorResponse { export interface ModelCornersColorResponseColor { color: ColorRGBA; - geode_id: string; - viewer_id: number; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelEdgesWidthParams { - id: string; - width: number; + id: DataId; + width: EdgeWidth; } export interface ModelEdgesWidthResponse { } export interface ModelEdgesVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface ModelEdgesVisibilityResponse { } export interface ModelLinesAttributeEdgeAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelLinesAttributeEdgeAttributeResponse { } export interface ModelLinesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelLinesAttributeVertexAttributeResponse { } export interface ModelLinesPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelLinesPointsAttributeVertexAttributeResponse { } export interface ModelLinesPointsVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelLinesPointsVisibilityResponse { } export interface ModelLinesPointsSizeParams { - block_ids: number[]; - id: string; - size: number; + block_ids: BlockIds; + id: DataId; + size: PointSize; } export interface ModelLinesPointsSizeResponse { } export interface ModelLinesPointsColorParams { - block_ids: number[]; + block_ids: BlockIds; color: ColorRGBA; - id: string; + id: DataId; } export interface ModelLinesPointsColorResponse { } export interface ModelLinesVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelLinesVisibilityResponse { } export interface ModelLinesColorParams { - block_ids: number[]; - collection_id?: string; + block_ids: BlockIds; + collection_id?: GeodeId; color?: ColorRGBA; color_mode: ColorMode; - id: string; + id: DataId; } export interface ModelLinesColorResponse { @@ -712,36 +715,36 @@ export interface ModelLinesColorResponse { export interface ModelLinesColorResponseColor { color: ColorRGBA; - geode_id: string; - viewer_id: number; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelPointsVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface ModelPointsVisibilityResponse { } export interface ModelPointsSizeParams { - id: string; - size: number; + id: DataId; + size: PointSize; } export interface ModelPointsSizeResponse { } export interface ModelVisibilityParams { - id: string; - visibility: boolean; + id: DataId; + visibility: Visibility; } export interface ModelVisibilityResponse { } export interface ModelRegisterParams { - id: string; + id: DataId; name: string; } @@ -749,17 +752,17 @@ export interface ModelRegisterResponse { } export interface ModelHighlightParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelHighlightResponse { } export interface ModelGetBlocksBoundsParams { - block_ids: number[]; - id: string; + block_ids: BlockIds; + id: DataId; } export interface ModelGetBlocksBoundsResponse { @@ -767,149 +770,149 @@ export interface ModelGetBlocksBoundsResponse { } export interface ModelDeregisterParams { - id: string; + id: DataId; } export interface ModelDeregisterResponse { } export interface ModelSurfacesAttributePolygonAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelSurfacesAttributePolygonAttributeResponse { } export interface ModelSurfacesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelSurfacesAttributeVertexAttributeResponse { } export interface ModelSurfacesEdgesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { } export interface ModelSurfacesEdgesWidthParams { - block_ids: number[]; - id: string; - width: number; + block_ids: BlockIds; + id: DataId; + width: EdgeWidth; } export interface ModelSurfacesEdgesWidthResponse { } export interface ModelSurfacesEdgesVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelSurfacesEdgesVisibilityResponse { } export interface ModelSurfacesEdgesColorParams { - block_ids: number[]; + block_ids: BlockIds; color: ColorRGBA; - id: string; + id: DataId; } export interface ModelSurfacesEdgesColorResponse { } export interface ModelSurfacesPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; no_data_color?: ColorRGBA; /** * Flat array of [value, r, g, b, ...] */ - points: number[]; + points: ColorMapPoints; } export interface ModelSurfacesPointsAttributeVertexAttributeResponse { } export interface ModelSurfacesPointsVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelSurfacesPointsVisibilityResponse { } export interface ModelSurfacesPointsSizeParams { - block_ids: number[]; - id: string; - size: number; + block_ids: BlockIds; + id: DataId; + size: PointSize; } export interface ModelSurfacesPointsSizeResponse { } export interface ModelSurfacesPointsColorParams { - block_ids: number[]; + block_ids: BlockIds; color: ColorRGBA; - id: string; + id: DataId; } export interface ModelSurfacesPointsColorResponse { } export interface ModelSurfacesVisibilityParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: BlockIds; + id: DataId; + visibility: Visibility; } export interface ModelSurfacesVisibilityResponse { } export interface ModelSurfacesColorParams { - block_ids: number[]; - collection_id?: string; + block_ids: BlockIds; + collection_id?: GeodeId; color?: ColorRGBA; color_mode: ColorMode; - id: string; + id: DataId; } export interface ModelSurfacesColorResponse { @@ -918,12 +921,12 @@ export interface ModelSurfacesColorResponse { export interface ModelSurfacesColorResponseColor { color: ColorRGBA; - geode_id: string; - viewer_id: number; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelSurfacesApplyTexturesParams { - id: string; + id: DataId; textures: ModelSurfacesApplyTexturesParamsTexture[]; } @@ -961,7 +964,7 @@ export interface ImportProjectResponse { } export interface ViewerUpdateDataParams { - id: string; + id: DataId; } export interface ViewerUpdateDataResponse { @@ -986,14 +989,14 @@ export interface ViewerUpdateCameraResponse { export interface ViewerThresholdParams { attributes: AttributeElement[]; - ids: string[]; + ids: DataId[]; } export interface AttributeElement { - item: number; + item: AttributeItem; location: Location; - maximum: number; - minimum: number; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; name: string; } @@ -1003,7 +1006,7 @@ export interface ViewerThresholdResponse { } export interface ViewerTakeScreenshotParams { - filename: string; + filename: Filename; height?: number; include_background: boolean; output_extension: OutputExtension; @@ -1020,7 +1023,7 @@ export interface ViewerTakeScreenshotResponse { } export interface ViewerSliceParams { - ids: string[]; + ids: DataId[]; slices: Slice[]; } @@ -1034,7 +1037,7 @@ export interface ViewerSliceResponse { } export interface ViewerShrinkParams { - ids: string[]; + ids: DataId[]; shrink_factor: number; } @@ -1051,7 +1054,7 @@ export interface ViewerSetZScalingResponse { export interface ViewerSetTextStyleParams { color: ColorRGB; font_family: FontFamily; - opacity: number; + opacity: Opacity; } export type FontFamily = "arial" | "courier" | "times"; @@ -1121,14 +1124,14 @@ export interface ViewerPreviewPointsResponse { } export interface ViewerPickedIDSParams { - ids: string[]; + ids: DataId[]; x: number; y: number; } export interface ViewerPickedIDSResponse { array_ids: string[]; - viewer_id?: number; + viewer_id?: ViewerId; } export interface ViewerPickColormapParams { @@ -1138,13 +1141,13 @@ export interface ViewerPickColormapParams { } export interface ViewerPickColormapResponse { - block_ids?: number[]; + block_ids?: BlockIds; data_id?: string; } export interface ViewerHighlightParams { field_type: PickedFieldType; - ids: string[]; + ids: DataId[]; x: number; y: number; } @@ -1154,13 +1157,13 @@ export type PickedFieldType = "CELL" | "POINT"; export interface ViewerHighlightResponse { attributes?: { [key: string]: number[] | number }; field_type?: PickedFieldType; - geode_id?: string; - id?: string; + geode_id?: GeodeId; + id?: DataId; picked_id?: number; } export interface ViewerGridScaleParams { - visibility: boolean; + visibility: Visibility; } export interface ViewerGridScaleResponse { @@ -1173,14 +1176,14 @@ export interface ViewerGetPointPositionParams { export interface ViewerExplodeParams { explode_factor: number; - ids: string[]; + ids: DataId[]; } export interface ViewerExplodeResponse { } export interface ViewerClippingPlanesParams { - ids: string[]; + ids: DataId[]; planes: Plane[]; } @@ -1194,7 +1197,7 @@ export interface ViewerClippingPlanesResponse { } export interface ViewerAxesParams { - visibility: boolean; + visibility: Visibility; } export interface ViewerAxesResponse { diff --git a/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.py b/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.py index 1f5056e6..107bed0d 100644 --- a/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.py +++ b/src/opengeodeweb_viewer/rpc/generic/schemas/deregister.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Deregister(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/generic/schemas/register.py b/src/opengeodeweb_viewer/rpc/generic/schemas/register.py index 407759c6..ff3a8fc2 100644 --- a/src/opengeodeweb_viewer/rpc/generic/schemas/register.py +++ b/src/opengeodeweb_viewer/rpc/generic/schemas/register.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Register(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId name: str diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py index f5ae3002..3130d198 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Opacity(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - opacity: float + id: DataId + opacity: OpacityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py index f5ae3002..3130d198 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Opacity(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - opacity: float + id: DataId + opacity: OpacityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py index b2776647..9c2e0b02 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import EdgeWidth from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Width(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - width: float + id: DataId + width: EdgeWidth @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py index f5ae3002..3130d198 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Opacity(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - opacity: float + id: DataId + opacity: OpacityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py index eabb9d84..03dc2f79 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import PointSize from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Size(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - size: float + id: DataId + size: PointSize @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py index cd9cd4cd..afed3873 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass @@ -19,8 +21,8 @@ class VisibilityResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType visibility_route = Route( diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py index f5ae3002..3130d198 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Opacity(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - opacity: float + id: DataId + opacity: OpacityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index 381f12ef..46b3f421 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA 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, Optional +from typing import Optional @dataclass @@ -12,12 +13,12 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py index f5ae3002..3130d198 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Opacity(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - opacity: float + id: DataId + opacity: OpacityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.py index 38c0608c..f8c3c317 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_basemap.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +15,7 @@ def __post_init__(self) -> None: crop: bool map: str - opacity: float + opacity: Opacity visible: bool @@ -32,7 +34,7 @@ def __post_init__(self) -> None: print_dataclass(self) columns: int - id: str + id: DataId layers: List[MapState] maps: List[Map] rows: int diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py index a23107cf..f3bbf803 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +12,7 @@ class Texture(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId texture_name: str @@ -20,7 +21,7 @@ class ApplyTextures(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.py index 30a4a8d6..a1e9010f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_drape.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) data_ids: List[str] - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.py index 92e589b5..0018794a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/basemap_layers.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Opacity from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +15,7 @@ def __post_init__(self) -> None: crop: bool map: str - opacity: float + opacity: Opacity visible: bool @@ -22,7 +24,7 @@ class BasemapLayers(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId layers: List[Layer] diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py index d32a6fc6..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.py index 1f5056e6..107bed0d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/deregister.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Deregister(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py index 69875d21..8d4538e0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Highlight(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: Visibility @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/register.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/register.py index 407759c6..ff3a8fc2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/register.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/register.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Register(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId name: str diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py index 2aa1879b..f2495bd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py @@ -1,10 +1,10 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +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 List @dataclass @@ -12,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py index c1231a48..f54fda05 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth +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 List @dataclass @@ -11,9 +12,9 @@ class Width(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - width: float + block_ids: BlockIds + id: DataId + width: EdgeWidth @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py index 2aa1879b..f2495bd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py @@ -1,10 +1,10 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +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 List @dataclass @@ -12,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py index b44ca502..db84284e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, PointSize +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 List @dataclass @@ -11,9 +12,9 @@ class Size(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - size: float + block_ids: BlockIds + id: DataId + size: PointSize @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index f4b30bc4..6756de69 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,12 +1,13 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId 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 enum import Enum -from typing import List, Optional +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -19,10 +20,10 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color_mode: ColorMode - id: str - collection_id: Optional[str] = None + id: DataId + collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None @@ -32,8 +33,8 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - geode_id: str - viewer_id: int + geode_id: GeodeId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index f4b30bc4..6756de69 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,12 +1,13 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId 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 enum import Enum -from typing import List, Optional +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -19,10 +20,10 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color_mode: ColorMode - id: str - collection_id: Optional[str] = None + id: DataId + collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None @@ -32,8 +33,8 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - geode_id: str - viewer_id: int + geode_id: GeodeId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py index b2776647..9c2e0b02 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import EdgeWidth from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Width(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - width: float + id: DataId + width: EdgeWidth @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py index 2aa1879b..f2495bd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py @@ -1,10 +1,10 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +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 List @dataclass @@ -12,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py index b44ca502..db84284e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, PointSize +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 List @dataclass @@ -11,9 +12,9 @@ class Size(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - size: float + block_ids: BlockIds + id: DataId + size: PointSize @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index f4b30bc4..6756de69 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,12 +1,13 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId 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 enum import Enum -from typing import List, Optional +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -19,10 +20,10 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color_mode: ColorMode - id: str - collection_id: Optional[str] = None + id: DataId + collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None @@ -32,8 +33,8 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - geode_id: str - viewer_id: int + geode_id: GeodeId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py index eabb9d84..03dc2f79 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import PointSize from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Size(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - size: float + id: DataId + size: PointSize @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/deregister.py b/src/opengeodeweb_viewer/rpc/model/schemas/deregister.py index 1f5056e6..107bed0d 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/deregister.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/deregister.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Deregister(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py index 7408a6b0..92b0e6ff 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py @@ -1,9 +1,11 @@ +from opengeodeweb_viewer.schema_types import BlockIds +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 List @dataclass @@ -11,8 +13,8 @@ class GetBlocksBounds(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str + block_ids: BlockIds + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index f599b9ce..d54c4966 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility +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 List @dataclass @@ -11,9 +12,9 @@ class Highlight(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: Visibility @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/register.py b/src/opengeodeweb_viewer/rpc/model/schemas/register.py index 407759c6..ff3a8fc2 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/register.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/register.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Register(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId name: str diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py index 330832cb..4aaf35ee 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py @@ -1,3 +1,5 @@ +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,8 +12,8 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str - visibility: bool + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py index 2aa1879b..f2495bd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py @@ -1,10 +1,10 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +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 List @dataclass @@ -12,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py index c1231a48..f54fda05 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth +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 List @dataclass @@ -11,9 +12,9 @@ class Width(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - width: float + block_ids: BlockIds + id: DataId + width: EdgeWidth @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index bcd13991..d98ae19f 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import AttributeName, 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 List, Optional +from typing import Optional @dataclass @@ -12,13 +13,13 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - item: int - maximum: float - minimum: float - name: str - points: List[float] + block_ids: BlockIds + id: DataId + item: AttributeItem + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum + name: AttributeName + points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py index 2aa1879b..f2495bd4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py @@ -1,10 +1,10 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +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 List @dataclass @@ -12,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color: ColorRGBA - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py index b44ca502..db84284e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, PointSize +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 List @dataclass @@ -11,9 +12,9 @@ class Size(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - size: float + block_ids: BlockIds + id: DataId + size: PointSize @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py index fb4caf77..4c98f949 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -20,7 +21,7 @@ class ApplyTextures(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index f4b30bc4..6756de69 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,12 +1,13 @@ -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId 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 enum import Enum -from typing import List, Optional +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -19,10 +20,10 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] + block_ids: BlockIds color_mode: ColorMode - id: str - collection_id: Optional[str] = None + id: DataId + collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None @@ -32,8 +33,8 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGBA - geode_id: str - viewer_id: int + geode_id: GeodeId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py index 1b9616b0..708caaf2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py @@ -1,9 +1,10 @@ +from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +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 List @dataclass @@ -11,9 +12,9 @@ class Visibility(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: BlockIds + id: DataId + visibility: VisibilityType @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py index a5221b12..8f2eeb8b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Axes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - visibility: bool + visibility: Visibility @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py index b4cdfeb7..c3ac3988 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from opengeodeweb_viewer.schema_types import ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +23,7 @@ class ClippingPlanes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] planes: List[Plane] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py index 61484d28..568b9131 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) explode_factor: float - ids: List[str] + ids: List[DataId] @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py index 4c41c66f..79282630 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class GridScale(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - visibility: bool + visibility: Visibility @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py index c8fbf361..efa6b23e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Dict, List, Union, Optional @@ -19,7 +20,7 @@ def __post_init__(self) -> None: print_dataclass(self) field_type: FieldType - ids: List[str] + ids: List[DataId] x: float y: float @@ -36,8 +37,8 @@ def __post_init__(self) -> None: attributes: Optional[Dict[str, Union[float, List[float]]]] = None field_type: Optional[PickedFieldType] = None - geode_id: Optional[str] = None - id: Optional[str] = None + geode_id: Optional[GeodeId] = None + id: Optional[DataId] = None picked_id: Optional[int] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index 6b764a23..c25a7926 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,6 +1,7 @@ +from opengeodeweb_viewer.schema_types import BlockIds from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import List, Optional +from typing import Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass @@ -20,7 +21,7 @@ class PickColormapResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: Optional[List[int]] = None + block_ids: Optional[BlockIds] = None data_id: Optional[str] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 0d05f146..d47016a1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -12,7 +13,7 @@ class PickedIDS(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] x: float y: float @@ -23,7 +24,7 @@ def __post_init__(self) -> None: print_dataclass(self) array_ids: List[str] - viewer_id: Optional[int] = None + viewer_id: Optional[ViewerId] = None picked_ids_route = Route( diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py index c68a8db8..966083be 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ColorRGB +from opengeodeweb_viewer.schema_types import ColorRGB, Opacity from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -20,7 +20,7 @@ def __post_init__(self) -> None: color: ColorRGB font_family: FontFamily - opacity: float + opacity: Opacity @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py index cb927df5..42c27167 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +12,7 @@ class Shrink(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] shrink_factor: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py index 92c32ebd..8909155e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -20,7 +21,7 @@ class Slice(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] slices: List[SliceElement] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index 6d76d882..3aef17a5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Any @@ -18,7 +19,7 @@ class TakeScreenshot(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - filename: str + filename: Filename include_background: bool output_extension: OutputExtension height: Optional[int] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py index 71e8b2ed..cbe415ac 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py @@ -1,3 +1,5 @@ +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -17,10 +19,10 @@ class Attribute(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - item: int + item: AttributeItem location: Location - maximum: float - minimum: float + maximum: AttributeRangeMaximum + minimum: AttributeRangeMinimum name: str @@ -30,7 +32,7 @@ def __post_init__(self) -> None: print_dataclass(self) attributes: List[Attribute] - ids: List[str] + ids: List[DataId] @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py index 50fc4e9c..c1d02946 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py @@ -1,3 +1,4 @@ +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class UpdateData(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - id: str + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json index d22727a5..c6f48784 100644 --- a/src/opengeodeweb_viewer/schema_definitions.json +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -7,6 +7,12 @@ "type": "string", "minLength": 1 }, + "AttributeRangeMaximum": { + "type": "number" + }, + "AttributeRangeMinimum": { + "type": "number" + }, "BlockIds": { "type": "array", "items": { From 309ee6edd37631ef02ce0126d63d32a233b561cd Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 16:31:13 +0100 Subject: [PATCH 08/14] fix(schemas): one line field descriptions on the line of their field Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_typed_schemas.d.ts | 110 +++++-------------------- 1 file changed, 22 insertions(+), 88 deletions(-) diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 816c38b8..295b4f99 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -26,10 +26,7 @@ export interface MeshCellsAttributeCellAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } /** @@ -45,10 +42,7 @@ export interface MeshCellsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshCellsAttributeVertexAttributeResponse { @@ -85,10 +79,7 @@ export interface MeshEdgesAttributeEdgeAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshEdgesAttributeEdgeAttributeResponse { @@ -101,10 +92,7 @@ export interface MeshEdgesAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshEdgesAttributeVertexAttributeResponse { @@ -149,10 +137,7 @@ export interface MeshPointsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPointsAttributeVertexAttributeResponse { @@ -199,10 +184,7 @@ export interface MeshPolygonsAttributePolygonAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolygonsAttributePolygonAttributeResponse { @@ -215,10 +197,7 @@ export interface MeshPolygonsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolygonsAttributeVertexAttributeResponse { @@ -255,10 +234,7 @@ export interface MeshPolyhedraAttributePolyhedronAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolyhedraAttributePolyhedronAttributeResponse { @@ -271,10 +247,7 @@ export interface MeshPolyhedraAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolyhedraAttributeVertexAttributeResponse { @@ -411,10 +384,7 @@ export interface ModelBlocksAttributePolyhedronAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksAttributePolyhedronAttributeResponse { @@ -428,10 +398,7 @@ export interface ModelBlocksAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksAttributeVertexAttributeResponse { @@ -445,10 +412,7 @@ export interface ModelBlocksEdgesAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksEdgesAttributeVertexAttributeResponse { @@ -489,10 +453,7 @@ export interface ModelBlocksPointsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksPointsAttributeVertexAttributeResponse { @@ -562,10 +523,7 @@ export interface ModelCornersAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelCornersAttributeVertexAttributeResponse { @@ -622,10 +580,7 @@ export interface ModelLinesAttributeEdgeAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelLinesAttributeEdgeAttributeResponse { @@ -639,10 +594,7 @@ export interface ModelLinesAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelLinesAttributeVertexAttributeResponse { @@ -656,10 +608,7 @@ export interface ModelLinesPointsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelLinesPointsAttributeVertexAttributeResponse { @@ -784,10 +733,7 @@ export interface ModelSurfacesAttributePolygonAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesAttributePolygonAttributeResponse { @@ -801,10 +747,7 @@ export interface ModelSurfacesAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesAttributeVertexAttributeResponse { @@ -818,10 +761,7 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { @@ -862,10 +802,7 @@ export interface ModelSurfacesPointsAttributeVertexAttributeParams { minimum: AttributeRangeMinimum; name: AttributeName; no_data_color?: ColorRGBA; - /** - * Flat array of [value, r, g, b, ...] - */ - points: ColorMapPoints; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesPointsAttributeVertexAttributeResponse { @@ -1016,10 +953,7 @@ export interface ViewerTakeScreenshotParams { export type OutputExtension = "png" | "jpg"; export interface ViewerTakeScreenshotResponse { - /** - * Image file content, sent as binary - */ - blob: any; + blob: any; // Image file content, sent as binary } export interface ViewerSliceParams { From a77bef6a0c4d26819c30f978710fe3daa8197aa6 Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 17:05:54 +0100 Subject: [PATCH 09/14] fix(schemas): define ViewerId, AttributeName, Filename and Point3D OpenGeodeWeb-Microservice only defines DataId and GeodeId. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_typed_schemas.d.ts | 4 +-- .../cells/attribute/cell/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../edges/attribute/edge/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/polygon/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/polyhedron/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/polyhedron/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../rpc/model/blocks/schemas/color.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../rpc/model/corners/schemas/color.py | 4 +-- .../lines/attribute/edge/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../rpc/model/lines/schemas/color.py | 4 +-- .../attribute/polygon/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../attribute/vertex/schemas/attribute.py | 4 +-- .../rpc/model/surfaces/schemas/color.py | 4 +-- .../rpc/viewer/schemas/picked_ids.py | 3 +- .../rpc/viewer/schemas/preview_points.py | 2 +- .../rpc/viewer/schemas/take_screenshot.py | 2 +- src/opengeodeweb_viewer/schema_types.d.ts | 9 ++++++ src/opengeodeweb_viewer/schema_types.json | 31 +++++++++++++++++++ src/opengeodeweb_viewer/schema_types.py | 17 ++++++++++ 32 files changed, 113 insertions(+), 55 deletions(-) diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 295b4f99..3ec95602 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1,8 +1,8 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_viewer_schemas.json"; -import type { AttributeName, DataId, Filename, GeodeId, Point3D, ViewerId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Opacity, PointSize, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; +import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; +import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { id: DataId; diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index 46b3f421..0316dde5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_microservice.schema_types import AttributeName, DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index 6756de69..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA -from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index 6756de69..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA -from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index 6756de69..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA -from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index d98ae19f..8741a05b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA -from opengeodeweb_microservice.schema_types import AttributeName, DataId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index 6756de69..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,5 +1,5 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA -from opengeodeweb_microservice.schema_types import DataId, GeodeId, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index d47016a1..d9b399f3 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,4 +1,5 @@ -from opengeodeweb_microservice.schema_types import DataId, ViewerId +from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py index e2ba6f46..e2df98fa 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py @@ -1,4 +1,4 @@ -from opengeodeweb_microservice.schema_types import Point3D +from opengeodeweb_viewer.schema_types import Point3D from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index 3aef17a5..6daecf75 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py @@ -1,4 +1,4 @@ -from opengeodeweb_microservice.schema_types import Filename +from opengeodeweb_viewer.schema_types import Filename from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Any diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index 2a656097..f6dd9871 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -1,5 +1,8 @@ // Generated by generate_schema_types.js from schema_types.json: do not edit +export type ViewerId = number; +export type AttributeName = string; +export type Filename = string; export type BlockIds = number[]; export type Visibility = boolean; export type Opacity = number; @@ -10,6 +13,12 @@ export type AttributeItem = number; export type AttributeRangeMinimum = number; export type AttributeRangeMaximum = number; +export interface Point3D { + x: number; + y: number; + z: number; +} + export interface ColorRGB { blue: number; green: number; diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json index 6ac25503..5b31a7e5 100644 --- a/src/opengeodeweb_viewer/schema_types.json +++ b/src/opengeodeweb_viewer/schema_types.json @@ -1,4 +1,35 @@ { + "ViewerId": { + "type": "integer" + }, + "AttributeName": { + "type": "string", + "minLength": 1 + }, + "Filename": { + "type": "string", + "minLength": 1 + }, + "Point3D": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + } + }, + "required": [ + "x", + "y", + "z" + ], + "additionalProperties": false + }, "BlockIds": { "type": "array", "items": { diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index 24e019fb..e4941e7a 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -5,6 +5,9 @@ from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass +ViewerId = int +AttributeName = str +Filename = str BlockIds = list[int] Visibility = bool Opacity = float @@ -16,6 +19,16 @@ AttributeRangeMaximum = float +@dataclass +class Point3D(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + x: float + y: float + z: float + + @dataclass class ColorRGB(DataClassJsonMixin): def __post_init__(self) -> None: @@ -33,6 +46,7 @@ class ColorRGBA(ColorRGB): __all__ = [ "AttributeItem", + "AttributeName", "AttributeRangeMaximum", "AttributeRangeMinimum", "BlockIds", @@ -40,7 +54,10 @@ class ColorRGBA(ColorRGB): "ColorRGB", "ColorRGBA", "EdgeWidth", + "Filename", "Opacity", + "Point3D", "PointSize", + "ViewerId", "Visibility", ] From 02f17be7331108edb5a190f13d8bba2d792b29e0 Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Thu, 19 Nov 2026 17:13:31 +0100 Subject: [PATCH 10/14] fix(schemas): BlockIds is an array of ViewerId Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/schema_types.d.ts | 2 +- src/opengeodeweb_viewer/schema_types.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index f6dd9871..cdeab9a0 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -3,7 +3,7 @@ export type ViewerId = number; export type AttributeName = string; export type Filename = string; -export type BlockIds = number[]; +export type BlockIds = ViewerId[]; export type Visibility = boolean; export type Opacity = number; export type PointSize = number; diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index e4941e7a..a68e0676 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -8,7 +8,7 @@ ViewerId = int AttributeName = str Filename = str -BlockIds = list[int] +BlockIds = list[ViewerId] Visibility = bool Opacity = float PointSize = float From 79b1b9182106b13122abd9e3816363a77d9a4600 Mon Sep 17 00:00:00 2001 From: JulienChampagnol <91873154+JulienChampagnol@users.noreply.github.com> Date: Fri, 20 Nov 2026 09:33:04 +0000 Subject: [PATCH 11/14] Apply prepare changes --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e87b5c40..0e8e27eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,4 +61,3 @@ wslink==2.6.0 yarl==1.* # via aiohttp -opengeodeweb-microservice==1.*,>=1.3.3 From 3f58c8c249a89cbf45280ac592a8adcffcc9d10a Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Fri, 20 Nov 2026 10:55:10 +0100 Subject: [PATCH 12/14] fix(schemas): declare the response of get_point_position Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_typed_schemas.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 3ec95602..24a4bdd5 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1108,6 +1108,8 @@ export interface ViewerGetPointPositionParams { y: number; } +export type ViewerGetPointPositionResponse = Point3D; + export interface ViewerExplodeParams { explode_factor: number; ids: DataId[]; From c2aa4c7716bbf53a8d52d0d95355d803a619f61c Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Fri, 20 Nov 2026 11:08:39 +0100 Subject: [PATCH 13/14] fix(schemas): highlight, get_blocks_bounds and pick_colormap take no block Like before BlockIds, their block_ids may be empty (e.g. to unhighlight every block): an array of ViewerId, BlockIds requiring at least one. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 12 +++--------- opengeodeweb_viewer_typed_schemas.d.ts | 6 +++--- .../rpc/model/schemas/get_blocks_bounds.json | 5 ++++- .../rpc/model/schemas/get_blocks_bounds.py | 6 +++--- .../rpc/model/schemas/highlight.json | 5 ++++- .../rpc/model/schemas/highlight.py | 5 +++-- .../rpc/viewer/schemas/pick_colormap.json | 5 ++++- .../rpc/viewer/schemas/pick_colormap.py | 6 +++--- 8 files changed, 27 insertions(+), 23 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index d0463c7d..1a96c844 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -3896,13 +3896,11 @@ "maxLength": 32 }, "block_ids": { - "title": "BlockIds", "type": "array", "items": { "title": "ViewerId", "type": "integer" - }, - "minItems": 1 + } }, "visibility": { "title": "Visibility", @@ -3934,13 +3932,11 @@ "maxLength": 32 }, "block_ids": { - "title": "BlockIds", "type": "array", "items": { "title": "ViewerId", "type": "integer" - }, - "minItems": 1 + } } }, "required": [ @@ -5653,13 +5649,11 @@ "type": "string" }, "block_ids": { - "title": "BlockIds", "type": "array", "items": { "title": "ViewerId", "type": "integer" - }, - "minItems": 1 + } } }, "required": [], diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 24a4bdd5..6fc78094 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -701,7 +701,7 @@ export interface ModelRegisterResponse { } export interface ModelHighlightParams { - block_ids: BlockIds; + block_ids: ViewerId[]; id: DataId; visibility: Visibility; } @@ -710,7 +710,7 @@ export interface ModelHighlightResponse { } export interface ModelGetBlocksBoundsParams { - block_ids: BlockIds; + block_ids: ViewerId[]; id: DataId; } @@ -1075,7 +1075,7 @@ export interface ViewerPickColormapParams { } export interface ViewerPickColormapResponse { - block_ids?: BlockIds; + block_ids?: ViewerId[]; data_id?: string; } diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json index bcfbbbf0..e18d81eb 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json @@ -6,7 +6,10 @@ "title": "DataId" }, "block_ids": { - "title": "BlockIds" + "type": "array", + "items": { + "title": "ViewerId" + } } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py index 92b0e6ff..52c25f36 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py @@ -1,11 +1,11 @@ -from opengeodeweb_viewer.schema_types import BlockIds +from opengeodeweb_viewer.schema_types import ViewerId 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 List @dataclass @@ -13,7 +13,7 @@ class GetBlocksBounds(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: BlockIds + block_ids: List[ViewerId] id: DataId diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 2b6c03e4..9cf83bd8 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -6,7 +6,10 @@ "title": "DataId" }, "block_ids": { - "title": "BlockIds" + "type": "array", + "items": { + "title": "ViewerId" + } }, "visibility": { "title": "Visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index d54c4966..daa9528c 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,10 +1,11 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility +from opengeodeweb_viewer.schema_types import ViewerId, Visibility 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 List @dataclass @@ -12,7 +13,7 @@ class Highlight(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: BlockIds + block_ids: List[ViewerId] id: DataId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index bf74cbd1..2c7a1a31 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -21,7 +21,10 @@ "type": "string" }, "block_ids": { - "title": "BlockIds" + "type": "array", + "items": { + "title": "ViewerId" + } } }, "required": [], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index c25a7926..2abd49ff 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,7 +1,7 @@ -from opengeodeweb_viewer.schema_types import BlockIds +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema -from typing import Optional +from typing import List, Optional from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass @@ -21,7 +21,7 @@ class PickColormapResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: Optional[BlockIds] = None + block_ids: Optional[List[ViewerId]] = None data_id: Optional[str] = None From e43bae6919c2d1c0fcbc7346936b02b556bb537c Mon Sep 17 00:00:00 2001 From: JulienChampagnol Date: Fri, 20 Nov 2026 15:05:52 +0100 Subject: [PATCH 14/14] fix(schemas): the array_ids picked_ids returns are DataId They are the picked ones among the ids of its params, which are DataId. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 5 ++++- opengeodeweb_viewer_typed_schemas.d.ts | 2 +- src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json | 2 +- src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index 1a96c844..49116a62 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -5611,7 +5611,10 @@ "array_ids": { "type": "array", "items": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "viewer_id": { diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 6fc78094..bf9e5122 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1064,7 +1064,7 @@ export interface ViewerPickedIDSParams { } export interface ViewerPickedIDSResponse { - array_ids: string[]; + array_ids: DataId[]; viewer_id?: ViewerId; } diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index d736ad1b..39f295f8 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -27,7 +27,7 @@ "array_ids": { "type": "array", "items": { - "type": "string" + "title": "DataId" } }, "viewer_id": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index d9b399f3..290b6083 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -24,7 +24,7 @@ class PickedIDSResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - array_ids: List[str] + array_ids: List[DataId] viewer_id: Optional[ViewerId] = None