My controller has 2 methods logout and logoutOnDevice with same prefix logout.
Thats why AutoSwagger respects the last comment block and use that for both
/**
* @logout
* @summary Logout a user
* @responseBody 200 - { message: "Logged out successfully" }
*/
async logout({ auth }: HttpContext) {
await this.authService.logout(auth.user!)
return 'Logged out successfully!'
}
/**
* @logoutOnDevice
* @summary Logout a user on specific device
* @responseBody 200 - { message: "Logged out successfully" }
*/
async logoutOnDevice({ request, params, auth }: HttpContext) {
await this.authService.logoutOnDevice(auth.user!, params.id)
return 'Logged out successfully!'
}
AutoSwagger searchs for action name on comments by includes()
My controller has 2 methods logout and logoutOnDevice with same prefix logout. Thats why AutoSwagger respects the last comment block and use that for both
AutoSwagger searchs for action name on comments by includes()
This part causing the bug