Skip to content

feat(usergroups): add missing team_id argument to usergroups.users.list - #191

Open
maartenpaauw wants to merge 1 commit into
jolicode:mainfrom
maartenpaauw:feat/usergroups-users-list-team-id
Open

feat(usergroups): add missing team_id argument to usergroups.users.list#191
maartenpaauw wants to merge 1 commit into
jolicode:mainfrom
maartenpaauw:feat/usergroups-users-list-team-id

Conversation

@maartenpaauw

Copy link
Copy Markdown

Why

Slack documents team_id as an optional argument for usergroups.users.list:

team_id (string) — The user group's encoded team ID. Required if org token is used.

It's missing from the patched OpenAPI spec, so the generated endpoint rejects it:

$client->usergroupsUsersList([
    'usergroup' => 'S0123',
    'team_id'   => 'T0123', // Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
]);

usergroups.list already carries this same override — this brings usergroups.users.list in line.

What

  • Specification override — add the team_id query parameter to /usergroups.users.list in resources/slack-openapi-patched.json
  • Refresh resources/slack-openapi-sorted.patch (new hunk + cascaded hunk offsets, same shape as Add team_id support for 3 endpoints #140)
  • Regenerate the affected endpoint code (generated/Endpoint/UsergroupsUsersList.php, generated/Client.php docblock)
  • Changelog entry

Verification

  • The patch applies cleanly to slack-openapi-sorted.json and reproduces slack-openapi-patched.json exactly
  • generated/ diff is limited to what a full Jane regen produces for this spec change
  • JsonSorterTest passes (patched spec still correctly sorted)
  • php-cs-fixer --dry-run clean

Note on check-spec

A full jane-openapi generate with the current latest Jane also rewrites a large number of unrelated Normalizer / BaseEndpoint files (Jane template drift since the last full rebuild in #189). That churn is intentionally not included here so this PR stays scoped to team_id. If check-spec fails on that unrelated diff, it reflects the pre-existing Jane-version drift on main rather than this change — happy to rebase once the SDK is rebuilt.

@damienalexandre

Copy link
Copy Markdown
Member

Hello, thank for you contribution, it looks good!

I just updated the SDK on main, can you rebase please?

The `team_id` query parameter is documented by Slack as an optional
argument for `usergroups.users.list` ("The user group's encoded team ID.
Required if org token is used."), but it was absent from the patched
OpenAPI spec, so the generated endpoint rejected it with an
UndefinedOptionsException.

Add it to resources/slack-openapi-patched.json (matching the existing
team_id override on usergroups.list), refresh the community patch file,
and regenerate the affected endpoint code.

Ref: https://docs.slack.dev/reference/methods/usergroups.users.list

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CXAVNUu5y3nHkfzq2TdNfX
@maartenpaauw
maartenpaauw force-pushed the feat/usergroups-users-list-team-id branch from d6e23bd to 74f38e9 Compare August 31, 2026 06:37
@maartenpaauw

Copy link
Copy Markdown
Author

@damienalexandre thanks for the quick response! I've rebased my branch and it is up-to-date with main.

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.

2 participants