-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
okhttp-gson: fix SSL settings with okhttp3 #4226
Conversation
Using a generator with OpenAPITools/openapi-generator#4226 applied.
The old code used to work with older okhttp (< 3), but will throw NullPointerExceptions with okhttp3.
f11d2a6
to
bfe40c8
Compare
Using a generator with OpenAPITools/openapi-generator#4226 applied.
Using a generator with OpenAPITools/openapi-generator#4226 applied.
Using a generator with OpenAPITools/openapi-generator#4226 applied.
Using a generator with OpenAPITools/openapi-generator#4226 applied.
CI failures seem unrelated. |
@fabiokung can you paste a re-pro for the NPE issue? thanks |
@yue9944882 any usage of For example, without changes in here, the snippet below throws a NPE: ApiClient api = new ApiClient();
api.setVerifyingSsl(true); |
the default construction of |
CircleCI failure has been addressed in the master (it's a bad change in CircleCI image that they've rolled back the change) |
I'm able to repeat the NPE issue with |
ApiClient can be treated as a wrapper of the underlying HTTP library for any endpoints/hosts specified in the OpenAPI doc/spec |
Filed #4252 to add a test covering the issue moving forward. |
Using a generator with OpenAPITools/openapi-generator#4226 applied.
Using a generator with OpenAPITools/openapi-generator#4226 applied.
Using a generator with OpenAPITools/openapi-generator#4226 applied.
depends on yue9944882/gen#1 okhttp3 and models generated by openapi-generator Changes required to make everything compile with models generated by openapi-generator (instead of swagger-codegen). These changes break backwards compatibility, it will require a new major version release. pin sundrio to 0.19.2 it includes sundrio/sundrio#156 reformat code (./mvnw fmt) depend on javax.annotation:javax.annotation-api to make javax.annotation.Generated work with Java 9 prevent Travis builds failing because of no output ... when tests take more than 10min to complete. javadoc generation for http.response.details drop the TODO, not needed anymore remove reference to swagger-codegen no gson internals for date parsing/formatting Reapply changes from kubernetes-client#366 to the code generated by openapi-generator, and keep the JSON file pinned (ignored by the generator) until those changes make it into the generator. regenerate code with SSL bootstrapping fix Using a generator with OpenAPITools/openapi-generator#4226 applied. re-generate from v4.2.0
The old code boostrapping TLS settings used to work with older okhttp (< 3), but will throw NullPointerExceptions with okhttp3, which I noticed while working on kubernetes-client/java#709.
cc @wing328 @yue9944882 @brendandburns