You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I am trying to upgrade my project and its dependencies (from JDK 8 to JDK 21). However, when upgrading the openapi-generator-maven-plugin (currently 4.0.0) to any version 5 and above, the authentication with my web service fails.
I have tracked the issue down to the ApiClient's invokeApi method, which used to run updateParamsForAuth to update the parameter lists as its first statement, but in newer versions it runs afterqueryParams and cookieParams have already been processed and thus any new values added to those lists are ignored. So the API key, which my WS expects to receive in the query, is not added.
How does one use apiKey auth parameters in query now?
Before 5.0.0, apiClient.invokeAPI would create the correct query https://mine.site.my/myWS/update?api_key={myKey} before invoking it. From version 5.0.0 onwards, the issue described above occurs: the queryParams are processed, before being updated.
Related issues/PRs
Don't know, I couldn't find any.
Suggest a fix
I don't even know if this is a bug, or intended, since it apparently has been like this for some time now.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
I am trying to upgrade my project and its dependencies (from JDK 8 to JDK 21). However, when upgrading the openapi-generator-maven-plugin (currently 4.0.0) to any version 5 and above, the authentication with my web service fails.
I have tracked the issue down to the
ApiClient
'sinvokeApi
method, which used to runupdateParamsForAuth
to update the parameter lists as its first statement, but in newer versions it runs afterqueryParams
andcookieParams
have already been processed and thus any new values added to those lists are ignored. So the API key, which my WS expects to receive in the query, is not added.How does one use apiKey auth parameters in query now?
openapi-generator version
5.0.0 and higher
OpenAPI declaration file content or url
I hope this is enough of an example.
Generation Details
My openapi-generator-maven-plugin configuration:
This should be (largely) equivalent to:
Steps to reproduce
Well, code wise:
Where
UpdateApi.updateWithHttpInfo
is generated as:Before 5.0.0,
apiClient.invokeAPI
would create the correct queryhttps://mine.site.my/myWS/update?api_key={myKey}
before invoking it. From version 5.0.0 onwards, the issue described above occurs: the queryParams are processed, before being updated.Related issues/PRs
Don't know, I couldn't find any.
Suggest a fix
I don't even know if this is a bug, or intended, since it apparently has been like this for some time now.
The text was updated successfully, but these errors were encountered: