Open mszan opened 2 years ago
I can confirm this, in general Authentication/Authorization is very buggy at the moment and should be redone from scratch, good code is not when there is nothing more to add, its when there is nothing more to delete
Same here. Did you manage to go around this issue in any way?
Same here. Did you manage to go around this issue in any way?
The trick is I did not. I've adjusted my backend to avoid this issue, so what I've got now is one securitySchemes entry (Apikey
) and second entry (Loginkey
) being passed via headers in each request. It's not perfect but does the job.
Hey, I also had this issue (retrofit library) and I managed to make a more general workaround by simply removing the imports and using fully-qualified names of classes. It's not super pretty, but it's generated code so it's not that big of a deal.
I don't think the imports can be fixed properly in the template otherwise, using the variables that are currently being passed... If there's a way to customise those, too, then maybe, but I couldn't find how.
This is the modified template file in case anyone is interested: template.zip
I'm hitting this issue as well... apparently 2 years after it's been reported here. In my case I am generating a Kotlin Retrofit client at build time (Android TV app), so I can't tweak the generated output on-the-fly; it gets overwritten every time it builds. Has anyone else figured out a way to get around this bug with a similar setup?
Description
With the following spec:
Kotlin generator produces this:
References:
openapi-generator version
Tested both on 5.4.0 and 6.0.1.