breaking: Update latest api docs#255
Conversation
| @@ -1,17 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
❓ Deprecated. Do we want to keep these files and mark them as deprecated instead? Can we do that using meta programming?
As most methods require it, we can remove it as a "required" prop
| @@ -34,6 +34,41 @@ defmodule Slack.Web.DocumentationTest do | |||
| assert {:info, 1} in module_functions | |||
| end | |||
|
|
|||
| test "generates function params based on required arguments from json" do | |||
There was a problem hiding this comment.
ℹ️ This test is here to cover the fact that we're still properly able to generate the methods with multiple required arguments.
| assert {:replies, required_args_count + 1} in module_functions | ||
| end | ||
|
|
||
| test "filters out required `:token` argument" do |
There was a problem hiding this comment.
ℹ️ This test covers the fact that we're now filtering out the token argument that's present in almost every JSON file (since almost all endpoints are behind the access_token authentication).
| assert {:access, 0} in module_functions | ||
| assert {:access, 1} in module_functions |
There was a problem hiding this comment.
ℹ️ The oauth.v2.access.json has been updated (according to the API docs) that non of these params are required anymore.
|
I suspect in order to move this PR forward, we'll probably want to release the previous changes first. Let those soak in and then see if we can update all of these. In order to move this forward after the current release cut, we'll have to have an opinion on: #255 (comment). |
Descriptions
slack_api_docsmodule that allows for generating API docs JSON files straight from the Slack API website (https://hexdocs.pm/slack_api_docs/readme.html)For review:
I've converted all existing JSON files into the current format for an easier time reviewing. Think of it as:
It's probably easiest to review this commit: 952114d (as it contains the pre-formatting to make it easier to review).
Breaking changes
api.test.json(fooargument is removed)channels.archive.json(Deprecated and removed)channels.create.json(Deprecated and removed)channels.history.json(Deprecated and removed)channels.info.json(Deprecated and removed)channels.invite.json(Deprecated and removed)channels.join.json(Deprecated and removed)channels.kick.json(Deprecated and removed)channels.leave.json(Deprecated and removed)channels.list.json(Deprecated and removed)channels.mark.json(Deprecated and removed)channels.rename.json(Deprecated and removed)channels.replies.json(Deprecated and removed)channels.setPurpose.json(Deprecated and removed)channels.setTopic.json(Deprecated and removed)channels.unarchive.json(Deprecated and removed)conversations.create.json(user_idsargument is deprecated and removed,team_idis added,errorschanged a lot because of theuser_idsbeing removed)conversations.members.json(exclude_archivedargument is removed)files.comments.add.json(Deprecated and removed)files.comments.edit.json(Deprecated and removed)groups.archive.json(Deprecated and removed)groups.close.json(Deprecated and removed)groups.create.json(Deprecated and removed)groups.createChild.json(Deprecated and removed)groups.history.json(Deprecated and removed)groups.info.json(Deprecated and removed)groups.invite.json(Deprecated and removed)groups.kick.json(Deprecated and removed)groups.leave.json(Deprecated and removed)groups.list.json(Deprecated and removed)groups.mark.json(Deprecated and removed)groups.open.json(Deprecated and removed)groups.rename.json(Deprecated and removed)groups.replies.json(Deprecated and removed)groups.setPurpose.json(Deprecated and removed)groups.setTopic.json(Deprecated and removed)groups.unarchive.json(Deprecated and removed)im.close.json(Deprecated and removed)im.history.json(Deprecated and removed)im.list.json(Deprecated and removed)im.mark.json(Deprecated and removed)im.open.json(Deprecated and removed)im.replies.json(Deprecated and removed)mpim.close.json(Deprecated and removed)mpim.history.json(Deprecated and removed)mpim.list.json(Deprecated and removed)mpim.mark.json(Deprecated and removed)mpim.open.json(Deprecated and removed)oauth.access.json(client_id,client_secret,code,redirect_uriarguments are made optional andsingle_channelargument is added)oauth.v2.access.json(client_id,client_secret,code,redirect_uriarguments are made optional andgrant_type,refresh_tokenarguments are added)pins.add.json(file,file_commentarguments are removed)pins.remove.json(file,file_commentarguments are removed)presence.set.json(Deprecated and removed)reactions.add.json(file,file_commentarguments are removed)stars.list.json(userargument is removed,cursor,limit,page,,team_idarguments are added)users.list.json(presencerequired arg is removed,cursor,include_locale,limit,team_idarguments are added)Non breaking changes
bots.info.json(team_idargument is added)chat.delete.json(as_userargument is added)chat.postEphemeral.json(icon_emoji,icon_url,thread_ts,usernamearguments are added)chat.postMessage.json(metadata,mrkdwn,reply_broadcastarguments are added)chat.unfurl.json(source,unfurl_id,user_auth_blocksarguments are added)chat.update.json(file_ids,metadata,reply_broadcastarguments are added)conversations.history.json(include_all_metadataargument is added)conversations.open.json(prevent_creationargument is added)dnd.info.json(team_idargument is added)dnd.teamInfo.json(team_idargument is added)files.info.json(count,cursor,limit,pagearguments are added)files.list.json(count,files,page,show_files_hidden_by_limit,team_idarguments are added)files.upload.json(thread_tsargument added)reactions.list.json(count,cursor,limit,page,,team_idarguments are added)search.all.json(count,page,team_idarguments are added)search.files.json(count,page,team_idarguments are added)search.messages.json(count,cursor,page,team_idarguments are added)team.accessLogs.json(before,count,page,,team_idarguments are added)team.info.json(domain,teamarguments are added)team.integrationLogs.json(count,page,team_idarguments are added)usergroups.create.json(team_idargument is added)usergroups.disable.json(team_idargument is added)usergroups.enable.json(team_idargument is added)usergroups.list.json(team_idargument is added)usergroups.update.json(team_idargument is added)usergroups.users.list.json(team_idargument is added)usergroups.users.update.json(team_idargument is added)users.conversations.json(team_idargument is added)users.info.json(include_localeargument is added)