If there is a header parameter in swagger.json, then the gradle code generation plugin generates a code for the corresponding endpoint with a function argument of this header, but it does not add this header to a request.
Using openAPI generation directly you can face the same issue when using "kotlin-ktor-client" generator (there is no such bug using "kotlin" generator with "multiplatform" library, but this code seems to be outdated for new kotlin version).
The generated code looks like this:
override public suspend fun endpoint(authorization: kotlin.String) : Response {
...
with(builder.headers) {
append("Accept", "application/json")
}
...
}
There is no usage of an "authorization" parameter in a function body.
If there is a header parameter in
swagger.json
, then the gradle code generation plugin generates a code for the corresponding endpoint with a function argument of this header, but it does not add this header to a request.Using openAPI generation directly you can face the same issue when using "kotlin-ktor-client" generator (there is no such bug using "kotlin" generator with "multiplatform" library, but this code seems to be outdated for new kotlin version).
The generated code looks like this:
There is no usage of an "authorization" parameter in a function body.