Files
qdrant/docs/redoc
Mohamed Salah 93f3aafe31 docs(schema): declare enforced 1..=65536 bound on VectorParams.size (#10324)
* docs(schema): declare enforced 1..=65536 bound on VectorParams.size

The REST layer enforces an upper bound of 65536 on VectorParams.size
via a custom validator (validate_nonzerou64_range_min_1_max_65536),
but custom validators contribute no bounds to the generated JSON
schema - so the published OpenAPI document only declared minimum: 1,
while DenseVectorConfig.size already documented both bounds.

Add an explicit #[schemars(range(min = 1, max = 65536))] attribute so
clients validating requests against the schema see the same contract
the server enforces, update docs/redoc/master/openapi.json
accordingly, and pin the bound with a unit test asserting the
generated schema.

Fixes #9942

* test(openapi): accept documented size bound as a rejection path

test_vector_dimension_limit asserted that an oversized VectorParams.size
reaches the server and returns the exact runtime 422 message. Now that the
enforced 1..=65536 bound is documented in the served OpenAPI schema (#9942),
request_with_validation rejects such payloads client-side before sending.
Accept either layer: a client-side jsonschema.ValidationError or the
server-side validation error.

* test(openapi): handle both rejection layers in dimension limit

pytest.raises only covered the client-side jsonschema rejection; if the
request reached the server instead, the test would fail on an unhandled
response. Use try/except around request_with_validation and assert the
server-side status and exact error message in the else branch.

* test(openapi): assert exact HTTP 422 on server-side rejection

A broad not-ok check would pass on any error status carrying the same
error text; pin the documented contract to 422.

* refactor(tests): address review feedback

Remove the unit test asserting the generated VectorParams schema shape -
it only restates the schemars attribute and adds maintenance cost.

Reduce test_vector_dimension_limit to its actual contract: an oversized
dimension is rejected by the documented OpenAPI schema before the
request is sent.
2026-09-03 12:45:50 +02:00
..
2022-02-03 11:35:26 +01:00
2022-02-16 11:35:37 +01:00
2022-03-03 23:58:13 +01:00
2022-06-08 12:47:10 +02:00
2022-06-16 15:30:46 +02:00
2022-06-24 13:14:48 +02:00
2022-06-28 11:51:29 +02:00
2022-07-05 11:13:03 +02:00
2022-07-25 20:05:07 +02:00
2022-07-26 19:28:53 +02:00
2022-08-08 11:13:54 +02:00
2022-08-10 21:15:40 +02:00
2022-09-19 10:05:57 +02:00
2022-09-19 15:31:35 +02:00
2022-09-30 11:08:16 +02:00
2022-10-13 09:14:11 +02:00
2022-10-13 09:14:11 +02:00
2022-10-18 10:49:43 +02:00
2022-10-26 10:40:02 +02:00
2022-11-04 23:10:13 +01:00
2022-11-09 14:03:49 +01:00
2022-11-15 16:12:21 +01:00
2022-11-25 14:53:22 +01:00
2022-12-06 17:59:55 +01:00
2023-01-13 16:03:56 +01:00
2023-02-08 14:00:55 +01:00
2023-02-21 18:36:21 +01:00
2023-03-05 21:11:40 +01:00
2023-03-17 17:33:49 +01:00
2023-04-11 19:36:46 +02:00
2023-04-27 19:24:37 +02:00
2023-05-06 19:40:50 +02:00
2023-05-23 18:16:59 +02:00
2023-06-23 13:24:23 +02:00
2023-08-02 22:59:21 +02:00
2023-09-06 11:33:39 +02:00
2023-10-09 14:46:46 +02:00
2023-12-08 01:46:36 +01:00
2024-04-22 11:58:32 +02:00
2024-07-01 19:51:35 +02:00
2024-08-12 16:29:32 +02:00
2024-10-08 14:33:47 +02:00
2025-01-16 15:06:38 +01:00
2025-04-21 12:17:44 +02:00
2025-07-18 11:06:11 +02:00
2025-11-17 12:10:37 +01:00
2026-02-19 13:35:11 +01:00
2026-05-08 17:26:56 +02:00
2026-08-04 13:48:45 +02:00
2022-02-07 07:59:09 +01:00
2026-08-04 13:48:45 +02:00