Skip to content

docs: simplify redundant KDoc across the SDK surface#210

Merged
OmarAlJarrah merged 1 commit into
mainfrom
docs/simplify-kdoc
Jul 8, 2026
Merged

docs: simplify redundant KDoc across the SDK surface#210
OmarAlJarrah merged 1 commit into
mainfrom
docs/simplify-kdoc

Conversation

@OmarAlJarrah

Copy link
Copy Markdown
Member

What

Simplifies redundant KDoc across the SDK. This is a comments-only change — no
behavioral or API changes (the binary-compatibility snapshots are untouched).

Most of the SDK's docstrings are in good shape and carry genuine design
rationale. The noise that had accumulated was mechanical and concentrated,
mostly in fluent builders.

Changes

  • Builder-setter boilerplate. Fluent setters carried a @return This builder.
    tag and @param tags that only echoed the parameter name, on top of a one-line
    summary that already said everything. Collapsed these to one-line summaries.
    Where a tag carried a real fact (a nullability note, an example value, a
    constraint, a @throws), the fact is folded into the summary rather than
    dropped. Brings the Response, Request, Headers, and IdempotencyKeyStep
    builders in line with the terse setter style the transport and options builders
    already use.
  • Duplicated-across-overloads rationale. Blocks copy-pasted verbatim across
    sibling overloads (ClientLogger.at*, the Reactor/AsyncHttpPipeline
    send/execute pairs, the proxy-resolution source list) are reduced to one
    canonical copy plus a cross-reference.
  • Facts stated more than once in a file (e.g. HttpException/NetworkException
    retryability, RequestRecoveryChain exception semantics) are stated once.
  • Stale reference to an internal planning file removed from the
    AuthChallengeParser KDoc.

What was deliberately kept

The SDK's design rationale — cancellation, thread-safety, equality, and
concurrency contracts, and RFC/WHATWG/JEP citations — is preserved. The goal was
to cut words, not information. Every @throws was kept.

Size

~360 fewer lines across 49 files.

Validation

compileKotlin, ktlint, and detekt pass on the affected modules
(sdk-core, sdk-transport-jdkhttp, sdk-async-reactor, sdk-serde-jackson).

Trim docstring boilerplate that restated the code without adding
information, and de-duplicate rationale that was copy-pasted across
overloads. Comments only — no behavioral or API changes.

- Collapse fluent builder-setter KDoc to one-line summaries: drop
  "@return This builder." and @param tags that only echoed the
  parameter name. Where a tag carried a real fact (a nullability note,
  an example value, a constraint, a @throws), fold it into the summary
  rather than dropping it. This brings the Response, Request, Headers,
  and IdempotencyKeyStep builders in line with the terse setter style
  the transport and options builders already use.
- De-duplicate rationale repeated verbatim across sibling overloads
  (ClientLogger.at*, the Reactor/AsyncHttpPipeline send/execute pairs,
  the proxy-resolution source list) down to one canonical copy plus a
  cross-reference.
- Remove facts stated two or three times within a single file, e.g.
  HttpException/NetworkException retryability and RequestRecoveryChain
  exception semantics.
- Drop a stale reference to an internal planning file from the
  AuthChallengeParser KDoc.

Deliberately preserved the SDK's design rationale (cancellation,
thread-safety, equality, and spec-citation notes); the goal was to cut
words, not information. Net ~360 fewer lines across 49 files.
@OmarAlJarrah OmarAlJarrah merged commit 1ac8734 into main Jul 8, 2026
1 check passed
@OmarAlJarrah OmarAlJarrah deleted the docs/simplify-kdoc branch July 8, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant