Closed ravy closed 3 months ago
Hi! I think it is a duplicate of #2238. With the latest commit I can't reproduce the issue - Schemathesis generates exactly 1 example:
Case(headers={'Authorization': 'Bearer '}, body={'title': 'Running', 'description': 'run a marathon'})
Checklist
Describe the bug
When using shared examples in OpenAPI 3.0. and using option --hypothesis-phases=expicit Then there is an invalid test case being generated. By default the DataGenerationMethod of Hypothesis should be 'positive' so was surprised to see this invalid case.
To Reproduce
st run -v --hypothesis-phases=explicit --validate-schema=true -c all --hypothesis-verbosity=debug --base-url=http://localhost:8083 --dry-run testopenapi30.yaml
Please include a minimal API schema causing this issue:
Expected behavior
There should be only one valid explicit example generated.
Environment
Additional context
this is not such a serious issue as the second case can be considered a negative test case that does not conform to schema. but it is unintended while testing only examples. I also tried using OpenAPI 3.1 with the --experimental=openapi-3.1 flag set, but the same issue exists.