Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsersList and UsergroupsList should accept new parameter: "team_id" #137

Closed
mpyw opened this issue Jan 18, 2022 · 2 comments · Fixed by #140
Closed

UsersList and UsergroupsList should accept new parameter: "team_id" #137

mpyw opened this issue Jan 18, 2022 · 2 comments · Fixed by #140

Comments

@mpyw
Copy link
Contributor

mpyw commented Jan 18, 2022

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 mpyw changed the title UsersList and UsergroupsList should accepts parameter: "team_id" UsersList and UsergroupsList should accept new parameter: "team_id" Jan 18, 2022
@mpyw
Copy link
Contributor Author

mpyw commented Jan 18, 2022

Related: #129

Also missing for ConversationsList

@damienalexandre
Copy link
Member

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?

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 a pull request may close this issue.

2 participants