Skip to content

Commit

Permalink
Fixes #126.
Browse files Browse the repository at this point in the history
Signed-off-by: Ralph Gasser <[email protected]>
  • Loading branch information
ppanopticon committed Dec 10, 2024
1 parent a44e4d0 commit 6c97840
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 17 deletions.
104 changes: 91 additions & 13 deletions vitrivr-engine-server/doc/oas.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"openapi" : "3.0.3",
"info" : {
"title" : "vitrivr engine API",
"version" : "1.0.0",
"description" : "API for the vitrivr engine."
"version": "0.1.0",
"description": "Rest API for the vitrivr engine project. Provides query (runtime) and extraction (ingestion) endpoints"
},
"paths" : {
"/api/schema/list" : {
Expand All @@ -18,10 +18,7 @@
"content" : {
"application/json" : {
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
"$ref": "#/components/schemas/SchemaList"
}
}
}
Expand All @@ -46,7 +43,41 @@
"tags" : [ "Content" ],
"summary" : "Fetch previously exported data.",
"operationId" : "getPreview",
"parameters" : [ ],
"parameters": [
{
"name": "schema",
"in": "path",
"description": "The schema this operation is for.",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
}
},
{
"name": "exporter",
"in": "path",
"description": "The exporter of the schema to use.",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
}
},
{
"name": "retrievableId",
"in": "path",
"description": "The ID of the retrievable.",
"required": true,
"deprecated": false,
"allowEmptyValue": false,
"schema": {
"type": "string"
}
}
],
"responses" : {
"200" : {
"description" : "OK",
Expand Down Expand Up @@ -114,8 +145,8 @@
"/api/{schema}/index/{jobId}" : {
"get" : {
"tags" : [ "Ingest" ],
"summary" : "Indexes an item, adding it to the defined schema.",
"operationId" : "postExecuteIngest",
"summary": "Queries the status of a given ingest job.",
"operationId": "getIngestStatus",
"parameters" : [ {
"name" : "schema",
"in" : "path",
Expand All @@ -129,7 +160,7 @@
}, {
"name" : "jobId",
"in" : "path",
"description" : "The id querying the state.",
"description": "The id of the job to query the status for.",
"required" : true,
"deprecated" : false,
"allowEmptyValue" : false,
Expand Down Expand Up @@ -226,10 +257,30 @@
"type" : "object",
"additionalProperties" : false,
"properties" : {
"property" : {
"propertyOrDefault": {
"type" : "string"
},
"local": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"global": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"required": [
"propertyOrDefault",
"local",
"global"
]
},
"InformationNeedDescription" : {
"type" : "object",
Expand Down Expand Up @@ -262,13 +313,25 @@
"properties" : {
"type" : {
"$ref" : "#/components/schemas/InputType"
},
"comparison": {
"type": "string",
"nullable": true
}
},
"required" : [ "type" ]
},
"InputType" : {
"type" : "string",
"enum" : [ "TEXT", "IMAGE", "VECTOR", "ID" ]
"enum": [
"TEXT",
"IMAGE",
"VECTOR",
"ID",
"BOOLEAN",
"NUMERIC",
"DATE"
]
},
"OperatorDescription" : {
"type" : "object",
Expand Down Expand Up @@ -326,6 +389,21 @@
},
"required" : [ "id", "score", "type", "parts", "properties" ]
},
"SchemaList": {
"type": "object",
"additionalProperties": false,
"properties": {
"schemas": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"schemas"
]
},
"ErrorStatus" : {
"type" : "object",
"additionalProperties" : false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const val FETCH_ROUTE_FROM_SCHEMA = "fetch/{exporter}/{retrievableId}"
operationId = "getPreview",
tags = ["Content"],
pathParams = [
OpenApiParam("schema", String::class, "The schema this operation is for."),
OpenApiParam("exporter", String::class, "The exporter of the schema to use."),
OpenApiParam("retrievableId", String::class, "The ID of the retrievable.")
],
OpenApiParam("schema", type = String::class, description = "The schema this operation is for.", required = true),
OpenApiParam("exporter", type = String::class, description = "The exporter of the schema to use.", required = true),
OpenApiParam("retrievableId", type = String::class, description = "The ID of the retrievable.", required = true)
],
responses = [
OpenApiResponse("200", [OpenApiContent(type = "image/jpeg")]),
OpenApiResponse("400", [OpenApiContent(ErrorStatus::class)])
Expand Down

0 comments on commit 6c97840

Please sign in to comment.