🚀 Added
schemathesis.openapi.require_security_scheme()for scoping auth providers to specific OpenAPI security schemes. #3745
🐛 Fixed
- Query parameters not serialized when
style/explodeare omitted from the spec, ignoring OpenAPI 3.0 defaults. - Use the matching registered serializer for multipart fields with
encoding.contentType. #3785 before_callhook setting a missing required header in the coverage phase had no effect. #3784- Request timeouts reported as a check failure when a replay made them flaky.
positive_data_acceptance false positives
-
examplevalues violating constraints (examples phase):- When an object schema-level
examplehas a property violating a nestedformatconstraint (e.g.date-timewithout timezone). - When a parameter-level
examplevalue violates its declared schema type. - When a schema-level parameter
exampleviolates the parameter's own constraints (e.g.pattern). - When a response-derived parameter example violates the parameter's schema constraints.
- When a response-derived parameter example violates the parameter's
formatconstraint. - When a property
exampleviolates its field's own type (also applies to the coverage phase). - For content-encoded header parameters with object examples.
- For property examples violating
anyOf/oneOfconstraints via bundled$refs. - For array body properties with
minItems> 1 and object items. - When assembled body violates the schema (e.g.
allOfwithadditionalProperties: false). - When a required property has an unsatisfiable schema.
- When an object schema-level
-
Composition (
allOf/oneOf/anyOf/$ref) in the coverage phase:- For
oneOfbranches with nested multi-$refallOf. - For
oneOfbody schemas where generated values satisfy multiple branches simultaneously. - For
oneOfbody schemas where a branch requires fields only defined in the parent schema. - When an
anyOfbranch hasconst: nullbut a siblingtypeconstraint excludesnull. - When a multi-level
allOfchain causes required properties from a base schema to be generated asnull. - For body schemas with
$ref+additionalProperties: falseandpattern/minLength/maxLengthconstraints.
- For
-
enumvs sibling constraints (coverage phase):- For required array properties with an unsatisfiable
enumconstraint. - For body properties where all
enumvalues violate a sibling constraint (e.g.maxLength). - When an enum contains values violating the declared
type(e.g. YAML-parsedfalsefortype: string). - When
enumcontains values violating the declaredtypein template body generation.
- For required array properties with an unsatisfiable
-
Structural
required/propertiesmismatches:- When a nested required field is unsatisfiable, making the parent object invalid (coverage phase).
- When
requiredlists fields absent fromproperties(examples phase). - When a nested object schema has
requiredproperties absent fromproperties(coverage phase). - When a property has
type: objectalongsideitems(coverage phase). - When a property has a boolean
falseschema (coverage phase). - For
type: stringproperties that also declareproperties: {}(coverage phase).
-
Pattern / keyword combinations (coverage phase):
- For string parameters with
patterncontaining alternation inside a quantified group (e.g.([a-z]|-[a-z])*). - For string fields with
format: uuidand optional-hyphenpattern. - When a schema has
patternalongside a non-stringtype(e.g.number). - When
propertyNamesrestricts object keys andadditionalPropertiesis present. #3771 - For body properties with
formatconstraints in negative mode.
- For string parameters with
negative_data_rejection false positives
-
pattern+ length-constraint interaction:- For string fields with
pattern+maxLengthwheremaxLengthwas silently lost into an unanchored regex quantifier. - For string fields where
patternhas an inner quantifier (e.g.^[a-z]([-a-z]*[a-z])?$) andmaxLengthis present. - When a
patternoptional group wraps variable-length content andmaxLengthis present (coverage phase). - When
patternwith nested quantifiers causedmaxLength/minLengthto be silently dropped from the schema. - For
patternfields ending with\x1c–\x1fcontrol characters (coverage phase).
- For string fields with
-
Wire-identical type mutations:
- For
application/x-www-form-urlencodedandapplication/xmlbody properties where type mutations are wire-identical (e.g.integerstringifies to a valid string). - For
application/x-www-form-urlencodedbody properties whose schema contains$refto bundled definitions. - For
application/x-www-form-urlencodedbody properties with nested array/object mutations whose serialized form satisfies the schema.
- For
-
Schema-shape edge cases (coverage phase):
- When
additionalPropertiesis a schema object andrequiredhas exactly 2 fields. - When a schema has 15 or more
propertiesand exactly 2 required fields. - For body objects with
additionalProperties: {}. - For nullable string properties with
maxLength,minLength, orformatconstraints. - When a string property has both
enumandmaxLength/minLength. - For body properties with
type: integerand inapplicableminLength/maxLengthconstraints. - For
multipart/form-datafields withformat: binaryandnullable: true. #3777 - For
maxItemsarray constraints with complex nested item schemas.
- When
Runtime errors in negative_data_rejection
- When a query, header, or cookie parameter
patternproduces a large DFA (e.g.\S{1,8192}). - When a parameter schema has a
patternthat jsonschema_rs rejects (e.g.{,3}as an incomplete quantifier).
Crashes
- Crash generating curl command when a negative coverage case has a primitive body (e.g.
integerform-urlencoded schema). - Crash in the coverage phase for
application/x-www-form-urlencodedrequests withformat: binarybody fields in negative mode. - Crash in the examples phase when a property has an unsatisfiable schema (e.g.
not: {}). - Crash when a schema has boolean property keys (YAML artifact from bare
on:fields) in the coverage phase. - Crash in the coverage phase when a body with boolean property keys is serialized for deduplication in negative mode.
Schema-invalid generated bodies (coverage phase)
- Schema-invalid body when
requirednames a property absent frompropertiesin the coverage phase. - Schema-invalid body when a Swagger 2.0 array parameter has
enumat the array level withitemsalso defined in the coverage phase. - Schema-invalid positive body when a schema combines
allOf(with required fields) and outer-levelpropertiesin the coverage phase. - Schema-invalid positive body when a schema property's
defaultorexamplefailsformatvalidation (e.g."7.00:00:00"forformat: duration) in the coverage phase.