Add symphony-bdk-http-jdk: a java.net.http.HttpClient-based ApiClient transport - #894
Merged
Merged
Conversation
…nos#893) * Propose OpenSpec change: JDK HttpClient-based ApiClient transport Adds a third symphony-bdk-http implementation on top of java.net.http.HttpClient, giving consumers a zero-third-party-dependency alternative to jersey2/webclient. * Deprecate jersey2's default status in favor of symphony-bdk-http-jdk (D12) symphony-bdk-http-jersey2 carries the largest dependency/CVE surface for a filter-chain benefit nothing in the codebase uses. Make the new jdk module the documented default for symphony-bdk-core and mark jersey2's public classes @API(DEPRECATED) as a soft, non-removing signal — no functional change, no forced migration.
…iClient Implements the OpenSpec change jdk-httpclient-transport: a third ApiClient implementation with zero third-party HTTP dependencies, becoming the new documented default for symphony-bdk-core. symphony-bdk-http-jersey is deprecated (soft, non-removing @API status change) in that role but keeps shipping unchanged.
- Document ClassCastException risk in addFilter due to generics erasure - Wrap InvalidPathException from file.toPath() in ApiException for multipart uploads - Normalize slashes between basePath and path when building request URIs
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the OpenSpec change
jdk-httpclient-transport:symphony-bdk-http/symphony-bdk-http-jdk, anApiClient/ApiClientBuilder/ApiClientBuilderProviderimplementation built directly onjava.net.http.HttpClient(JDK 11+), with zero third-party HTTP dependencies.symphony-bdk-http-jerseywhere the shared contract requires it: query/form/multipart encoding (hand-rolled multipart, sinceHttpClienthas no built-in support), JSON serialization parity,X-Trace-Idpropagation, file-download responses, TLS client certs, HTTP proxy + proxy auth, outgoing request logging, and exception translation into the root-cause typesRetryWithRecoveryBuilder's retry predicate already recognizes (ConnectException,SocketTimeoutException).HttpClient), andaddFilteronly accepts request-mutatingFunction<HttpRequest.Builder, HttpRequest.Builder>(no response-filter chain).ServiceLoadermechanism (META-INF/services/...ApiClientBuilderProvider).symphony-bdk-http-jdkbecomes the new documented default forsymphony-bdk-core(docs/getting-started.md,docs/tech/architecture.md,docs/migration-4.x.md), shipped@API(EXPERIMENTAL)given the hand-rolled multipart encoder is the highest-risk, least battle-tested piece.symphony-bdk-http-jersey's public classes (ApiClientJersey2,ApiClientBuilderJersey2,ApiClientBuilderProviderJersey2) move from@API(STABLE)/@API(INTERNAL)to@API(DEPRECATED)— a soft, non-removing signal with javadoc pointing at the replacement. The module keeps shipping, keeps itsServiceLoaderregistration, and gets no functional changes.openspec/changes/archive/2026-08-12-jdk-httpclient-transport, capability spec promoted toopenspec/specs/jdk-http-transport/spec.md.Not breaking: additive module + soft deprecation only. No changes to
symphony-bdk-http-api's contract, generated code, or existing published artifacts.Test plan
./gradlew :symphony-bdk-http:symphony-bdk-http-jdk:build— unit + MockServer-backed integration tests (multipart round-trip, mTLS, proxy, proxy auth, exception translation, trace-id propagation, JSON parity, file download)./gradlew :symphony-bdk-http:symphony-bdk-http-jdk:spiConflictTest— dedicated source set assertingServiceLookup.lookupSingleServicethrowsIllegalStateExceptionwhen jersey2 is also present./gradlew :symphony-bdk-http:symphony-bdk-http-jdk:jacocoTestCoverageVerification— passes at the same 90% per-class barsymphony-bdk-http-webclientenforces./gradlew :symphony-bdk-http:symphony-bdk-http-jersey:build— confirms the deprecation annotation change is source-compatible, no behavioral change./gradlew build(full repo) — no regressions./gradlew :symphony-bdk-http:symphony-bdk-http-jdk:dependencies— confirmed no Jersey/Apache-HttpClient/Reactor-Netty/jjwt/BouncyCastle transitive dependency