I am working on a script to generate test data using faker and JSON-Schema-Faker packages.
Looking for examples with "schema inheritance" and optional fields. For example, I have a 'user' object with mandatory fields: '_id', 'firstName', 'lastName', 'username', 'email' and one [and only one of]: customerProfile, partnerProfile and adminProfile. Each of optional fields, when present: keeps a non-empty array of values which correspond to another schema.
Please point me to relevant examples.