From a03cafef9fb546cdaeaefda43afbfd0e3c81c8d2 Mon Sep 17 00:00:00 2001 From: Michael Mattig Date: Tue, 30 Jan 2024 11:11:06 +0100 Subject: [PATCH] add bands to raster stream api --- .generation/input/openapi.json | 19 +++++++++++++++++-- python/README.md | 6 +++--- .../api/workflows_api.py | 18 +++++++++++++----- .../geoengine_openapi_client/configuration.py | 4 ++-- typescript/dist/apis/WorkflowsApi.d.ts | 1 + typescript/dist/apis/WorkflowsApi.js | 6 ++++++ typescript/dist/esm/apis/WorkflowsApi.d.ts | 1 + typescript/dist/esm/apis/WorkflowsApi.js | 6 ++++++ typescript/dist/esm/runtime.js | 2 +- typescript/dist/runtime.js | 2 +- typescript/src/apis/WorkflowsApi.ts | 9 +++++++++ typescript/src/runtime.ts | 2 +- 12 files changed, 61 insertions(+), 15 deletions(-) diff --git a/.generation/input/openapi.json b/.generation/input/openapi.json index 3e0460da..429388ab 100644 --- a/.generation/input/openapi.json +++ b/.generation/input/openapi.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "http://0.0.0.0:8080/api" + "url": "http://127.0.0.1:3030/api" } ], "paths": { @@ -4561,6 +4561,14 @@ "$ref": "#/components/schemas/SpatialResolution" } }, + { + "name": "attributes", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "resultType", "in": "query", @@ -4830,6 +4838,13 @@ "eastNorth" ] }, + "BandSelection": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + } + }, "BoundingBox2D": { "type": "object", "description": "A bounding box that includes all border points.\nNote: may degenerate to a point!", @@ -9532,4 +9547,4 @@ "url": "https://docs.geoengine.io", "description": "Geo Engine Docs" } -} \ No newline at end of file +} diff --git a/python/README.md b/python/README.md index b761c964..e5be54be 100644 --- a/python/README.md +++ b/python/README.md @@ -55,10 +55,10 @@ import geoengine_openapi_client from geoengine_openapi_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://0.0.0.0:8080/api +# Defining the host is optional and defaults to http://127.0.0.1:3030/api # See configuration.py for a list of all supported configuration parameters. configuration = geoengine_openapi_client.Configuration( - host = "http://0.0.0.0:8080/api" + host = "http://127.0.0.1:3030/api" ) # The client must configure the authentication and authorization parameters @@ -90,7 +90,7 @@ with geoengine_openapi_client.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *http://0.0.0.0:8080/api* +All URIs are relative to *http://127.0.0.1:3030/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/python/geoengine_openapi_client/api/workflows_api.py b/python/geoengine_openapi_client/api/workflows_api.py index 02c9402a..9f1c7ca1 100644 --- a/python/geoengine_openapi_client/api/workflows_api.py +++ b/python/geoengine_openapi_client/api/workflows_api.py @@ -770,14 +770,14 @@ def load_workflow_handler_with_http_info(self, id : Annotated[StrictStr, Field(. _request_auth=_params.get('_request_auth')) @validate_arguments - def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, result_type : RasterStreamWebsocketResultType, **kwargs) -> None: # noqa: E501 + def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, attributes : StrictStr, result_type : RasterStreamWebsocketResultType, **kwargs) -> None: # noqa: E501 """Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501 Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.raster_stream_websocket(id, spatial_bounds, time_interval, spatial_resolution, result_type, async_req=True) + >>> thread = api.raster_stream_websocket(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, async_req=True) >>> result = thread.get() :param id: Workflow id (required) @@ -788,6 +788,8 @@ def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., descripti :type time_interval: str :param spatial_resolution: (required) :type spatial_resolution: SpatialResolution + :param attributes: (required) + :type attributes: str :param result_type: (required) :type result_type: RasterStreamWebsocketResultType :param async_req: Whether to execute the request asynchronously. @@ -805,17 +807,17 @@ def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., descripti if '_preload_content' in kwargs: message = "Error! Please call the raster_stream_websocket_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return self.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, result_type, **kwargs) # noqa: E501 + return self.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, **kwargs) # noqa: E501 @validate_arguments - def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, result_type : RasterStreamWebsocketResultType, **kwargs) -> ApiResponse: # noqa: E501 + def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, attributes : StrictStr, result_type : RasterStreamWebsocketResultType, **kwargs) -> ApiResponse: # noqa: E501 """Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501 Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, result_type, async_req=True) + >>> thread = api.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, async_req=True) >>> result = thread.get() :param id: Workflow id (required) @@ -826,6 +828,8 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field :type time_interval: str :param spatial_resolution: (required) :type spatial_resolution: SpatialResolution + :param attributes: (required) + :type attributes: str :param result_type: (required) :type result_type: RasterStreamWebsocketResultType :param async_req: Whether to execute the request asynchronously. @@ -860,6 +864,7 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field 'spatial_bounds', 'time_interval', 'spatial_resolution', + 'attributes', 'result_type' ] _all_params.extend( @@ -903,6 +908,9 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field if _params.get('spatial_resolution') is not None: # noqa: E501 _query_params.append(('spatialResolution', _params['spatial_resolution'])) + if _params.get('attributes') is not None: # noqa: E501 + _query_params.append(('attributes', _params['attributes'])) + if _params.get('result_type') is not None: # noqa: E501 _query_params.append(('resultType', _params['result_type'].value)) diff --git a/python/geoengine_openapi_client/configuration.py b/python/geoengine_openapi_client/configuration.py index 2baa9398..a2a6b565 100644 --- a/python/geoengine_openapi_client/configuration.py +++ b/python/geoengine_openapi_client/configuration.py @@ -69,7 +69,7 @@ def __init__(self, host=None, ) -> None: """Constructor """ - self._base_path = "http://0.0.0.0:8080/api" if host is None else host + self._base_path = "http://127.0.0.1:3030/api" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -388,7 +388,7 @@ def get_host_settings(self): """ return [ { - 'url': "http://0.0.0.0:8080/api", + 'url': "http://127.0.0.1:3030/api", 'description': "No description provided", } ] diff --git a/typescript/dist/apis/WorkflowsApi.d.ts b/typescript/dist/apis/WorkflowsApi.d.ts index a163ad51..6d0c8b34 100644 --- a/typescript/dist/apis/WorkflowsApi.d.ts +++ b/typescript/dist/apis/WorkflowsApi.d.ts @@ -32,6 +32,7 @@ export interface RasterStreamWebsocketRequest { spatialBounds: SpatialPartition2D; timeInterval: string; spatialResolution: SpatialResolution; + attributes: string; resultType: RasterStreamWebsocketResultType; } export interface RegisterWorkflowHandlerRequest { diff --git a/typescript/dist/apis/WorkflowsApi.js b/typescript/dist/apis/WorkflowsApi.js index ee071e81..7932f54e 100644 --- a/typescript/dist/apis/WorkflowsApi.js +++ b/typescript/dist/apis/WorkflowsApi.js @@ -237,6 +237,9 @@ class WorkflowsApi extends runtime.BaseAPI { if (requestParameters.spatialResolution === null || requestParameters.spatialResolution === undefined) { throw new runtime.RequiredError('spatialResolution', 'Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.'); } + if (requestParameters.attributes === null || requestParameters.attributes === undefined) { + throw new runtime.RequiredError('attributes', 'Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.'); + } if (requestParameters.resultType === null || requestParameters.resultType === undefined) { throw new runtime.RequiredError('resultType', 'Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.'); } @@ -250,6 +253,9 @@ class WorkflowsApi extends runtime.BaseAPI { if (requestParameters.spatialResolution !== undefined) { queryParameters['spatialResolution'] = requestParameters.spatialResolution; } + if (requestParameters.attributes !== undefined) { + queryParameters['attributes'] = requestParameters.attributes; + } if (requestParameters.resultType !== undefined) { queryParameters['resultType'] = requestParameters.resultType; } diff --git a/typescript/dist/esm/apis/WorkflowsApi.d.ts b/typescript/dist/esm/apis/WorkflowsApi.d.ts index a163ad51..6d0c8b34 100644 --- a/typescript/dist/esm/apis/WorkflowsApi.d.ts +++ b/typescript/dist/esm/apis/WorkflowsApi.d.ts @@ -32,6 +32,7 @@ export interface RasterStreamWebsocketRequest { spatialBounds: SpatialPartition2D; timeInterval: string; spatialResolution: SpatialResolution; + attributes: string; resultType: RasterStreamWebsocketResultType; } export interface RegisterWorkflowHandlerRequest { diff --git a/typescript/dist/esm/apis/WorkflowsApi.js b/typescript/dist/esm/apis/WorkflowsApi.js index df9674b4..695e4a32 100644 --- a/typescript/dist/esm/apis/WorkflowsApi.js +++ b/typescript/dist/esm/apis/WorkflowsApi.js @@ -234,6 +234,9 @@ export class WorkflowsApi extends runtime.BaseAPI { if (requestParameters.spatialResolution === null || requestParameters.spatialResolution === undefined) { throw new runtime.RequiredError('spatialResolution', 'Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.'); } + if (requestParameters.attributes === null || requestParameters.attributes === undefined) { + throw new runtime.RequiredError('attributes', 'Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.'); + } if (requestParameters.resultType === null || requestParameters.resultType === undefined) { throw new runtime.RequiredError('resultType', 'Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.'); } @@ -247,6 +250,9 @@ export class WorkflowsApi extends runtime.BaseAPI { if (requestParameters.spatialResolution !== undefined) { queryParameters['spatialResolution'] = requestParameters.spatialResolution; } + if (requestParameters.attributes !== undefined) { + queryParameters['attributes'] = requestParameters.attributes; + } if (requestParameters.resultType !== undefined) { queryParameters['resultType'] = requestParameters.resultType; } diff --git a/typescript/dist/esm/runtime.js b/typescript/dist/esm/runtime.js index 37874dee..58012480 100644 --- a/typescript/dist/esm/runtime.js +++ b/typescript/dist/esm/runtime.js @@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -export const BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, ""); +export const BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, ""); export class Configuration { constructor(configuration = {}) { this.configuration = configuration; diff --git a/typescript/dist/runtime.js b/typescript/dist/runtime.js index 086eafcd..79479e45 100644 --- a/typescript/dist/runtime.js +++ b/typescript/dist/runtime.js @@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0; -exports.BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, ""); +exports.BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, ""); class Configuration { constructor(configuration = {}) { this.configuration = configuration; diff --git a/typescript/src/apis/WorkflowsApi.ts b/typescript/src/apis/WorkflowsApi.ts index f1bca7cc..89c3f95d 100644 --- a/typescript/src/apis/WorkflowsApi.ts +++ b/typescript/src/apis/WorkflowsApi.ts @@ -72,6 +72,7 @@ export interface RasterStreamWebsocketRequest { spatialBounds: SpatialPartition2D; timeInterval: string; spatialResolution: SpatialResolution; + attributes: string; resultType: RasterStreamWebsocketResultType; } @@ -312,6 +313,10 @@ export class WorkflowsApi extends runtime.BaseAPI { throw new runtime.RequiredError('spatialResolution','Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.'); } + if (requestParameters.attributes === null || requestParameters.attributes === undefined) { + throw new runtime.RequiredError('attributes','Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.'); + } + if (requestParameters.resultType === null || requestParameters.resultType === undefined) { throw new runtime.RequiredError('resultType','Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.'); } @@ -330,6 +335,10 @@ export class WorkflowsApi extends runtime.BaseAPI { queryParameters['spatialResolution'] = requestParameters.spatialResolution; } + if (requestParameters.attributes !== undefined) { + queryParameters['attributes'] = requestParameters.attributes; + } + if (requestParameters.resultType !== undefined) { queryParameters['resultType'] = requestParameters.resultType; } diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts index 5553e736..a354f158 100644 --- a/typescript/src/runtime.ts +++ b/typescript/src/runtime.ts @@ -13,7 +13,7 @@ */ -export const BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, ""); +export const BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, ""); export interface ConfigurationParameters { basePath?: string; // override base path