Hi, I faced a special case in which the result would have an incompatible property.
Here is the thing: we have an interfaceCustomFieldEnabledDto which has nested object and the property name is the same: { customFields: { customFields: { [index: string]: any } } }; But sometimes we want to return the value with @JsonUnwrapped like the UnwrappedDto: { customFields: { [index: string]: any } }.
Code snapshot:
In the result, UnwrappedDto would have a warning from IDE as the 'customFields' is incompatible with theCustomFieldEnabledDto.
Hi, I faced a special case in which the result would have an incompatible property.
Here is the thing: we have an interface
CustomFieldEnabledDto
which has nested object and the property name is the same:{ customFields: { customFields: { [index: string]: any } } }
; But sometimes we want to return the value with@JsonUnwrapped
like theUnwrappedDto
:{ customFields: { [index: string]: any } }
.Code snapshot:
In the result,
UnwrappedDto
would have a warning from IDE as the 'customFields' is incompatible with theCustomFieldEnabledDto
.Code: https://replit.com/@YuerLee/typescript-generator-duplicate-name#target/api.ts
///
Not sure that could we detect the duplicate properties and use
Omit
to avoid the error? e.g.,