This issue was detected by running schemathesis on a Claude-generated API.
SQL Syntax Errors (~5-10% of errors, ~11-22 failures):
- Empty lists passed to SQL IN clauses generate invalid SQL: "WHERE id IN ()"
- Example:
GET /api/annot/imageset/uuid/ fails with "OperationalError: near ')': syntax error" when annotations have no associated imagesets
- Root cause: SQL query building doesn't handle empty lists
Example:
This issue was detected by running
schemathesison a Claude-generated API.schemathesistest logs: https://github.com/WildMeOrg/wildbook-ia/blob/api/api_docs/schemathesis/logs/api_claude.txtSQL Syntax Errors (~5-10% of errors, ~11-22 failures):
GET /api/annot/imageset/uuid/fails with "OperationalError: near ')': syntax error" when annotations have no associated imagesetsExample:
GET /api/annot/imageset/uuid/- OperationalError: SQL syntax error "near ')'" when building IN clause with empty imageset IDs (annotations have no associated imagesets)