From bf4cecb972ab908d53dceefb80e2634e7d2b9775 Mon Sep 17 00:00:00 2001 From: David Dallakyan <131261521+daviddallakyan2005@users.noreply.github.com> Date: Sun, 16 Aug 2026 12:24:04 +0400 Subject: [PATCH] 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. --- docs/redoc/master/openapi.json | 10 ++++++++++ openapi/openapi-points.ytt.yaml | 7 +++++++ tests/openapi/test_basic_retrieve_api.py | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/docs/redoc/master/openapi.json b/docs/redoc/master/openapi.json index 4d758f746e..a9015681d0 100644 --- a/docs/redoc/master/openapi.json +++ b/docs/redoc/master/openapi.json @@ -4225,6 +4225,16 @@ "schema": { "$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": { diff --git a/openapi/openapi-points.ytt.yaml b/openapi/openapi-points.ytt.yaml index 7844a37af4..915b6e1a71 100644 --- a/openapi/openapi-points.ytt.yaml +++ b/openapi/openapi-points.ytt.yaml @@ -27,6 +27,13 @@ paths: required: false schema: $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")) /collections/{collection_name}/points: diff --git a/tests/openapi/test_basic_retrieve_api.py b/tests/openapi/test_basic_retrieve_api.py index 05b580e049..a9b4bec069 100644 --- a/tests/openapi/test_basic_retrieve_api.py +++ b/tests/openapi/test_basic_retrieve_api.py @@ -19,6 +19,15 @@ def test_points_retrieve(collection_name): ) 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( api='/collections/{collection_name}/points', method="POST",