def get_data_set_specs(data_set):
    """ Get the OpenAPI specifications of a SED data set

    Args:
        data_set (:obj:`DataSet`): data set

    Returns:
        :obj:`dict` with schema `SedDataSet`
    """
    specs = {
        '_type': 'SedDataSet',
        'id': data_set.id,
        'dataGenerator': data_set.data_generator.id,
    }

    if data_set.name:
        specs['name'] = data_set.name
    if data_set.label:
        specs['label'] = data_set.label

    return specs