schemathesis / schemathesis

Supercharge your API testing, catch bugs, and ensure compliance
https://schemathesis.readthedocs.io
MIT License
2.29k stars 163 forks source link

[BUG] Not able to run examples in swagger 2.0 #2357

Closed ravy closed 3 months ago

ravy commented 3 months ago

Checklist

Describe the bug

Was trying some examples in swagger 2.0 docs. I found issue:

  1. when not using --dry-run i see a internal error

To Reproduce

🚨 Mandatory 🚨: Steps to reproduce the behavior:

  1. Run this command st run -v --hypothesis-phases=explicit --validate-schema=true -c all -H "Authorization: Bearer root" --generation-allow-x00=False --hypothesis-verbosity=debug --base-url=http://localhost:8083 tree-openapi202.json --show-trace
  2. See error

Please include a minimal API schema causing this issue: minimal api schema attached (see Additional context section)

Expected behavior

expect no internal errors

Environment

platform Linux -- Python 3.9.18, schemathesis-3.32.2, hypothesis-6.103.5, hypothesis_jsonschema-0.23.1, jsonschema-4.22.0

Additional context

this shows the internal error st-swag20-trace.log

this is the sample swagger doc used for testing tree-openapi20.json used https://apitools.dev/swagger-parser/online/ to validate it is proper swagger, no validation error there

Stranger6667 commented 3 months ago

Thanks for reporting! It is caused by a backward-incompatible change I accidentally committed. I'll fix it in the next release. Hopefully, today once I am done with filter implementation.