Function flattenSchema

  • A Helper to flatten a schema. This will add additional "$ref" items instead of nested items. This will perhaps help to reduce the amount of data.

    Author

    M.Karkowski

    Export

    Returns

    The Adapted Item.

    Parameters

    • schema: IJsonSchema

      The Schema used as input. This will be flattend

    • Optional prePath: string = "root"

      The Name of the Schema. It is used for the "main" definition

    • Optional postPath: string = ""

      An additional path for every item which is added to the name. example "msg"

    • Optional splitChar: string = SPLITCHAR

      The char to split the elements.

    • Optional definitions: IJsonSchema = ...

    Returns IJsonSchema

Generated using TypeDoc