Skip to content

Commit

Permalink
Add Ulrik's code improvement suggestion (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbooms authored Oct 7, 2024
1 parent 42f621d commit 733678d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ class KtorControllerInterfaceGenerator(
val authNames = if (operation.hasSecurityRequirements()) {
operation.securityRequirements
.filter { it.requirements.isNotEmpty() }
.joinToString(", ") { "\"" + it.requirements.keys.first() + "\"" }
.map { it.requirements.keys.first() }
} else {
// Fall back to the global security requirements
"\"" + this.api.openApi3.securityRequirements.first().requirements.keys.first() + "\""
}
listOf(this.api.openApi3.securityRequirements.first().requirements.keys.first())
}.joinToString(", ") { "\"$it\"" }

builder
.addStatement(
Expand Down

0 comments on commit 733678d

Please sign in to comment.