Adjusted mergeSchemas to handle array type objects such as enum