chore: sync Rust client with Apify OpenAPI spec v2-2026-07-08T143931Z + compression/OS-token alignment - #16
Merged
Merged
Conversation
- Bump API_SPEC_VERSION to v2-2026-07-08T143931Z and crate version to 0.4.8 - Add brotli request-body compression (bodies >= 1024 bytes, Content-Encoding: br) - Add regression test asserting the User-Agent OS token is a short lowercase platform identifier - Documentation polish (resource-clients section, stream return types, reqwest note, paginate_requests example, public_base_url)
…with reference - Add RequestCompression enum (Brotli default, Gzip) and ApifyClientBuilder::request_compression selector; both compression paths are reachable and tested. - Map User-Agent OS token to Node os.platform() values (macos->darwin, windows->win32, solaris->sunos) for cross-client uniformity. - Bump crate version to 0.5.0; update CHANGELOG and docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
- Add named GZIP_COMPRESSION_LEVEL constant (matches zlib default 6). - Correct doc comments/enum docs to stop implying the reference exposes a selectable encoding; remove defensive noise. - Docs: add RequestCompression to crate-root re-export list, runnable gzip example, HttpBackend import path, bump install version to 0.5. - Inline node_platform_token into build_user_agent; OS-token test now uses an independent Node-platform oracle instead of the production mapping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
… enum/test - README.md: bump apify-client install pins from "0.4" to "0.5" (both the default and the rustls snippet) to match Cargo.toml 0.5.0; the old pins predate the RequestCompression feature added in 0.5.0. - Add #[non_exhaustive] to the new public RequestCompression enum so future variants can be added without a breaking major bump. - Rename default_request_compression_is_brotli -> builder_default_request_compression_is_brotli and assert the builder's default via the public builder path (no .request_compression() call) rather than the Default derive. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
- src/common.rs: map Rust `illumos` -> Node `sunos` (both solaris and
illumos collapse to sunos); fix doc/comment wording (four spellings differ,
not three); drop redundant per-arm comments; add illumos test assertion.
- README.md: document request_compression/RequestCompression and the
User-Agent format + OS-token mapping (new Request compression + User-Agent
subsections).
- docs/README.md: extend models enumeration (KeyValueStore{Key,KeysPage,Record},
Task, Schedule, Webhook, WebhookDispatch); document Extra alias with a
compiling snippet; add ApifyClientError import note; note the OS-token
mapping in the User-Agent paragraph.
- docs/{tasks,schedules,webhooks}.md: state the models live in
apify_client::models with import lines.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xbC2QoA4QKyvhC1d7gYap
Pijukatel
force-pushed
the
claude/eager-mayer-1w4ucz
branch
from
July 10, 2026 07:54
39a40db to
3a667d8
Compare
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
Syncs the Rust client with Apify OpenAPI spec
v2-2026-07-08T143931Zand aligns it with recent reference-client changes, then applies two cross-client uniformity requirements. Version0.5.0.Changes
Spec sync
API_SPEC_VERSIONtov2-2026-07-08T143931Z. The incremental bump introduced no in-scope endpoint/parameter/schema change; coverage is unchanged.Request-body compression — both brotli and gzip (reference: apify-client-js#962)
RequestCompressionenum (Brotlidefault,Gzip) andApifyClientBuilder::request_compression(...). Both paths are implemented, genuinely reachable via the selector, and tested (brotli via thebrotlicrate at quality 6; gzip viaflate2at level 6). Existing behavior preserved: only compress bodies ≥ 1024 bytes, compress once before the retry loop, skip whenContent-Encodingis already set. The enum is#[non_exhaustive]for forward compatibility.User-Agent OS token — identical across all clients (reference: apify-client-js#964)
os.platform()value for the running platform (darwinnotmacos,win32notwindows,sunosnotsolaris/illumos), viamap_os_to_node_platform(std::env::consts::OS).Docs
request_compression/RequestCompression, the User-Agent/OS-token format, theExtrafield type, KeyValueStore record/key types, and error types with import paths; fixed the README install version pin (0.4→0.5).Testing
cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean.APIFY_TOKENpresent).