Optional convenience: flat field list for hand-rolled form rules or tables.
Resolves the top-level $ref, one level of allOf merge, and
per-property $refs. Ordering stays app-side (presentation policy).
Null-union anyOf/oneOf properties (exactly one payload branch plus
null-ish branches, e.g. [{$ref: X}, {type: 'null'}]) are folded into the
payload with nullable: true. Judgment call: a null-ish branch like
{type: ['object', 'null']} (marshmallow-style) actually accepts any
object, so the fold is lossy — the field is presented as payload-typed.
Acceptable because fieldsOf is a metadata view, never validation; the
emitted schemas and AJV behaviour are untouched.
Optional convenience: flat field list for hand-rolled form rules or tables.
Resolves the top-level
$ref, one level ofallOfmerge, and per-property$refs. Ordering stays app-side (presentation policy).Null-union
anyOf/oneOfproperties (exactly one payload branch plus null-ish branches, e.g.[{$ref: X}, {type: 'null'}]) are folded into the payload withnullable: true. Judgment call: a null-ish branch like{type: ['object', 'null']}(marshmallow-style) actually accepts any object, so the fold is lossy — the field is presented as payload-typed. Acceptable becausefieldsOfis a metadata view, never validation; the emitted schemas and AJV behaviour are untouched.