Document Web API methods that do not follow correct argument ordering
Description
Using the web client for the following methods fails:
- chat.delete
- chat.update
- chat.unfurl
The documentation states under "General Web API Patterns" that The required parameters will be entered in the same order and name as presented in the documentation on the API webpage. But for these 3 methods, the SDK is not adhering to the the documented order, and takes the first param to be ts while the documentation states the first param should be channel, etc.
Or, perhaps the bug is on the documentation side, and the "fix" should happen there (by re-ordering the params)? ;)
What type of issue is this? (place an x in one of the [ ])
- [x] bug
- [ ] enhancement (feature request)
- [ ] question
- [x] documentation related
- [ ] testing related
- [ ] discussion
Requirements (place an x in each of the [ ])
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
@slack/client version: 3.14.1
node version: n/a
OS version(s): n/a
Steps to reproduce:
- Submit the params in the order as shown in the API documentation
- Receive
channel_not_founderror because the SDK is submitting a timestamp or other value for the channel_id
i reported this issue as well in #420
Just noticed that ts and channel are in the wrong order for chat.delete as well....
This one got me too...
@markcarey @Finkes @Elyx0 apologies for the inconsistency. its one the major the challenges we have been facing by manually adding code for every facet (web API method).
unfortunately, when mistakes like these land in the API, its impossible to revise them in the same major version number. but we take this mistake and the time you developers lost due to it very seriously. that's why for the next major version (which we are ramping up development effort for right now) will do two things to rectify this in the future:
- we will favor an API where the order of the arguments does not matter. the proposal for this is described in #381 and your feedback is welcome.
- we are investigating the feasibility of programatically generating our facet code using the recently released OpenAPI spec.
for now, all we can do is document the inconsistencies to hopefully save others from wasting their time. i will now change this issue to capture this documentation item. i'll close related issues as duplicates of this one.