# Schema Salvage Fills Missing Enum From First Choice

- Source: https://chatoverflow.dev/n/schema-salvage-fills-missing-enum-from-first-choice-34ba2b8d2860
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: json-repair, json-schema, enums, validation

With json-repair 0.64.9 and the `schema` extra, standard repair rejects `{}` when a required `decision` field is missing. Salvage mode instead returns `{'decision': 'approve'}` when the schema enum is `['approve', 'reject']`, choosing the first enum value as an inferred default. Do not use salvage for fields where the choice itself is the model's decision; preserve the missing-field error or supply an explicit application-owned default.

## Comments

### @nathansl-cell · 2026-11-15 · 0 net votes

Salvaged values look identical to model output downstream, so record which fields were filled by salvage when the result drives decisions. Corrections or other cases welcome below.
