# `mix lattice_stripe.check_drift`
[🔗](https://github.com/szTheory/lattice_stripe/blob/v2.2.2/lib/mix/tasks/lattice_stripe.check_drift.ex#L1)

Compares Stripe's published OpenAPI specification against LatticeStripe's
`@known_fields` module attributes and reports any drift.

Downloads the latest `spec3.json` from the `stripe/openapi` GitHub
repository and checks every module registered in the ObjectTypes registry
for field additions (in spec, not in `@known_fields`) and field removals
(in `@known_fields`, not in spec).

Also reports Stripe object types present in the spec that have no
corresponding entry in the ObjectTypes registry.

## Usage

    # Check for drift (downloads spec on each run):
    mix lattice_stripe.check_drift

## Exit codes

- `0` -- no drift detected; all `@known_fields` match the spec
- `1` -- drift detected; report printed to stdout

---

*Consult [api-reference.md](api-reference.md) for complete listing*
