Skip to content

docs(gapic-generator-java): fix Wave 1 Javadoc markdown, accuracy, missing docs, and sample hygiene - #86

Open
lqiu96 wants to merge 1 commit into
mainfrom
docs/gapic-wave1-comment-hygiene
Open

lqiu96 wants to merge 1 commit into
mainfrom
docs/gapic-wave1-comment-hygiene

Conversation

@lqiu96

@lqiu96 lqiu96 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

Covers GAPIC-0a, GAPIC-0c, GAPIC-0d, GAPIC-0e, GAPIC-0f, GAPIC-0g, GAPIC-0h, and GAPIC-0i (Wave 1 generator comment/sample hygiene; zero runtime behavioral changes).

Changes

  • GAPIC-0a (SettingsCommentComposer): Replace raw Markdown [RetrySettings](...) (legacy 301 host) and [Client Side Retry Guide](...) links with {@link com.google.api.gax.retrying.RetrySettings} and a <p> HTML anchor to https://docs.cloud.google.com/java/docs/client-retries.
  • GAPIC-0c (ServiceClientCommentComposer): Replace the obsolete *Client resource-name paragraph (which falsely claimed *Client contains format/parse methods) with accurate guidance pointing to generated *Name classes (of, format, parse, isParsableFrom), and fix double-space typos (parse method, based on).
  • GAPIC-0d (ServiceClientCommentComposer): Replace raw Markdown backticks around `OperationFuture` in the HTML methods table with {@link com.google.api.gax.longrunning.OperationFuture}.
  • GAPIC-0e (ClientLibraryPackageInfoComposer): Replace "The interfaces provided are listed below" and ASCII === dividers in generated package-info.java files with accurate client-class wording, <h2>{@link *Client}</h2> headings, and {@link *Client} sample labels.
  • GAPIC-0f (SettingsCommentComposer): Replace the misleading idempotency retry bullet with an accurate statement that default retries and timeouts come from the service's retry configuration, and clarify applyToAllUnaryMethods scope (applies to unary, paged, batching, and LRO initial-call settings; does not apply to streaming methods or LRO polling <method>OperationSettings()).
  • GAPIC-0g (SettingsCommentComposer, ServiceClientCommentComposer, AbstractServiceClientClassComposer, AbstractServiceSettingsClassComposer, AbstractServiceStubSettingsClassComposer, grpc/, grpcrest/, rest/): Differentiate fooSettings() (LRO initial calls) vs fooOperationSettings() (LRO polling + initial-call settings) and getOperationsClient() (gRPC) vs getHttpJsonOperationsClient() (HTTP/JSON); add concise Javadocs to getSettings() (documenting @Nullable return when built from a stub), getStub(), protected *Client(*Stub), protected *Settings(Builder), create(*StubSettings), defaultTransportChannelProvider(), defaultApiClientHeaderProviderBuilder() (plus transport-specific variants), getStubSettingsBuilder(), Builder.build(), and createStub().
  • GAPIC-0h (ServiceClientHeaderSampleComposer, ServiceClientMethodSampleComposer, ServiceClientCallableMethodSampleComposer): Fix undeclared myCredentials and myEndpoint identifiers (eliminating bogus import <pkg>.myCredentials / import <pkg>.myEndpoint imports) with compilable GoogleCredentials.getApplicationDefault() and "my-endpoint:443" declarations plus shutdown close() lines, derive transport overload disambiguation dynamically from transportBuilderMethod instead of hardcoding "useHttpJsonTransport", and fix typos ("emtpy" -> "empty", "reveive" -> "receive").
  • GAPIC-0i (ServiceClientCommentComposer, AbstractServiceSettingsClassComposer, SettingsCommentComposer): Emit a non-empty fallback @param description when a proto request field has no comment (eliminating bare @param doclint warnings), and align getDefaultEndpoint() Javadoc ({@link #getEndpoint()} / {@link #getUniverseDomain()}) and @ObsoleteApi("Use getEndpoint() instead") across *Settings and *StubSettings.

Integration Goldens Note

sdk-platform-java/test/integration/goldens/ (managed separately via Bazel bazelisk run //sdk-platform-java/test/integration:update_*, not invoked by the Maven gapic-generator-java test suite) is intentionally not hand-edited in this PR and should be regenerated via Bazel when upstreaming.

Verification

  • mvn -f sdk-platform-java/gapic-generator-java/pom.xml fmt:check -Dfmt.skip=false (JDK 21): 320 files, 0 non-complying
  • mvn -f sdk-platform-java/gapic-generator-java/pom.xml test (JDK 25): 1,183 tests run, 0 failures, 0 errors (1 pre-existing @Disabled test)
  • JDK 25 javac: compiled regenerated SyncCreateSetCredentialsProvider.golden and SyncCreateSetEndpoint.golden against showcase classes (0 errors)
  • JDK 25 javadoc -Xdoclint:all,-missing: 0 errors, 0 warnings across updated ShowcaseWithEchoPackageInfo.golden, EchoSettings.golden, and EchoStubSettings.golden; verified 0 no description for @param warnings on updated EchoClient.golden under -Xdoclint:all

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