WebApiToTypeScript icon indicating copy to clipboard operation
WebApiToTypeScript copied to clipboard

Handle collisions in enums by growing the name prefix with namespace parts

Open greymind opened this issue 8 years ago • 0 comments
trafficstars

Currently, two enums with same name, but under different namespaces collide and we generate a warning. Instead, we can "grow" the name by prefixing the minimum namespace parts required to make it identical.

For example:

namespace Something.Else.Here {
    enum EnumType {
    }
}

namespace Something.There.Here {
    enum EnumType {
    }
}

The generated names can be

ElseHereEnumType
ThereHereEnumType

Perhaps do this for other types as well

greymind avatar Jun 19 '17 13:06 greymind