Skip to content

fix(api): refresh OpenAPI snapshot; page the organization roles list (#1482) - #1486

Open
sdairs wants to merge 1 commit into
claude/drift-1466-cli-clickstackfrom
claude/drift-1482-api-roles
Open

sdairs wants to merge 1 commit into
claude/drift-1466-cli-clickstackfrom
claude/drift-1482-api-roles

Conversation

@sdairs

@sdairs sdairs commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Refs #1482. API PR 1 of 2, stacked on #1479 (top of the #1466 stack). CLI exposure follows in #1484.

  • Refreshes clickhouse_cloud_openapi.json to the live spec.
  • organization_roles_get_list takes limit: Option<i64> and cursor: Option<&str>: the API now pages roles (at most 250 per page, ordered by role ID, nextCursor while more remain). The limit/nextCursor envelope fields already existed on ApiResponse.
  • Breaking for Rust callers; the migration is in CHANGELOG.md. Pass None, None to send the same request as before.
  • New tests/client/rbac.rs wiremock tests (the first for this module), mapped to no live suite in the classifier.
  • Live org tests list roles through a new list_all_org_roles helper; the pre-create step uses a page size of 1, so the live run walks the cursor.
  • CLI: compile-only, passes None, None, so the request is unchanged.

spec_coverage_test is expected to fail here; its failures list only the Postgres private endpoint drift.

🤖 Generated with Claude Code


Note

Medium Risk
Breaking signature change for organization_roles_get_list; large OpenAPI refresh may carry additional generated-model drift beyond the roles pagination work.

Overview
Refreshes clickhouse_cloud_openapi.json to match the live ClickHouse Cloud spec (including Postgres private-endpoint operations/schemas and assorted doc fixes). The functional Rust-facing change is pagination on list organization roles.

Breaking: organization_roles_get_list now takes limit: Option<i64> and cursor: Option<&str> after the organization ID, sending limit/cursor query params when set. Responses expose limit and next_cursor on the existing ApiResponse envelope (max 250 roles per page, ordered by role ID). Callers should pass None, None for unchanged default requests, or follow next_cursor for full lists.

A new list_all_org_roles test helper walks cursors; integration org tests and clickhousectl are updated accordingly. Wiremock coverage lives in new tests/client/rbac.rs.

Reviewed by Cursor Bugbot for commit 03c49c3. Bugbot is set up for automated code reviews on this repo. Configure here.

The live spec now pages `GET /v1/organizations/{organizationId}/roles`
with `limit` and `cursor` and returns `limit` and `nextCursor`.
`organization_roles_get_list` takes both as optional arguments; the CLI
passes `None, None`, so its request is unchanged.

Refs #1482

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs
sdairs requested a review from iskakaushik as a code owner November 17, 2026 17:08
@sdairs
sdairs added this pull request to stack #1483 November 17, 2026 17:08

This branch has not been deployed

No deployments
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