Conversation
|
Btw original implementation already did that, so it added indexes only if there was any duplicate. This is seen from Unit tests. The only breaking change was, that method name was attached at the end everytime. But this could be easily fixed :) |
No completely true, the original implementation also modified the first duplicate operationId adding a |
|
This PR will be included in 2.6.1 release that will target Micronaut 2.5.x |
|
I agree. But in that case there is no big difference. Because you cannot know what operation id was first if you don't track history. For example you have: And then in next release you add: It's not possible to know what method was original with name index, so you might break user expected "operation id" value anyway. Maybe Micronaut could create even more unique operation ids, or just copy Spring behavior that will please most people :) But good think you fixed that, so it does not break user experience, thank you! My bad that I added breaking behavior |
|
I've copied Spring behavior for this with the suffix Don't need to apologies, I should have spent more time in the first place reviewing the original PR. Thanks for your contribution :) |
Fixes #361
This PR reverts and improves the changes done in #498 to only generate unique operationIds when there is a duplicate. It modifies a bunch of tests that should have never been changed in the first place.
I've followed what Spring Boot does and only adds a suffix
_numberwhen there is a duplicate instead of doing it for every single operationId.P.S: It's easier to review the PR as separate commits. The first one (a717c28) fixes the problem and the second (bcf992a) changes the tests to its original state.