UsersList and UsergroupsList should accept new parameter: "team_id"
mpyw opened this issue · 2 comments
mpyw commented
API specs with JSON schema do not contain parameter "team_id":
- https://github.com/slackapi/slack-api-specs/blob/bc08db49625630e3585bf2f1322128ea04f2a7f3/web-api/slack_web_openapi_v2_without_examples.json#L21888-L21913
- https://github.com/slackapi/slack-api-specs/blob/bc08db49625630e3585bf2f1322128ea04f2a7f3/web-api/slack_web_openapi_v2_without_examples.json#L20546-L20572
but it appears on official Web documentation:
Currently I'm patching like this :(
$response = $this->client->executeEndpoint(new class ($params) extends Endpoint\UsersList {
protected function getQueryOptionsResolver(): OptionsResolver
{
$resolver = parent::getQueryOptionsResolver();
$resolver->define('team_id');
$resolver->setAllowedTypes('team_id', ['string']);
return $resolver;
}
});
$response = $this->client->executeEndpoint(new class ($params) extends Endpoint\UsergroupsList {
protected function getQueryOptionsResolver(): OptionsResolver
{
$resolver = parent::getQueryOptionsResolver();
$resolver->define('team_id');
$resolver->setAllowedTypes('team_id', ['string']);
return $resolver;
}
});
damienalexandre commented
Thanks for reporting this 👍 Indeed we need to patch the specification again, following this tutorial: https://github.com/jolicode/slack-php-api/blob/main/docs/4-updating-sdk.md.
As you can see we maintain a patch file https://github.com/jolicode/slack-php-api/blob/main/resources/slack-openapi-sorted.patch for the official specification as it often broken or wrong.
Is that something you would like to give a try?