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
{{ message }}
Repository navigation
[REQ][Java][okhttp-gson] Support the OkHttp 5 JVM artifact in Maven output #25852
OpenAPI Generator 7.28.0 generates a Java okhttp-gson Maven project with com.squareup.okhttp3:okhttp:4.12.0. On the current master branch, the okhttp-gson template still emits those coordinates. Maven consumers moving the generated project to OkHttp 5 also need the JVM artifact. Changing the version property alone leaves the multiplatform facade declared as the direct dependency.
Compilation succeeds in this example because the logging interceptor supplies the JVM artifact transitively. The OkHttp Maven setup documents okhttp-jvm as the direct artifact for JVM consumers.
Suggested change
Consider supporting a coordinated OkHttp 5 selection in the okhttp-gson Maven template, where the direct dependency is okhttp-jvm and the interceptor uses the same version. The new okhttp library from #25713 already emits okhttp-jvm; its Maven dependency logic could be shared or used as an implementation example. A generated Maven fixture with the Jakarta option can verify both the direct dependency and a compiled sample.
Router PR 811 works around the existing template with a Maven fixture declaring okhttp-jvm and logging-interceptor directly at 5.5.1. The generated client compiled and passed the HTTP round-trip probe with that pair.
Activity