-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] java native: oauth files not being generated #8702
Comments
i also tried with the latest snapshot OPENAPI_GENERATOR_VERSION=5.1.0-SNAPSHOT |
Likely the OAuth is not yet supported in the Native client. May I know if you've time to contribute a fix by copying the template from other clients (http libraries) ?
|
thanks @wing328 i think i was thrown off as the readme doc generated for native in the example had OAuth. So was not sure if it was supported or not. The default which is okhttp supports oauth and looks good setting access token. I havent looked into the impl yet around refresh and how that works. is there an example in the repo of RetryingOAuth? Realistically, im a bit swamped with meetings at the moment so cant commit anytime. I might see if my team has capacity to investigate. // google-api-client doesn't use the OpenAPI auth, because it uses Google Credential directly (HttpRequestInitializer)
if (!(GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || usePlayWS
|| NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("auth/OAuth.mustache", authFolder, "OAuth.java"));
supportingFiles.add(new SupportingFile("auth/OAuthFlow.mustache", authFolder, "OAuthFlow.java"));
} Im guessing these are the libs that do not support oauth right now? |
Configuration.setDefaultApiClient(new ApiClient(clientId, clientSecret, parameters)); i believe this then incorporates the retry mechanism. Will test it out. |
Any update on this issue? |
Any update on this ? |
+1 |
Bug Report Checklist
Description
oauth files not generated for java native http client
openapi-generator version
5.0.1
OpenAPI declaration file content or url
(for YAML code) or
Generation Details
Steps to reproduce
If i change to another client like the default, then i see the oauth files
Related issues/PRs
#6284
Suggest a fix
The text was updated successfully, but these errors were encountered: