Comment
Author: Admin | 2025-04-27
Checklist I checked the FAQ section of the documentation I looked for similar issues in the issue tracker I am using the latest version of SchemathesisDescribe the bugI have an OpenAPI 3.1 schema which is valid according to validator.swagger.io. With Schemathesis 3.39.7, my endpoint passes ~102 checks. With 3.39.8 or higher (I started with 3.39.10), it returns a vague “Schema Error” with no information about the problem or how to resolve it.To Reproducepoetry run st run http://localhost:42120/search/api-docs --checks=all --experimental=openapi-3.1 --include-path "/search/items/{idList}/"See error_______________________________________________________________________________________________________________________ GET /search/items/{idList}/ ________________________________________________________________________________________________________________________Schema ErrorFailed to generate test cases for this API operation. Possible reasons: - Contradictory schema constraints, such as a minimum value exceeding the maximum. - Invalid schema definitions for headers or cookies, for example allowing for non-ASCII characters. - Excessive schema complexity, which hinders parameter generation.Tip: Examine the schema for inconsistencies and consider simplifying it.Please include a minimal API schema causing this issue: "/search/items/{idList}/": { "get": { "tags": [ "Collection Search" ], "summary": "Get items by ID", "description": "Given a list of item IDs, return available matching items in arbitrary order", "operationId": "getItemsByIdList", "parameters": [ { "name": "idList", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 6000, "pattern": "^(((?:DB|BR)[-a-zA-Z0-9_]+),?){1,}$", "title": "Idlist" }, "examples": { "single-id": { "summary": "a single item ID", "value": "DB12345" }, "multiple-ids": { "summary": "multiple comma-separated item IDs", "value": "DB12345,DB23456" } } }, { "name": "resultFormat", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ResultFormat", "default": "detailed" } }, { "name": "debug", "in": "query", "required": false, "schema": { "anyOf": [ { "$ref": "#/components/schemas/DebugFlags" }, { "type": "null" } ], "title": "Debug" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResponse" } } } }, "400": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } },Expected behaviorPassing schemas would continue to pass with the new versionAny failure to generate a schema would have usable details indicating what caused the problem and how to correct it.Environment- OS: macOS- Python version: 3.13- Schemathesis version: 3.39.7-10- Spec version: OpenAPI 3.1.0
Add Comment