def get_surface_specs(surface):
    """ Get the OpenAPI specifications of a SED surface

    Args:
        surface (:obj:`Surface`): surface

    Returns:
        :obj:`dict` with schema `SedSurface`
    """
    specs = {
        '_type': 'SedSurface',
        'id': surface.id,
        'xDataGenerator': surface.x_data_generator.id,
        'yDataGenerator': surface.y_data_generator.id,
        'zDataGenerator': surface.z_data_generator.id,
    }

    if surface.name:
        specs['name'] = surface.name

    return specs