Skip to content

v1.8.0

Choose a tag to compare

@tsitsishvili tsitsishvili released this 13 Jul 09:40
· 39 commits to main since this release
bd92ede

Documentator v1.8.0

This release makes Documentator's inference more accurate, explainable, and
better suited to OpenAPI contract enforcement.

Highlights

  • Added documentator:explain METHOD URI to show which extraction strategies
    produced each parameter, field, and response. Use --json for tooling.
  • Added --fail-on=breaking to
    documentator:check --against=<spec>, allowing additive changes while
    rejecting breaking contract changes.
  • Added inference for responses produced by abort, abort_if,
    abort_unless, authorization checks, and recognized HTTP exceptions.
  • Added PHP 8.5 to the test matrix.

Schema improvements

  • Resource fields are now marked required more accurately.
  • Conditional when* and mergeWhen fields are optional instead of nullable.
  • Resource composition preserves field descriptions, @var types, and
    examples.
  • Spatie Data schemas respect input/output name mapping and Optional or
    Lazy properties.
  • Distinct responses sharing a status code are represented with oneOf.
  • OpenAPI comparison now follows local references and checks constraints,
    nullability, composites, headers, security scopes, and additional
    properties.

Upgrade notes

This release has no intended package-level breaking changes. However,
regenerated OpenAPI documents may change because required fields, conditional
fields, error responses, and same-status response branches are now modeled more
accurately. Review the generated contract diff before updating committed
specifications or generated clients.

composer require tsitsishvili/documentator:^1.8

Full Changelog: v1.7.1...v1.8.0