diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index d0cf0494..49116a62 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,33 +62,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -143,33 +152,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -226,11 +242,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -252,11 +270,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -280,11 +300,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -339,33 +361,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -422,33 +451,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -505,11 +541,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -531,11 +569,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -557,11 +597,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -585,11 +627,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -644,33 +688,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -727,11 +778,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -744,9 +797,13 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -763,11 +820,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -789,11 +848,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -817,11 +878,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -876,33 +939,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -959,33 +1029,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1042,11 +1119,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1068,11 +1147,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1096,11 +1177,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1155,33 +1238,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1238,33 +1328,40 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1321,11 +1418,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1347,11 +1446,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1375,11 +1476,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1431,11 +1534,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1457,6 +1562,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1483,11 +1589,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -1509,6 +1617,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1531,11 +1640,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1586,6 +1697,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1603,6 +1715,7 @@ "type": "boolean" }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1639,6 +1752,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1668,6 +1782,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1682,6 +1797,7 @@ "minLength": 1 }, "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1714,6 +1830,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -1770,6 +1887,7 @@ "type": "boolean" }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -1814,40 +1932,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1905,40 +2032,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -1999,40 +2135,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2090,18 +2235,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 +2273,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 +2311,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,40 +2382,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2316,18 +2482,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 +2520,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 +2558,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 +2626,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 +2664,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 +2686,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2554,26 +2741,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,40 +2809,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2701,18 +2909,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 +2947,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 +2969,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -2807,26 +3024,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 +3090,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "width": { + "title": "EdgeWidth", "type": "number" } }, @@ -2887,11 +3118,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -2917,40 +3150,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3008,40 +3250,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3102,40 +3353,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3193,18 +3453,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 +3491,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 +3529,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 +3597,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 +3635,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 +3657,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3431,26 +3712,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 +3778,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3511,11 +3806,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -3538,11 +3835,13 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3564,6 +3863,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3590,6 +3890,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3597,10 +3898,12 @@ "block_ids": { "type": "array", "items": { + "title": "ViewerId", "type": "integer" } }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -3623,6 +3926,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3630,6 +3934,7 @@ "block_ids": { "type": "array", "items": { + "title": "ViewerId", "type": "integer" } } @@ -3663,6 +3968,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -3688,40 +3994,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3779,40 +4094,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3873,40 +4197,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -3964,18 +4297,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 +4335,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 +4373,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,40 +4444,49 @@ "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" }, "minItems": 8 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" }, "no_data_color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4190,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 }, "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -4224,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 }, "size": { + "title": "PointSize", "type": "number" } }, @@ -4258,18 +4620,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 +4688,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 +4726,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 +4748,13 @@ ] }, "collection_id": { + "title": "GeodeId", "type": "string", "minLength": 36, "maxLength": 36 }, "color": { + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -4428,26 +4803,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 +4867,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4593,6 +4981,7 @@ "type": "object", "properties": { "id": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4680,6 +5069,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4702,13 +5092,16 @@ ] }, "item": { + "title": "AttributeItem", "type": "integer", "minimum": 0 }, "minimum": { + "title": "AttributeRangeMinimum", "type": "number" }, "maximum": { + "title": "AttributeRangeMaximum", "type": "number" } }, @@ -4741,6 +5134,7 @@ "type": "object", "properties": { "filename": { + "title": "Filename", "type": "string", "minLength": 1 }, @@ -4793,6 +5187,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4852,6 +5247,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -4902,29 +5298,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 +5333,7 @@ ] }, "opacity": { + "title": "Opacity", "type": "number", "minimum": 0, "maximum": 1 @@ -4985,28 +5382,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 +5533,7 @@ "points": { "type": "array", "items": { + "title": "Point3D", "type": "object", "properties": { "x": { @@ -5193,8 +5592,10 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", - "minLength": 1 + "minLength": 32, + "maxLength": 32 } } }, @@ -5210,10 +5611,14 @@ "array_ids": { "type": "array", "items": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 } }, "viewer_id": { + "title": "ViewerId", "type": "integer" } }, @@ -5249,6 +5654,7 @@ "block_ids": { "type": "array", "items": { + "title": "ViewerId", "type": "integer" } } @@ -5277,6 +5683,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5294,7 +5701,10 @@ "type": "object", "properties": { "id": { - "type": "string" + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 }, "picked_id": { "type": "integer" @@ -5307,7 +5717,10 @@ ] }, "geode_id": { - "type": "string" + "title": "GeodeId", + "type": "string", + "minLength": 36, + "maxLength": 36 }, "attributes": { "type": "object", @@ -5336,6 +5749,7 @@ "type": "object", "properties": { "visibility": { + "title": "Visibility", "type": "boolean" } }, @@ -5396,6 +5810,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5427,6 +5842,7 @@ "ids": { "type": "array", "items": { + "title": "DataId", "type": "string", "minLength": 32, "maxLength": 32 @@ -5454,7 +5870,7 @@ "maxItems": 3 }, "color": { - "title": "PlaneColor", + "title": "ColorRGBA", "type": "object", "properties": { "red": { @@ -5513,6 +5929,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..bf9e5122 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1,8 +1,11 @@ // Generated by opengeodeweb-microservice-generate, do not edit. import type json from "./opengeodeweb_viewer_schemas.json"; +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: string; + id: DataId; name: string; } @@ -10,402 +13,280 @@ 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; - no_data_color?: MeshCellsAttributeCellAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshCellsAttributeCellAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; -} - + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] +} + +/** + * Flat array of [value, r, g, b, ...] + */ export interface MeshCellsAttributeCellAttributeResponse { } export interface MeshCellsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshCellsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshCellsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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 { } export interface MeshCellsColorParams { - color: MeshCellsColorParamsColor; - id: string; -} - -export interface MeshCellsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + id: DataId; } export interface MeshCellsColorResponse { } export interface MeshEdgesAttributeEdgeAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshEdgesAttributeEdgeAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshEdgesAttributeEdgeAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshEdgesAttributeEdgeAttributeResponse { } export interface MeshEdgesAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshEdgesAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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 { } export interface MeshEdgesColorParams { - color: MeshEdgesColorParamsColor; - id: string; -} - -export interface MeshEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + id: DataId; } export interface MeshEdgesColorResponse { } export interface MeshPointsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshPointsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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 { } export interface MeshPointsColorParams { - color: MeshPointsColorParamsColor; - id: string; -} - -export interface MeshPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + id: DataId; } export interface MeshPointsColorResponse { } export interface MeshPolygonsAttributePolygonAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshPolygonsAttributePolygonAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshPolygonsAttributePolygonAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolygonsAttributePolygonAttributeResponse { } export interface MeshPolygonsAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshPolygonsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshPolygonsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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 { } export interface MeshPolygonsColorParams { - color: MeshPolygonsColorParamsColor; - id: string; -} - -export interface MeshPolygonsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + id: DataId; } export interface MeshPolygonsColorResponse { } export interface MeshPolyhedraAttributePolyhedronAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshPolyhedraAttributePolyhedronAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshPolyhedraAttributePolyhedronAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface MeshPolyhedraAttributePolyhedronAttributeResponse { } export interface MeshPolyhedraAttributeVertexAttributeParams { - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: MeshPolyhedraAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface MeshPolyhedraAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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 { } export interface MeshPolyhedraColorParams { - color: MeshPolyhedraColorParamsColor; - id: string; -} - -export interface MeshPolyhedraColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + 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; } @@ -413,44 +294,37 @@ 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 { } export interface MeshColorParams { - color: MeshColorParamsColor; - id: string; -} - -export interface MeshColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + 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; } @@ -459,19 +333,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; } @@ -481,7 +355,7 @@ export interface MeshApplyTexturesResponse { export interface MeshApplyBasemapParams { columns: number; detail_of?: string; - id: string; + id: DataId; layers: MapState[]; maps: Map[]; rows: number; @@ -490,7 +364,7 @@ export interface MeshApplyBasemapParams { export interface MapState { crop: boolean; map: string; - opacity: number; + opacity: Opacity; visible: boolean; } @@ -503,191 +377,130 @@ export interface MeshApplyBasemapResponse { } export interface ModelBlocksAttributePolyhedronAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelBlocksAttributePolyhedronAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelBlocksAttributePolyhedronAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksAttributePolyhedronAttributeResponse { } export interface ModelBlocksAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelBlocksAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelBlocksAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelBlocksAttributeVertexAttributeResponse { } export interface ModelBlocksEdgesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelBlocksEdgesAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelBlocksEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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[]; - color: ModelBlocksEdgesColorParamsColor; - id: string; -} - -export interface ModelBlocksEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; } export interface ModelBlocksEdgesColorResponse { } export interface ModelBlocksPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelBlocksPointsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelBlocksPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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[]; - color: ModelBlocksPointsColorParamsColor; - id: string; -} - -export interface ModelBlocksPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + color: ColorRGBA; + 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; - color?: ModelBlocksColorParamsColor; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; color_mode: ColorMode; - id: string; -} - -export interface ModelBlocksColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; } export type ColorMode = "constant" | "random"; @@ -697,64 +510,40 @@ export interface ModelBlocksColorResponse { } export interface ModelBlocksColorResponseColor { - color: PurpleColorRGBA; - geode_id: string; - viewer_id: number; -} - -export interface PurpleColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelCornersAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelCornersAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelCornersAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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; - color?: ModelCornersColorParamsColor; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; color_mode: ColorMode; - id: string; -} - -export interface ModelCornersColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; } export interface ModelCornersColorResponse { @@ -762,162 +551,111 @@ export interface ModelCornersColorResponse { } export interface ModelCornersColorResponseColor { - color: FluffyColorRGBA; - geode_id: string; - viewer_id: number; -} - -export interface FluffyColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + 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; - no_data_color?: ModelLinesAttributeEdgeAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelLinesAttributeEdgeAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelLinesAttributeEdgeAttributeResponse { } export interface ModelLinesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelLinesAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelLinesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelLinesAttributeVertexAttributeResponse { } export interface ModelLinesPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelLinesPointsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelLinesPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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[]; - color: ModelLinesPointsColorParamsColor; - id: string; -} - -export interface ModelLinesPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + color: ColorRGBA; + 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; - color?: ModelLinesColorParamsColor; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; color_mode: ColorMode; - id: string; -} - -export interface ModelLinesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; } export interface ModelLinesColorResponse { @@ -925,44 +663,37 @@ export interface ModelLinesColorResponse { } export interface ModelLinesColorResponseColor { - color: TentacledColorRGBA; - geode_id: string; - viewer_id: number; -} - -export interface TentacledColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + 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; } @@ -970,17 +701,17 @@ export interface ModelRegisterResponse { } export interface ModelHighlightParams { - block_ids: number[]; - id: string; - visibility: boolean; + block_ids: ViewerId[]; + id: DataId; + visibility: Visibility; } export interface ModelHighlightResponse { } export interface ModelGetBlocksBoundsParams { - block_ids: number[]; - id: string; + block_ids: ViewerId[]; + id: DataId; } export interface ModelGetBlocksBoundsResponse { @@ -988,198 +719,137 @@ 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; - no_data_color?: ModelSurfacesAttributePolygonAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelSurfacesAttributePolygonAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesAttributePolygonAttributeResponse { } export interface ModelSurfacesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelSurfacesAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelSurfacesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } export interface ModelSurfacesAttributeVertexAttributeResponse { } export interface ModelSurfacesEdgesAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelSurfacesEdgesAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelSurfacesEdgesAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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[]; - color: ModelSurfacesEdgesColorParamsColor; - id: string; -} - -export interface ModelSurfacesEdgesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; } export interface ModelSurfacesEdgesColorResponse { } export interface ModelSurfacesPointsAttributeVertexAttributeParams { - block_ids: number[]; - id: string; - item: number; - maximum: number; - minimum: number; - name: string; - no_data_color?: ModelSurfacesPointsAttributeVertexAttributeParamsNoDataColor; - /** - * Flat array of [value, r, g, b, ...] - */ - points: number[]; -} - -export interface ModelSurfacesPointsAttributeVertexAttributeParamsNoDataColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] } 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[]; - color: ModelSurfacesPointsColorParamsColor; - id: string; -} - -export interface ModelSurfacesPointsColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + block_ids: BlockIds; + color: ColorRGBA; + 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; - color?: ModelSurfacesColorParamsColor; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; color_mode: ColorMode; - id: string; -} - -export interface ModelSurfacesColorParamsColor { - alpha: number; - blue: number; - green: number; - red: number; + id: DataId; } export interface ModelSurfacesColorResponse { @@ -1187,20 +857,13 @@ export interface ModelSurfacesColorResponse { } export interface ModelSurfacesColorResponseColor { - color: StickyColorRGBA; - geode_id: string; - viewer_id: number; -} - -export interface StickyColorRGBA { - alpha: number; - blue: number; - green: number; - red: number; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelSurfacesApplyTexturesParams { - id: string; + id: DataId; textures: ModelSurfacesApplyTexturesParamsTexture[]; } @@ -1238,7 +901,7 @@ export interface ImportProjectResponse { } export interface ViewerUpdateDataParams { - id: string; + id: DataId; } export interface ViewerUpdateDataResponse { @@ -1263,14 +926,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; } @@ -1280,7 +943,7 @@ export interface ViewerThresholdResponse { } export interface ViewerTakeScreenshotParams { - filename: string; + filename: Filename; height?: number; include_background: boolean; output_extension: OutputExtension; @@ -1290,14 +953,11 @@ 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 { - ids: string[]; + ids: DataId[]; slices: Slice[]; } @@ -1311,7 +971,7 @@ export interface ViewerSliceResponse { } export interface ViewerShrinkParams { - ids: string[]; + ids: DataId[]; shrink_factor: number; } @@ -1326,15 +986,9 @@ export interface ViewerSetZScalingResponse { } export interface ViewerSetTextStyleParams { - color: TextColor; + color: ColorRGB; font_family: FontFamily; - opacity: number; -} - -export interface TextColor { - b: number; - g: number; - r: number; + opacity: Opacity; } export type FontFamily = "arial" | "courier" | "times"; @@ -1352,13 +1006,7 @@ export interface ViewerSetOrientationWidgetResponse { } export interface ViewerSetBackgroundColorParams { - color: ViewerSetBackgroundColorParamsColor; -} - -export interface ViewerSetBackgroundColorParamsColor { - b: number; - g: number; - r: number; + color: ColorRGB; } export interface ViewerSetBackgroundColorResponse { @@ -1400,30 +1048,24 @@ 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 { } export interface ViewerPickedIDSParams { - ids: string[]; + ids: DataId[]; x: number; y: number; } export interface ViewerPickedIDSResponse { - array_ids: string[]; - viewer_id?: number; + array_ids: DataId[]; + viewer_id?: ViewerId; } export interface ViewerPickColormapParams { @@ -1433,13 +1075,13 @@ export interface ViewerPickColormapParams { } export interface ViewerPickColormapResponse { - block_ids?: number[]; + block_ids?: ViewerId[]; data_id?: string; } export interface ViewerHighlightParams { field_type: PickedFieldType; - ids: string[]; + ids: DataId[]; x: number; y: number; } @@ -1449,13 +1091,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 { @@ -1466,43 +1108,32 @@ export interface ViewerGetPointPositionParams { y: number; } -export interface ViewerGetPointPositionResponse { - x: number; - y: number; - z: number; -} +export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { explode_factor: number; - ids: string[]; + ids: DataId[]; } export interface ViewerExplodeResponse { } export interface ViewerClippingPlanesParams { - ids: string[]; + ids: DataId[]; planes: Plane[]; } 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 { } export interface ViewerAxesParams { - visibility: boolean; + visibility: Visibility; } export interface ViewerAxesResponse { 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/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/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 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/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.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/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.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index c0d43ed4..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 @@ -3,63 +3,25 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,15 +13,15 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -47,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/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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.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_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.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/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.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_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.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/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.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..eb65cb56 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -1,3 +1,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -5,24 +7,13 @@ 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 - id: str + color: ColorRGBA + id: DataId @dataclass @@ -39,4 +30,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/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.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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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,20 +1,10 @@ +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 -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int @dataclass @@ -22,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - color: ColorClass - id: str + block_ids: BlockIds + color: ColorRGBA + id: DataId @dataclass @@ -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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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,20 +1,10 @@ +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 -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int @dataclass @@ -22,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - color: ColorClass - id: str + block_ids: BlockIds + color: ColorRGBA + id: DataId @dataclass @@ -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/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.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/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.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..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,22 +1,13 @@ +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 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 - - -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -29,22 +20,11 @@ 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 - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + id: DataId + collection_id: Optional[GeodeId] = None + color: Optional[ColorRGBA] = None @dataclass @@ -53,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 @@ -71,4 +51,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/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.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,22 +1,13 @@ +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 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 - - -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -29,22 +20,11 @@ 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 - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + id: DataId + collection_id: Optional[GeodeId] = None + color: Optional[ColorRGBA] = None @dataclass @@ -53,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 @@ -71,4 +51,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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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,20 +1,10 @@ +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 -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int @dataclass @@ -22,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - color: ColorClass - id: str + block_ids: BlockIds + color: ColorRGBA + id: DataId @dataclass @@ -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/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.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/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.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..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,22 +1,13 @@ +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 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 - - -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -29,22 +20,11 @@ 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 - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + id: DataId + collection_id: Optional[GeodeId] = None + color: Optional[ColorRGBA] = None @dataclass @@ -53,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 @@ -71,4 +51,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/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.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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json index 8f3a692d..e18d81eb 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json @@ -3,14 +3,12 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { "type": "array", "items": { - "type": "integer" + "title": "ViewerId" } } }, 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..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,3 +1,5 @@ +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 dataclasses_json import DataClassJsonMixin @@ -11,8 +13,8 @@ class GetBlocksBounds(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str + block_ids: List[ViewerId] + id: DataId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 034c7dd6..9cf83bd8 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -3,18 +3,16 @@ "type": "object", "properties": { "id": { - "type": "string", - "minLength": 32, - "maxLength": 32 + "title": "DataId" }, "block_ids": { "type": "array", "items": { - "type": "integer" + "title": "ViewerId" } }, "visibility": { - "type": "boolean" + "title": "Visibility" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index f599b9ce..daa9528c 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,3 +1,5 @@ +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 @@ -11,9 +13,9 @@ class Highlight(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - id: str - visibility: bool + block_ids: List[ViewerId] + id: DataId + visibility: Visibility @dataclass 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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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,20 +1,10 @@ +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 -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int @dataclass @@ -22,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - color: ColorClass - id: str + block_ids: BlockIds + color: ColorRGBA + id: DataId @dataclass @@ -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/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.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/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.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index bf36e3b9..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 @@ -3,70 +3,28 @@ "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" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" }, "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..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,20 +1,11 @@ +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 from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -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 +from typing import Optional @dataclass @@ -22,16 +13,16 @@ 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[NoDataColor] = None + no_data_color: Optional[ColorRGBA] = None @dataclass @@ -48,4 +39,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..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,20 +1,10 @@ +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 -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int @dataclass @@ -22,9 +12,9 @@ class Color(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[int] - color: ColorClass - id: str + block_ids: BlockIds + color: ColorRGBA + id: DataId @dataclass @@ -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/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.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/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.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/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.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..b828df8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,22 +1,13 @@ +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 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 - - -@dataclass -class ColorClass(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int +from dataclasses import dataclass +from typing import Optional class ColorMode(Enum): @@ -29,22 +20,11 @@ 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 - color: Optional[ColorClass] = None - - -@dataclass -class ColorRGBA(DataClassJsonMixin): - def __post_init__(self) -> None: - print_dataclass(self) - - alpha: float - blue: int - green: int - red: int + id: DataId + collection_id: Optional[GeodeId] = None + color: Optional[ColorRGBA] = None @dataclass @@ -53,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 @@ -71,4 +51,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/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.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/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.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..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,5 @@ +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 from dataclasses_json import DataClassJsonMixin @@ -6,17 +8,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 +15,7 @@ def __post_init__(self) -> None: normal: List[float] origin: List[float] - color: Optional[PlaneColor] = None + color: Optional[ColorRGBA] = None @dataclass @@ -32,7 +23,7 @@ class ClippingPlanes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] planes: List[Plane] @@ -50,4 +41,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/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.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/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.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/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.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index 497e0836..2c7a1a31 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -23,7 +23,7 @@ "block_ids": { "type": "array", "items": { - "type": "integer" + "title": "ViewerId" } } }, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index 6b764a23..2abd49ff 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -20,7 +21,7 @@ class PickColormapResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: Optional[List[int]] = None + block_ids: Optional[List[ViewerId]] = None data_id: Optional[str] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index a8e9227c..39f295f8 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", @@ -24,14 +27,16 @@ "array_ids": { "type": "array", "items": { - "type": "string" + "title": "DataId" } }, "viewer_id": { - "type": "integer" + "title": "ViewerId" } }, - "required": ["array_ids"], + "required": [ + "array_ids" + ], "additionalProperties": false } } diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 0d05f146..290b6083 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,3 +1,5 @@ +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 @@ -12,7 +14,7 @@ class PickedIDS(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - ids: List[str] + ids: List[DataId] x: float y: float @@ -22,8 +24,8 @@ class PickedIDSResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - array_ids: List[str] - viewer_id: Optional[int] = None + array_ids: List[DataId] + viewer_id: Optional[ViewerId] = None picked_ids_route = Route( 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..e2df98fa 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_viewer.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..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,3 +1,4 @@ +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 @@ -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,9 +18,9 @@ class SetTextStyle(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - color: TextColor + color: ColorRGB font_family: FontFamily - opacity: float + opacity: Opacity @dataclass @@ -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/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.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/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.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/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index 6d76d882..6daecf75 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_viewer.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.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index 15fe03b2..f57b5613 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,14 +25,13 @@ ] }, "item": { - "type": "integer", - "minimum": 0 + "title": "AttributeItem" }, "minimum": { - "type": "number" + "title": "AttributeRangeMinimum" }, "maximum": { - "type": "number" + "title": "AttributeRangeMaximum" } }, "required": [ 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.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/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/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/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json new file mode 100644 index 00000000..c6f48784 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -0,0 +1,262 @@ +{ + "AttributeItem": { + "type": "integer", + "minimum": 0 + }, + "AttributeName": { + "type": "string", + "minLength": 1 + }, + "AttributeRangeMaximum": { + "type": "number" + }, + "AttributeRangeMinimum": { + "type": "number" + }, + "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" + } +} diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts new file mode 100644 index 00000000..cdeab9a0 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -0,0 +1,30 @@ +// 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 = ViewerId[]; +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 type AttributeRangeMinimum = number; +export type AttributeRangeMaximum = number; + +export interface Point3D { + x: number; + y: number; + z: number; +} + +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..5b31a7e5 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.json @@ -0,0 +1,111 @@ +{ + "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": { + "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 + }, + "AttributeRangeMinimum": { + "type": "number" + }, + "AttributeRangeMaximum": { + "type": "number" + } +} diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py new file mode 100644 index 00000000..a68e0676 --- /dev/null +++ b/src/opengeodeweb_viewer/schema_types.py @@ -0,0 +1,63 @@ +"""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 + +ViewerId = int +AttributeName = str +Filename = str +BlockIds = list[ViewerId] +Visibility = bool +Opacity = float +PointSize = float +EdgeWidth = float +ColorMapPoints = list[float] +AttributeItem = int +AttributeRangeMinimum = float +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: + print_dataclass(self) + + blue: int + green: int + red: int + + +@dataclass +class ColorRGBA(ColorRGB): + alpha: float + + +__all__ = [ + "AttributeItem", + "AttributeName", + "AttributeRangeMaximum", + "AttributeRangeMinimum", + "BlockIds", + "ColorMapPoints", + "ColorRGB", + "ColorRGBA", + "EdgeWidth", + "Filename", + "Opacity", + "Point3D", + "PointSize", + "ViewerId", + "Visibility", +] 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, ) 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")