Skip to content

chore: sync Java client with Apify OpenAPI spec v2-2026-07-08T143931Z + compression/OS-token alignment#5

Merged
Pijukatel merged 3 commits into
masterfrom
claude/brave-shannon-1w4ucz
Jul 10, 2026
Merged

chore: sync Java client with Apify OpenAPI spec v2-2026-07-08T143931Z + compression/OS-token alignment#5
Pijukatel merged 3 commits into
masterfrom
claude/brave-shannon-1w4ucz

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Syncs the Java client with Apify OpenAPI spec v2-2026-07-08T143931Z and aligns it with recent reference-client changes, then applies two cross-client uniformity requirements. Version 0.1.3.

Changes

Spec sync

  • Bumped Version.API_SPEC_VERSION to v2-2026-07-08T143931Z. No in-scope endpoint/parameter/schema delta; coverage unchanged.

Request-body compression — both brotli and gzip (reference: apify-client-js#962)

  • HttpClientCore now prefers brotli (Content-Encoding: br) via com.aayushatharva.brotli4j and falls back to gzip (Content-Encoding: gzip) when the brotli native library is unavailable. pom.xml adds brotli4j (compile) plus per-platform native codecs (linux/macOS x86_64+aarch64, windows x86_64) at runtime scope; the native lib loads and is exercised on Linux CI. compress(byte[], boolean) is a pure function so both codings are directly unit-tested; native-only brotli tests are gated with assumeTrue to skip (not error) on platforms without the native lib. Existing behavior preserved: only compress bodies ≥ 1024 bytes, compress once before the retry loop, skip when Content-Encoding is already set.

User-Agent OS token — identical across all clients (reference: apify-client-js#964)

  • Verified platformToken emits exactly the reference JS os.platform() tokens; the mapping test now asserts sunos (SunOS + Solaris), freebsd, openbsd, aix in addition to linux/darwin/win32/android (darwin checked before win to avoid the Darwinwin32 trap).

Docs

  • Fixed the README install snippets and CLIENT_VERSION mention (0.1.20.1.3) and the quick-start classpath instructions.

Testing

  • mvn spotless:check and mvn spotbugs:check clean.
  • Full mvn test: 108 tests, 0 failures — integration tests confirm the live API accepts the brotli-encoded uploads.

@Pijukatel Pijukatel force-pushed the claude/brave-shannon-1w4ucz branch from 9ca2b65 to 0aa349f Compare July 10, 2026 08:23
claude added 3 commits July 10, 2026 08:36
- Bump API_SPEC_VERSION to v2-2026-07-08T143931Z and client version to 0.1.2
- Align User-Agent OS token with reference clients via platformToken mapping
  (os.name/java.vm.name -> linux/darwin/win32/android short identifiers)
- Add gzip request-body compression for bodies >= 1024 bytes (Content-Encoding: gzip)
- Add CompressionTest and platform-token mapping tests
…iform OS token

- Add brotli request-body compression (Content-Encoding: br) via brotli4j,
  preferred over gzip; gzip (Content-Encoding: gzip) remains the fallback when
  no brotli native codec is bundled for the platform. Keeps the 1024-byte
  threshold, compress-once-before-retries, and skip-when-Content-Encoding-set
  behavior. Matches the reference JS client's maybeCompressValue.
- Add brotli4j 1.23.0 core dependency plus per-platform native codecs
  (linux/osx x86_64+aarch64, windows x86_64) at runtime scope in pom.xml.
- Extend User-Agent OS-token test to assert the emitted token exactly matches
  the reference JS os.platform() value for sunos, freebsd, openbsd, aix in
  addition to linux/darwin/win32/android.
- Bump client version 0.1.2 -> 0.1.3 and add CHANGELOG entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
- Update Maven, Gradle, and Version.CLIENT_VERSION references from 0.1.2 to 0.1.3
  to match pom.xml, Version.java, and CHANGELOG [0.1.3].
- Replace the non-expanding jackson-*.jar classpath glob with a lib/ directory
  populated via mvn dependency:copy-dependencies and the JVM-native lib/* wildcard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
@Pijukatel Pijukatel force-pushed the claude/brave-shannon-1w4ucz branch from 0aa349f to 15ccd7b Compare July 10, 2026 08:36
@Pijukatel Pijukatel changed the title chore: sync Java client with Apify OpenAPI spec v2-2026-07-08T143931Z chore: sync Java client with Apify OpenAPI spec v2-2026-07-08T143931Z + compression/OS-token alignment Jul 10, 2026
@Pijukatel Pijukatel merged commit f0df07b into master Jul 10, 2026
2 checks passed
@Pijukatel Pijukatel deleted the claude/brave-shannon-1w4ucz branch July 10, 2026 11:00
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.

3 participants