Skip to content

v0.11.1

Choose a tag to compare

@github-actions github-actions released this 17 Sep 22:22
· 23 commits to master since this release
54854cc
  • Fixed. A readOnly property is now dropped from a request schema — and a
    writeOnly one from a response schema — under additionalProperties as it
    already was under properties, items and the composition keywords. A
    document that keyed its items by name instead of listing them kept the
    property required, so a legal request was reported as
    request.body.schema. not is deliberately left alone: neither
    specification says what a readOnly property means under a negation.
    (#130)
  • Fixed. Contract::requireMatch() names the request path in its
    UnknownOperation message, not the whole URI: a query string and userinfo
    are where a credential travels, and the unmatched violation had printed
    the path alone for exactly that reason. The request.server.mismatch
    diagnostic renders scheme, host and port instead of the PSR-7 authority,
    which carries userinfo the comparison never reads. (#131)
  • Fixed. A Media Type Object declaring the boolean schema false on a
    non-JSON response body now produces response.body.schema, as the request
    side and the JSON branch already did; the opaque branch had read false as
    "no schema declared" and passed the body. (#132)
  • Fixed. Contract::accepts() and SchemaCheck::accepts() raise
    InvalidContract for a schema they cannot read — one that cannot be
    JSON-encoded (NAN/INF, malformed UTF-8, more than 512 levels), or a list
    in place of an object — where the first leaked a raw JsonException and
    the second was read as the empty schema and accepted every value. A schema
    out of a document meets neither: the compiler settles both at load time.
  • Documentation. Four boundaries are now written down: a JSON body deeper
    than 64 levels is reported as *.body.json, which the decoder cannot tell
    from malformed JSON; the schema compilation cache never evicts, so a
    SchemaCheck is one per document; a hand-passed schema may $ref only
    inside itself; and securitySchemes() checks flows and the URL fields
    for shape, not for content. llms.txt no longer names the
    Contract::MAX_* constants that 0.9.0 replaced with Limits.