fix(buildSchemas): add condition if type is object