# `Diffo.Provider.Extension.Transformers.TransformInheritedJason`
[🔗](https://github.com/diffo-dev/diffo/blob/v0.9.0/lib/diffo/provider/extension/transformers/transform_inherited_jason.ex#L5)

Surfaces inherited and reverse-inherited results into the TMF JSON view.

`TransformInheritedRefs` injects the Ash calculations for `inherited_place`,
`inherited_party`, and `inherited_characteristic` so they are loadable via
`Ash.load/2`. That
alone keeps the brought-up values off the consumer-visible TMF surface — the
calc result never reaches the `place` / `relatedParty` / `serviceCharacteristic`
/ `resourceCharacteristic` arrays on encode.

This transformer closes that gap. It appends one focused `jason.customize` step
per TMF array — but only for the inherited kinds the resource actually declares:

  * `inherited_place` → `Diffo.Provider.Instance.Util.surface_inherited_places/2`
    (the `place` array)
  * `inherited_party` → `Diffo.Provider.Instance.Util.surface_inherited_parties/2`
    (the `relatedParty` array)
  * `inherited_characteristic` →
    `Diffo.Provider.Instance.Util.surface_inherited_characteristics/2`
    (the `serviceCharacteristic` / `resourceCharacteristic` array)

Each step — at encode time — reads its inherited calc(s) off the record, drops
`%Diffo.Unknown{}` sentinels (X-state is the Diffo diagnostic surface, not the
TMF wire), and appends the concrete structs to its array. Each surfaced struct
encodes via its own `Jason.Encoder`, so subtype fidelity is preserved without
hand-building any TMF object here. See the `Diffo.Provider.Instance.Util`
functions for the runtime logic and the ordering convention.

Single responsibility by design: calc injection stays in `TransformInheritedRefs`
(an API concern), wire surfacing lives here (a TMF concern). The two evolve
independently.

Runs **after** `TransformInheritedRefs` (the calcs must exist) and **before**
`AshJason.Resource.Transformer` (which compiles the `jason do` steps into the
`Jason.Encoder` implementation).

# `after_compile?`

---

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