Modelina
    Preparing search index...

    Function NO_DUPLICATE_PROPERTIES

    • Because a lot of the other constrain functions (such as NO_NUMBER_START_CHAR, NO_EMPTY_VALUE, etc) they might manipulate the property names by append, prepend, or manipulate it any other way. We then need to make sure that they don't clash with any existing properties, this is what this function handles. If so, prepend reserved_ to the property name and recheck.

      Parameters

      • constrainedObjectModel: ConstrainedObjectModel

        the current constrained object model, which contains already existing constrained properties

      • objectModel: ObjectModel

        the raw object model which is non-constrained to the output language.

      • propertyName: string

        one of the properties in objectModel which might have been manipulated

      • namingFormatter: (value: string) => string

        the name formatter which are used to format the property key

      Returns string