feat: sync Java client with Apify OpenAPI spec v2-2026-08-05T133145Z - #13
Merged
Conversation
Adds TaskClient.publish()/unpublish() and Task.isPublic/publicConfig (TaskPublicConfig), mirroring apify-client-js#989. The four apify-docs spec PRs since the last sync are description/operationId-only, so no other code change is spec-mandated. Also hardens brotli request-body compression to fall back to gzip if the encode call itself fails, not only when the native codec fails to load (apify-client-js#990's intent).
…allback Fixes unpublish()'s Javadoc (it only needs write permission to the task, not its Actor), widens compress()'s fallback catch to Throwable so it actually covers the native-codec-failure case its comment describes (matching detectBrotli()'s existing Throwable catch), cleans up two garbled test comments, and documents the untested fallback branch as an accepted gap with rationale.
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.
Spec sync
Bumps
Version.API_SPEC_VERSIONtov2-2026-08-05T133145Z. The four apify-docs spec PRs since the last sync (#2790, #2646, #2841, #2851) are description/operationId-only, so no code change is spec-mandated beyond the version constant.Reference client parity
Adds
TaskClient.publish()/TaskClient.unpublish()plusTask.getIsPublic()/Task.getPublicConfig()and the newTaskPublicConfigtype, mirroring the reference JavaScript client's task publish/unpublish support (apify-client-js#989). Also hardens brotli request-body compression to fall back to gzip if the encode call itself fails, not only when the native codec fails to load, matching the intent of apify-client-js#990.Documentation cleanup
Removes the duplicated AI-disclaimer paragraph so it appears once, in the top-level
README.md, per the updated client requirements (apify-client-orchestration#41).Changes
src/main/java/com/apify/client/task/TaskClient.java:publish()/unpublish().src/main/java/com/apify/client/task/Task.java:getIsPublic()/getPublicConfig().src/main/java/com/apify/client/task/TaskPublicConfig.java: new type.src/main/java/com/apify/client/internal/HttpClientCore.java: brotli-to-gzip compression fallback hardening.Version.java/pom.xml:API_SPEC_VERSIONbump;CLIENT_VERSION0.5.0->0.6.0(minor: additive only).spotbugs-exclude.xml: one narrowly-scoped entry forTask.getPublicConfig.docs/tasks.md: documents the new methods.CompressionTest.java,integration/TaskIntegrationTest.java: new compression-fallback andtaskPublishUnpublishtests.CHANGELOG.md: new0.6.0entry.