Skip to content

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 10:58
· 23 commits to master since this release
11838a6
  • Changed. The seven value categories of NegativeRequestCaseArbitrary —
    type, enum, const, boundary, length, format and pattern —
    target optional parameters as well as required ones. Each writes its invalid
    value into the case, so a parameter the valid case leaves out is carried by
    the negative one, and the contract judges a present optional parameter by
    its schema exactly as it judges a required one; only forOperation()
    (missing-required) still needs a required component. Pagination and
    filtering are usually declared optional, so a document shaped that way had
    no constructible boundary, type, format or pattern case at all. An
    operation that gains its first constructible category through this now runs
    the negative phase of OperationProperty, and an application that accepts
    an out-of-range optional parameter is reported by it (#93).
  • Added. pages.get in the zoo: pagination and filtering with every
    constrained parameter optional, one per value category, which gives the
    recorded corpus the const, format and pattern kinds it had no source
    for.
  • Added. Seven body value categories on NegativeRequestCaseArbitrary —
    bodyTypeMismatchForOperation(), bodyEnumMismatchForOperation(),
    bodyConstMismatchForOperation(), bodyBoundaryMismatchForOperation(),
    bodyLengthMismatchForOperation(), bodyFormatMismatchForOperation() and
    bodyPatternMismatchForOperation() — overwrite one top-level property of
    the required JSON body (or its scalar root, $) with the witness its schema
    provably rejects and record the parameter kind with
    misuse.location = 'body'. A format: email or a pattern on a body
    property had no negative case at all before: only the body as a whole did.
    The request-direction schema is searched, so a readOnly property is never
    targeted; a body declared under several media types is mutated on its JSON
    alternative only. ContractSuite::negativeCases() weights the seven
    alongside the existing categories, so an operation whose only constraints
    live in its body now runs the negative phase of OperationProperty (#94).
  • Added. profiles.create in the zoo: one constrained top-level body
    property per value category, which puts the body kinds into the recorded
    corpus.
  • Internal. The response side's body witness search moved out of
    ResponseTargets into JsonBodyWitness, shared with the request side; the
    response categories are unchanged.