Treat {"type": [...]} and {"oneOf": [...]} differently. In particular, the type schema will be parsed into a LegacyUnionType, whereas the oneOf schema will parse into a UnionType.
{"type": [...]}
{"oneOf": [...]}
type
oneOf