mirror of
https://github.com/qdrant/qdrant.git
synced 2026-09-21 05:27:39 -05:00
add missing timeout parameter for get point API (#10235)
GET /collections/{name}/points/{id} already accepts ReadParams.timeout;
OpenAPI only documented consistency. Match the POST /points query parameters.
This commit is contained in:
@@ -4225,6 +4225,16 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/ReadConsistency"
|
"$ref": "#/components/schemas/ReadConsistency"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "timeout",
|
||||||
|
"in": "query",
|
||||||
|
"description": "If set, overrides global timeout for this request. Unit is seconds.",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ paths:
|
|||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/ReadConsistency"
|
$ref: "#/components/schemas/ReadConsistency"
|
||||||
|
- name: timeout
|
||||||
|
in: query
|
||||||
|
description: If set, overrides global timeout for this request. Unit is seconds.
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
minimum: 1
|
||||||
responses: #@ response(reference("Record"))
|
responses: #@ response(reference("Record"))
|
||||||
|
|
||||||
/collections/{collection_name}/points:
|
/collections/{collection_name}/points:
|
||||||
|
|||||||
@@ -19,6 +19,15 @@ def test_points_retrieve(collection_name):
|
|||||||
)
|
)
|
||||||
assert response.ok
|
assert response.ok
|
||||||
|
|
||||||
|
response = request_with_validation(
|
||||||
|
api='/collections/{collection_name}/points/{id}',
|
||||||
|
method="GET",
|
||||||
|
path_params={'collection_name': collection_name, 'id': 2},
|
||||||
|
query_params={'timeout': 1},
|
||||||
|
)
|
||||||
|
assert response.ok
|
||||||
|
assert response.json()['result']['id'] == 2
|
||||||
|
|
||||||
response = request_with_validation(
|
response = request_with_validation(
|
||||||
api='/collections/{collection_name}/points',
|
api='/collections/{collection_name}/points',
|
||||||
method="POST",
|
method="POST",
|
||||||
|
|||||||
Reference in New Issue
Block a user