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

usergroupsUsersList appears to be broken #57

Closed
JakeBooher opened this issue Oct 10, 2019 · 2 comments
Closed

usergroupsUsersList appears to be broken #57

JakeBooher opened this issue Oct 10, 2019 · 2 comments

Comments

@JakeBooher
Copy link

The usergroupsUsersList function does not accept any parameters, but they are required:

https://api.slack.com/methods/usergroups.users.list

Currently using v2.2.0, I have an older app that uses 1.2.0 and this function works correctly, so something has changed that broke it between those versions

@damienalexandre
Copy link
Member

Hi @JakeBooher !

Thanks for reporting this issue, this is indeed an error in Slack specification, here is the definition from https://raw.githubusercontent.com/slackapi/slack-api-specs/master/web-api/slack_web_openapi_v2.json :

{
      "/usergroups.users.list": {
            "get": {
                "consumes": [
                    "application/x-www-form-urlencoded"
                ],
                "description": "List all users in a User Group",
                "externalDocs": {
                    "description": "API method documentation",
                    "url": "https://api.slack.com/methods/usergroups.users.list"
                },
                "operationId": "usergroups_users_list",
                "parameters": [],
                "produces": [
                    "application/json"
                ],
                "responses": {
                    "200": {
                        "description": "Standard success response when used with a user token",
                        "examples": {
                            "application/json": {
                                "ok": true,
                                "users": [
                                    "U060R4BJ4",
                                    "W123A4BC5"
                                ]
                            }
                        },
                        "schema": {
                            "additionalProperties": false,
                            "description": "Schema for successful response from usergroups.users.list method",
                            "properties": {
                                "ok": {
                                    "$ref": "#/definitions/defs_ok_true"
                                },
                                "users": {
                                    "items": {
                                        "$ref": "#/definitions/defs_user_id"
                                    },
                                    "type": "array"
                                }
                            },
                            "required": [
                                "ok",
                                "users"
                            ],
                            "title": "usergroups.users.list schema",
                            "type": "object"
                        }
                    },
                    "default": {
                        "description": "Standard failure response when used with an invalid token",
                        "examples": {
                            "application/json": {
                                "error": "invalid_auth",
                                "ok": false
                            }
                        },
                        "schema": {
                            "additionalProperties": false,
                            "description": "Schema for error response from usergroups.users.list method",
                            "properties": {
                                "error": {
                                    "enum": [
                                        "not_authed",
                                        "invalid_auth",
                                        "account_inactive",
                                        "token_revoked",
                                        "no_permission",
                                        "org_login_required",
                                        "user_is_bot",
                                        "user_is_restricted",
                                        "invalid_arg_name",
                                        "invalid_array_arg",
                                        "invalid_charset",
                                        "invalid_form_data",
                                        "invalid_post_type",
                                        "missing_post_type",
                                        "team_added_to_org",
                                        "invalid_json",
                                        "json_not_object",
                                        "request_timeout",
                                        "upgrade_require",
                                        "fatal_error",
                                        "missing_charset",
                                        "superfluous_charset"
                                    ],
                                    "type": "string"
                                },
                                "ok": {
                                    "$ref": "#/definitions/defs_ok_false"
                                }
                            },
                            "required": [
                                "ok",
                                "error"
                            ],
                            "title": "usergroups.users.list error schema",
                            "type": "object"
                        }
                    }
                },
                "security": [
                    {
                        "slackAuth": [
                            "usergroups:read"
                        ]
                    }
                ],
                "tags": [
                    "usergroups.users",
                    "usergroups"
                ]
            }
        }
}

There is no parameters in the definition 😭,
so we will have to produce to patch and regenerate the API Client.

We will look into this soon 👍

@pyrech
Copy link
Member

pyrech commented Oct 14, 2019

Fixed in #61

@pyrech pyrech closed this as completed Oct 14, 2019
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

No branches or pull requests

3 participants