jolicode/slack-php-api

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":

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;
    }
});
mpyw commented

Related: #129

Also missing for ConversationsList

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?