Skip to content

feat!: update Go client for Apify OpenAPI spec v2-2026-06-24T105326Z#6

Merged
Pijukatel merged 2 commits into
masterfrom
claude/inspiring-shannon-1n0iv2
Jun 26, 2026
Merged

feat!: update Go client for Apify OpenAPI spec v2-2026-06-24T105326Z#6
Pijukatel merged 2 commits into
masterfrom
claude/inspiring-shannon-1n0iv2

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Updates the Go client from Apify OpenAPI spec v2-2026-06-23T113219Z to the latest v2-2026-06-24T105326Z.

A full operation- and parameter-level audit of every in-scope operation against the new spec found no changes to the in-scope API surface (same 131 paths / 231 operations, identical parameters and request/response schemas) — the spec update itself is a version bump only. The new /v2/browser-info and /v2/tools/* operations remain out-of-scope (absent from the apify-client-js reference). This PR also lands spec-compliance/correctness fixes surfaced by the review pass, mirroring the Rust sibling (apify-client-rust#7).

Changes

Spec compliance (breaking)

  • ListRequestsOptions.Filter (for GET /v2/request-queues/{queueId}/requests) is now []string, serialized comma-joined via the existing AddCSV helper, matching the spec (array of the enum values locked/pending, style=form explode=false) and the JS reference (filter.join(',')). Previously a single *string, which could not express the multi-value union. Allowed values are exported as RequestFilterLocked / RequestFilterPending with per-entry validation. This is a spec-compliance bugfix and a breaking change to that field's type — hence the minor version bump 0.2.3 → 0.3.0 (consistent with the Rust sibling).

Implementation correctness

  • User-Agent isAtHome flag is now based solely on the APIFY_IS_AT_HOME environment variable, matching the requirement ("based on the environment variable APIFY_IS_AT_HOME, False if env variable is missing") and the JS reference (which reads only that variable). The two env-var constants were collapsed to a single envIsAtHome = "APIFY_IS_AT_HOME"; a previously-honored bare isAtHome environment variable — a non-standard accommodation present in neither the requirements nor the reference — is no longer consulted. Lowercase true/false rendering is unchanged. (Test updated to assert a bare isAtHome is ignored.)

Versioning

  • API_SPEC_VERSIONv2-2026-06-24T105326Z; CLIENT_VERSION0.3.0. README.md spec line and CHANGELOG.md [0.3.0] entry updated (with a forward-pointer on the superseded historical isAtHome note).

Tests

  • Added offline TestListRequestsFilterCommaJoined (asserts a single comma-joined filter=locked,pending).
  • Extended the live request-queue lock-lifecycle test and the examples/storages program + a docs/storages.md snippet to exercise a multi-value filter.
  • Updated the request-queue validation test and the isAtHome test for the new behavior.

Docs

  • Document the Filter array type, the ListRequests/UpdateRequest/BatchDeleteRequests return types and batch-delete payload shape, and manual cursor pagination semantics; README isAtHome section now describes only APIFY_IS_AT_HOME.

Housekeeping

  • .gitignore: ignore the extension-less example build binaries.

Verification

  • gofmt -l ., go vet ./..., golangci-lint run, go build ./... — clean.
  • go test . (unit) — pass.
  • Integration suite (go test ./tests/ -p 1 -parallel 4 -skip '^(TestExample|TestDocSnippets)') and the Test examples step (-run '^(TestExample|TestDocSnippets)') ran green against the live API.

This client is experimental and is generated and maintained by AI.

claude added 2 commits June 25, 2026 22:18
Update from spec v2-2026-06-23T113219Z to v2-2026-06-24T105326Z. A full
operation- and parameter-level audit found no changes to the in-scope API
surface (same 131 paths/231 operations/parameters/schemas), so the spec update
itself is a version bump only. The new /v2/browser-info and /v2/tools/*
operations remain out-of-scope (absent from the apify-client-js reference).

Spec-compliance fix surfaced by the review pass (mirrors the Rust sibling):

- BREAKING: ListRequestsOptions.Filter is now []string (serialized comma-joined
  via AddCSV), matching the spec (array of enum locked|pending) and the JS
  reference. Previously a single *string that could not express the multi-value
  union. Allowed values exported as RequestFilterLocked/RequestFilterPending.
  CLIENT_VERSION bumped 0.2.3 -> 0.3.0 (minor, per SemVer), consistent with the
  Rust sibling.
- API_SPEC_VERSION bumped to v2-2026-06-24T105326Z; README and CHANGELOG updated.
- Tests: add offline TestListRequestsFilterCommaJoined, extend the live
  request-queue lock-lifecycle test and the storages example/doc snippet to
  exercise a multi-value filter; update the validation test for the new signature.
- Docs: document the Filter array type, ListRequests/UpdateRequest/
  BatchDeleteRequests return types and batch-delete payload, and manual cursor
  pagination semantics.
- .gitignore: ignore the extension-less example build binaries.
The requirements state the isAtHome flag is "based on the environment
variable APIFY_IS_AT_HOME, False if env variable is missing", and the JS
reference reads only APIFY_IS_AT_HOME. A prior iteration also honored a bare
`isAtHome` environment variable; that accommodation was non-standard (present
in neither the requirements nor the reference) and is removed, mirroring the
Rust sibling.

- client.go: collapse the two env-var constants to a single
  envIsAtHome = "APIFY_IS_AT_HOME"; defaultIsAtHome reads only that.
- common.go: BuildUserAgent doc comment rewritten. Lowercase rendering unchanged.
- Test renamed to TestDefaultIsAtHomeReadsOnlyApifyIsAtHome; asserts a bare
  `isAtHome` env var does NOT affect the flag.
- README and CHANGELOG [0.3.0] updated; a forward-pointer is added to the
  superseded historical entry.
@Pijukatel Pijukatel merged commit 6a1690e into master Jun 26, 2026
2 checks passed
@Pijukatel Pijukatel deleted the claude/inspiring-shannon-1n0iv2 branch July 8, 2026 09:46
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