-
Notifications
You must be signed in to change notification settings - Fork 924
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug where duplicate parameters are shown in DocService (#4645)
Motivation: When an annotation is applied to Kotlin data class, Kotlin compiler constructor parameters with the annotation and adds the fields as well. ```kt data class ExampleQueries( @param val application: String, @param val topic: String, @param val group: String, ) ``` Annotated services extract both the fields from the constructor and fields using reflection. The problem was reported by #3454 and fixed by #3461. However, there is a bug in detecting duplicates. See for the detail. #3454 (comment) Modifications: - Check both `httpElementName` and `anntationType()` if they are not equal to provide a consistent comparison. Result: You no longer see duplicate parameters in `DocService` when parameter annotations for a request object are added to Kotlin data class.
- Loading branch information
Showing
2 changed files
with
67 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters