json2typescript icon indicating copy to clipboard operation
json2typescript copied to clipboard

Feature Request: Workaround for Duplicate Class Names Between Local Code and Dependency

Open angad-singh15 opened this issue 3 years ago • 1 comments

After reading your documentation, I understand that the @JsonObject decorator now requires the class identifier as the first parameter. However, one of my dependencies for my project also uses to Json2Typescript and has a conflicting class name with one of my own. Is there a way I can have Json2Typescript separate the use of the duplicate class names?

Thanks in advance!

angad-singh15 avatar Jun 01 '22 16:06 angad-singh15

Have you thought about using a namespace for the class identifier?

For example you could use com.company.Classname instead of Classname as identifier.

andreas-aeschlimann avatar Jun 01 '22 18:06 andreas-aeschlimann

I also recommend to encourage the third-party dependency to use unique names for their class identifiers.

If you have something more to add, feel free to reopen the issue.

andreas-aeschlimann avatar Aug 21 '22 21:08 andreas-aeschlimann