Summary
PR #590 (closing #583) unwrapped RootModel-typed fields to their bare root shape. A RootModel registered as a top-level entry point is still mishandled: extract_model_spec extracts it as a top-level RecordSpec, producing a spurious root column in the generated Spark schema, and the markdown reference omits it entirely.
Behavior
A RootModel entry point has no record structure of its own -- it serializes as its bare root value, a named alias over that shape like a NewType. Two problems follow.
Expression generation emits a struct with a synthetic root column -- the same wrong shape #583 described, one level up at the entry-point boundary rather than at a field.
Markdown generation drops it entirely: a RootModel is a named alias readers still need documented, but it reaches the markdown pipeline through no field tree, since a RootModel field unwraps to its bare shape and names no type.
Expectation
Skip RootModel entry points from expression generation -- an entry point is a contribution mechanism (a type usable as a field elsewhere), not only a top-level record to generate.
Document a RootModel entry point in markdown as a type alias over its bare root shape, reusing the NewType page since both are named aliases over an underlying shape.
Edge case
A self-referential RootModel (RootModel[list["Self"]]) has no finite bare shape and no node to carry a cycle back-edge, so the bare-shape unwrap recurses forever and surfaces as an opaque RecursionError. It should fail with a clear error instead.
Summary
PR #590 (closing #583) unwrapped RootModel-typed fields to their bare root shape. A RootModel registered as a top-level entry point is still mishandled:
extract_model_specextracts it as a top-levelRecordSpec, producing a spuriousrootcolumn in the generated Spark schema, and the markdown reference omits it entirely.Behavior
A RootModel entry point has no record structure of its own -- it serializes as its bare root value, a named alias over that shape like a NewType. Two problems follow.
Expression generation emits a struct with a synthetic
rootcolumn -- the same wrong shape #583 described, one level up at the entry-point boundary rather than at a field.Markdown generation drops it entirely: a RootModel is a named alias readers still need documented, but it reaches the markdown pipeline through no field tree, since a RootModel field unwraps to its bare shape and names no type.
Expectation
Skip RootModel entry points from expression generation -- an entry point is a contribution mechanism (a type usable as a field elsewhere), not only a top-level record to generate.
Document a RootModel entry point in markdown as a type alias over its bare root shape, reusing the NewType page since both are named aliases over an underlying shape.
Edge case
A self-referential RootModel (
RootModel[list["Self"]]) has no finite bare shape and no node to carry a cycle back-edge, so the bare-shape unwrap recurses forever and surfaces as an opaqueRecursionError. It should fail with a clear error instead.