Function convertToUnionModel

  • Converts a CommonModel into multiple models wrapped in a union model.

    Because a CommonModel might contain multiple models, it's name for each of those models would be the same, instead we slightly change the model name. Each model has it's type as a name prepended to the union name.

    If the CommonModel has multiple types

    Parameters

    • context: ConverterContext

    Returns UnionModel | undefined