Open nikclayton-dfinity opened 4 years ago
this is where slack's docs are a bit of a pain with types, their example shows user_count
as a string
https://api.slack.com/methods/usergroups.list
even their schema shows a string in their example https://raw.githubusercontent.com/slackapi/slack-api-specs/master/web-api/slack_web_openapi_v2.json
but it says it returns objs_subteam
objects, which say
"user_count": {
"type": "integer"
},
the schema we have was scraped from their examples before they started work on their own schema
last i checked it was missing loads of information which made generating functions from it not possible. but it does look a lot better now.
I think some syncing is over due
I also started adding some tests that actually call the apis, but that obviously requires a slack workspace to connect to. or a really good fake, and I haven't seen any easy fakes
Trying to call
usergroups::list
returns aMalformedResponse
error.In my case this is because the value for the
user_count
field is an int, not a string.I assume the schema in https://github.com/slack-rs/slack-api-schemas/blob/master/objects/usergroup.json is incorrect.
In addition, I see in the output (at the same level as the
user_count
field) achannel_count
field which is also an int, and appears to be missing from the schema.