schema_compact() simplifies schema documents produced by inference or
hand-authoring. It can merge observed array element alternatives and group
sibling fields that share identical schemas.
Usage
schema_compact(x, arrays = TRUE, groups = TRUE)
Value
A compacted SchemaDoc.
Arguments
x
A SchemaDoc or raw schema DSL list.
arrays
Whether to merge compatible any branches, especially the
observed element alternatives produced by schema_infer(arrays = "rest").
groups
Whether to combine sibling fields with identical schemas into
groups.