isDomainEntity function
Implementation
bool isDomainEntity(String name, Map<String, dynamic> schema) {
final lower = name.toLowerCase();
if (lower.contains('request') || lower.contains('dto')) {
return false;
}
if (schema['type'] != 'object' || schema['properties'] == null) {
return false;
}
final props = schema['properties'] as Map<String, dynamic>;
if (props.length == 1 && props.containsKey('message')) {
return false;
}
return true;
}