Skip to content

Commit

Permalink
Merge pull request #19 from geo-engine/ml_model_db
Browse files Browse the repository at this point in the history
ml model db routes
  • Loading branch information
jdroenner authored Sep 4, 2024
2 parents 1d60234 + 5935d92 commit dcb1abb
Show file tree
Hide file tree
Showing 66 changed files with 2,707 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .generation/config.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[input]
backendTag = pro-nightly-2024-08-23
backendTag = pro-nightly-2024-08-31

[general]
githubUrl = https://github.com/geo-engine/openapi-client

[python]
name = geoengine_openapi_client
version = 0.0.11
version = 0.0.12

[typescript]
name = @geoengine/openapi-client
version = 0.0.11
version = 0.0.12

206 changes: 190 additions & 16 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"Admin tried to create dataset from an upload": {
"value": {
"error": "AdminsCannotCreateDatasetFromUpload",
"message": "AdminsCannotCreateDatasetFromUpload"
"message": "Admins cannot create dataset from upload"
}
},
"Body is invalid json": {
Expand All @@ -219,7 +219,7 @@
"Normal user tried to create dataset from a volume": {
"value": {
"error": "OnlyAdminsCanCreateDatasetFromVolume",
"message": "OnlyAdminsCanCreateDatasetFromVolume"
"message": "Only admins can create dataset from volume"
}
},
"Referenced an unknown upload": {
Expand All @@ -231,7 +231,7 @@
"Referenced an unknown volume": {
"value": {
"error": "UnknownVolume",
"message": "UnknownVolume"
"message": "Unknown volume"
}
}
}
Expand Down Expand Up @@ -318,13 +318,13 @@
"Dataset has no auto-importable layer": {
"value": {
"error": "DatasetHasNoAutoImportableLayer",
"message": "DatasetHasNoAutoImportableLayer"
"message": "Dataset has no auto importable layer"
}
},
"Dataset name is empty": {
"value": {
"error": "InvalidDatasetName",
"message": "InvalidDatasetName"
"message": "Invalid dataset name"
}
},
"Failed to read body": {
Expand All @@ -335,20 +335,20 @@
},
"File does not exist": {
"value": {
"error": "Operator",
"message": "Operator: GdalError: GDAL method 'GDALOpenEx' returned a NULL pointer. Error msg: 'upload/0bdd1062-7796-4d44-a655-e548144281a6/asdf: No such file or directory'"
"error": "GdalError",
"message": "GdalError: GDAL method 'GDALOpenEx' returned a NULL pointer. Error msg: 'upload/0bdd1062-7796-4d44-a655-e548144281a6/asdf: No such file or directory'"
}
},
"Referenced an unknown upload": {
"value": {
"error": "UnknownUploadId",
"message": "UnknownUploadId"
"message": "Unknown upload id"
}
},
"Upload filename is invalid": {
"value": {
"error": "InvalidUploadFileName",
"message": "InvalidUploadFileName"
"message": "Invalid upload file name"
}
}
}
Expand Down Expand Up @@ -450,13 +450,13 @@
"Dataset has no auto-importable layer": {
"value": {
"error": "DatasetHasNoAutoImportableLayer",
"message": "DatasetHasNoAutoImportableLayer"
"message": "Dataset has no auto importable layer"
}
},
"File does not exist": {
"value": {
"error": "Operator",
"message": "Operator: GdalError: GDAL method 'GDALOpenEx' returned a NULL pointer. Error msg: 'upload/0bdd1062-7796-4d44-a655-e548144281a6/asdf: No such file or directory'"
"error": "GdalError",
"message": "GdalError: GDAL method 'GDALOpenEx' returned a NULL pointer. Error msg: 'upload/0bdd1062-7796-4d44-a655-e548144281a6/asdf: No such file or directory'"
}
},
"Missing field in query string": {
Expand All @@ -468,7 +468,7 @@
"No suitable mainfile found": {
"value": {
"error": "NoMainFileCandidateFound",
"message": "NoMainFileCandidateFound"
"message": "No main file candidate found"
}
},
"Number in query string contains letters": {
Expand All @@ -480,7 +480,7 @@
"Referenced an unknown upload": {
"value": {
"error": "UnknownUploadId",
"message": "UnknownUploadId"
"message": "Unknown upload id"
}
}
}
Expand Down Expand Up @@ -699,13 +699,13 @@
"Given dataset can only be deleted by owner": {
"value": {
"error": "OperationRequiresOwnerPermission",
"message": "OperationRequiresOwnerPermission"
"message": "Operation requires owner permission"
}
},
"Referenced an unknown dataset": {
"value": {
"error": "UnknownDatasetName",
"message": "UnknownDatasetName"
"message": "Unknown dataset name"
}
}
}
Expand Down Expand Up @@ -2154,6 +2154,99 @@
]
}
},
"/ml/models": {
"get": {
"tags": [
"ML"
],
"summary": "List ml models.",
"operationId": "list_ml_models",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MlModel"
}
}
}
}
}
},
"security": [
{
"session_token": []
}
]
},
"post": {
"tags": [
"ML"
],
"summary": "Create a new ml model.",
"operationId": "add_ml_model",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MlModel"
}
}
},
"required": true
},
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"session_token": []
}
]
}
},
"/ml/models/{model_name}": {
"get": {
"tags": [
"ML"
],
"summary": "Get ml model by name.",
"operationId": "get_ml_model",
"parameters": [
{
"name": "model_name",
"in": "path",
"description": "Ml Model Name",
"required": true,
"schema": {
"$ref": "#/components/schemas/MlModelName"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MlModel"
}
}
}
}
},
"security": [
{
"session_token": []
}
]
}
},
"/oidcInit": {
"post": {
"tags": [
Expand Down Expand Up @@ -6463,6 +6556,65 @@
}
}
},
"MlModel": {
"type": "object",
"required": [
"name",
"displayName",
"description",
"upload",
"metadata"
],
"properties": {
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/MlModelMetadata"
},
"name": {
"$ref": "#/components/schemas/MlModelName"
},
"upload": {
"$ref": "#/components/schemas/UploadId"
}
}
},
"MlModelId": {
"type": "string",
"format": "uuid"
},
"MlModelMetadata": {
"type": "object",
"required": [
"fileName",
"inputType",
"numInputBands",
"outputType"
],
"properties": {
"fileName": {
"type": "string"
},
"inputType": {
"$ref": "#/components/schemas/RasterDataType"
},
"numInputBands": {
"type": "integer",
"format": "int32",
"minimum": 0
},
"outputType": {
"$ref": "#/components/schemas/RasterDataType"
}
}
},
"MlModelName": {
"type": "string"
},
"MockDatasetDataSourceLoadingInfo": {
"type": "object",
"required": [
Expand Down Expand Up @@ -7821,6 +7973,9 @@
},
{
"$ref": "#/components/schemas/ResourceIdDatasetId"
},
{
"$ref": "#/components/schemas/ResourceIdMlModel"
}
],
"discriminator": {
Expand All @@ -7829,6 +7984,7 @@
"DatasetId": "#/components/schemas/ResourceIdDatasetId",
"Layer": "#/components/schemas/ResourceIdLayer",
"LayerCollection": "#/components/schemas/ResourceIdLayerCollection",
"MlModel": "#/components/schemas/ResourceIdMlModel",
"Project": "#/components/schemas/ResourceIdProject"
}
}
Expand Down Expand Up @@ -7887,6 +8043,24 @@
}
}
},
"ResourceIdMlModel": {
"type": "object",
"required": [
"type",
"id"
],
"properties": {
"id": {
"$ref": "#/components/schemas/MlModelId"
},
"type": {
"type": "string",
"enum": [
"MlModel"
]
}
}
},
"ResourceIdProject": {
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit dcb1abb

Please sign in to comment.