Skip to content

Commit b734648

Browse files
committed
release: bump openapi version
1 parent b2aae50 commit b734648

File tree

1 file changed

+171
-15
lines changed

1 file changed

+171
-15
lines changed

openapi.json

Lines changed: 171 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi":"3.0.2",
33
"info":{
44
"title":"EcoTaxa",
5-
"version":"0.0.39"
5+
"version":"0.0.40"
66
},
77
"servers":[
88
{
@@ -2525,6 +2525,92 @@
25252525
]
25262526
}
25272527
},
2528+
"/object_set/{project_id}/similarity_search/{object_id}":{
2529+
"post":{
2530+
"tags":[
2531+
"objects"
2532+
],
2533+
"summary":"Object Similarity Search",
2534+
"description":"Returns, in given project, the objects matching the filter and similar to the queried one.",
2535+
"operationId":"get_object_set_similarity_search",
2536+
"parameters":[
2537+
{
2538+
"description":"Internal, numeric id of the project to search in.",
2539+
"required":true,
2540+
"schema":{
2541+
"title":"Project Id",
2542+
"type":"integer",
2543+
"description":"Internal, numeric id of the project to search in."
2544+
},
2545+
"example":3426,
2546+
"name":"project_id",
2547+
"in":"path"
2548+
},
2549+
{
2550+
"description":"Object ID to search similar for.",
2551+
"required":true,
2552+
"schema":{
2553+
"title":"Object Id",
2554+
"type":"integer",
2555+
"description":"Object ID to search similar for."
2556+
},
2557+
"example":1040,
2558+
"name":"object_id",
2559+
"in":"path"
2560+
},
2561+
{
2562+
"description":"Return at maximum this number of object IDs, by default 100.",
2563+
"required":false,
2564+
"schema":{
2565+
"title":"Size",
2566+
"type":"integer",
2567+
"description":"Return at maximum this number of object IDs, by default 100.",
2568+
"default":100
2569+
},
2570+
"example":"120",
2571+
"name":"size",
2572+
"in":"query"
2573+
}
2574+
],
2575+
"requestBody":{
2576+
"content":{
2577+
"application/json":{
2578+
"schema":{
2579+
"$ref":"#/components/schemas/ProjectFilters"
2580+
}
2581+
}
2582+
},
2583+
"required":true
2584+
},
2585+
"responses":{
2586+
"200":{
2587+
"description":"Successful Response",
2588+
"content":{
2589+
"application/json":{
2590+
"schema":{
2591+
"$ref":"#/components/schemas/SimilaritySearchRsp"
2592+
}
2593+
}
2594+
}
2595+
},
2596+
"422":{
2597+
"description":"Validation Error",
2598+
"content":{
2599+
"application/json":{
2600+
"schema":{
2601+
"$ref":"#/components/schemas/HTTPValidationError"
2602+
}
2603+
}
2604+
}
2605+
}
2606+
},
2607+
"security":[
2608+
{
2609+
"BearerOrCookieAuth":[]
2610+
}
2611+
]
2612+
}
2613+
},
25282614
"/samples/search":{
25292615
"get":{
25302616
"tags":[
@@ -3107,12 +3193,12 @@
31073193
"in":"query"
31083194
},
31093195
{
3110-
"description":"Order the result using given field. If prefixed with \"-\" then it will be reversed.",
3196+
"description":"Order the result using given field. If prefixed with \"-\" then it will be reversed. When using *special syntax ss-Innnn*, the order is similarity with given (by its ID) object.",
31113197
"required":false,
31123198
"schema":{
31133199
"title":"Order field",
31143200
"type":"string",
3115-
"description":"Order the result using given field. If prefixed with \"-\" then it will be reversed."
3201+
"description":"Order the result using given field. If prefixed with \"-\" then it will be reversed. When using *special syntax ss-Innnn*, the order is similarity with given (by its ID) object."
31163202
},
31173203
"example":"obj.longitude",
31183204
"name":"order_field",
@@ -3981,7 +4067,7 @@
39814067
],
39824068
"summary":"Query Object Set Predictions",
39834069
"description":"** Return last prediction information for a set of objects, by their IDs.",
3984-
"operationId":"predict_object_set",
4070+
"operationId":"object_set_predictions",
39854071
"requestBody":{
39864072
"content":{
39874073
"application/json":{
@@ -8073,17 +8159,9 @@
80738159
"maxItems":3,
80748160
"minItems":3,
80758161
"type":"array",
8076-
"items":[
8077-
{
8078-
"type":"integer"
8079-
},
8080-
{
8081-
"type":"integer"
8082-
},
8083-
{
8084-
"type":"number"
8085-
}
8086-
]
8162+
"items":{
8163+
"title":"type"
8164+
}
80878165
},
80888166
"description":"List of lists [object ID, category ID, score for category].",
80898167
"default":[],
@@ -8103,6 +8181,29 @@
81038181
},
81048182
"description":"Prediction information for a set of objects."
81058183
},
8184+
"PredictionInfoT":{
8185+
"title":"PredictionInfoT",
8186+
"required":[
8187+
"object_id",
8188+
"classif_id",
8189+
"score"
8190+
],
8191+
"type":"object",
8192+
"properties":{
8193+
"object_id":{
8194+
"title":"Object Id",
8195+
"type":"integer"
8196+
},
8197+
"classif_id":{
8198+
"title":"Classif Id",
8199+
"type":"integer"
8200+
},
8201+
"score":{
8202+
"title":"Score",
8203+
"type":"number"
8204+
}
8205+
}
8206+
},
81068207
"PredictionReq":{
81078208
"title":"Prediction Request",
81088209
"required":[
@@ -9044,6 +9145,61 @@
90449145
"type":"string",
90459146
"description":"Computed export quantities"
90469147
},
9148+
"SimilaritySearchRsp":{
9149+
"title":"Similarity Search Response",
9150+
"required":[
9151+
"neighbor_ids",
9152+
"sim_scores"
9153+
],
9154+
"type":"object",
9155+
"properties":{
9156+
"neighbor_ids":{
9157+
"title":"Neighbor IDs",
9158+
"type":"array",
9159+
"items":{
9160+
"type":"integer"
9161+
},
9162+
"description":"The list of similar objects IDs."
9163+
},
9164+
"sim_scores":{
9165+
"title":"Similarity Scores",
9166+
"type":"array",
9167+
"items":{
9168+
"type":"number"
9169+
},
9170+
"description":"The list of similarity scores, between 0 and 1. The higher the closer, e.g. 1 for the target_id itself."
9171+
},
9172+
"message":{
9173+
"title":"Message",
9174+
"type":"string",
9175+
"description":"A message to the user. If not 'Success' then some condition prevented the computation."
9176+
}
9177+
},
9178+
"description":"The list of similar objects.",
9179+
"example":{
9180+
"neighbor_ids":[
9181+
1040,
9182+
1041,
9183+
1042,
9184+
1043,
9185+
1044,
9186+
1045,
9187+
1046,
9188+
1047
9189+
],
9190+
"sim_scores":[
9191+
1.0,
9192+
0.9,
9193+
0.8,
9194+
0.7,
9195+
0.6,
9196+
0.5,
9197+
0.4,
9198+
0.3
9199+
],
9200+
"message":"Success"
9201+
}
9202+
},
90479203
"SimpleImportReq":{
90489204
"title":"Simple import request Model",
90499205
"required":[

0 commit comments

Comments
 (0)