Closed Javatar81 closed 1 month ago
Hi @Javatar81 Thanks for using kiota and for reaching out. This is most likely because the refiner which adds the getters/setters doesn't check for conflicts before it does so.
We'd need to come up with a deterministic logic which does not depend on the order of the properties or does not impact the name normalization to language conventions. Maybe the logic would be to "undo" the normalization when we run into a collision (only possible when characters have been removed due to normalization). What do you think?
Another option would be normalizing the field name instead of the getter name and then derive the getter name from the normalized field name. The advantage would be that the getter name would always be equal to "get" + first upper fieldName and the collision would consistently occur for fields and getters (as long as they are processed in the same order)
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I have an OpenAPI spec (from Keycloak) that defines a deprecated attribute named
authTime
(of type Integer) and another attribute calledauth_time
(of type Long).Kiota generates both fields but only one getter as follows:
This leads to the following compile error in the serialize method: