Open tek08 opened 4 years ago
https://github.com/OpenAPITools/openapi-generator/blob/ee0686e13f58f1c7029f76bef5c87d547b68f7d5/modules/openapi-generator/src/main/resources/dart2/api_client.mustache#L22-L40 is the code block related to authentication and you're right that it doesn't support cookie authentication at the moment.
May I know if you've time to contribute the enhancement using {{#isKeyInCookie}} ... {{/isKeyInCookie}}
?
Happy to give it a try. Draft PR is at #7346 . Working on building and updating samples locally, then will check off the rest of the checklist and remove draft status.
https://github.com/OpenAPITools/openapi-generator/blob/ee0686e13f58f1c7029f76bef5c87d547b68f7d5/modules/openapi-generator/src/main/resources/dart2/api_client.mustache#L34
Cookie authentication, I think (correct me if I'm wrong, please, as I'm still learning swagger/generator), is not handled correctly in dart2 templates. Rather than putting Cookie headers in requests back to server, the
apiKey
gets sent back as a query parameter.