papsign / Ktor-OpenAPI-Generator

Ktor OpenAPI/Swagger 3 Generator
Apache License 2.0
241 stars 42 forks source link

Header without backtits #50

Closed y9san9 closed 4 years ago

y9san9 commented 4 years ago

I want to create header without '-', but if I create @HeaderParam with name Authorization, this header will not appear in request as there image

ghost commented 4 years ago

same :(

y9san9 commented 4 years ago

If I use '-' then there is no bug image

Wicpar commented 4 years ago

alright, i'll get something done

Wicpar commented 4 years ago

the latest snapshot has @OpenAPIName

    data class NameParam(@HeaderParam("A simple Header Param") @OpenAPIName("X-NAME") val name: String)

I tested it with parameters only, i don't know if it can be used on with request and response types.

y9san9 commented 4 years ago

Thanks, that works pretty well, but still variable with name without backtits and annotation does not puts into request by swagger. For me now it's not problem, but for someone can be Also I will check @OpenAPIName on requests&responses and will open issue if something will be wrong

y9san9 commented 4 years ago

Sorry for mis info, I discrovered that this bug appears only with 'Authorization' header and that's cuz I should use Authorization with your library, can you give me some links ?

Wicpar commented 4 years ago

Alright, closing then. For auth look at #8, it applies to all authentication schemes