getApiFields static method

List<String> getApiFields(
  1. List<Column> columns
)

Implementation

static List<String> getApiFields(List<Column> columns) {
  return columns.map((column) {
    if (column.relation?.relationType == RelationType.OneToMany) {
      final relationFields = DhisUrlGenerator.getApiFields(
          (column.relation?.referencedEntityColumns ?? []) as List<Column>);

      return '${column.name}[${relationFields.join(',')}]';
    }

    return column.name ?? '';
  }).toList();
}