Fix text/markdown_text mutual exclusion patch source (persist required: false) - #86
Merged
dblock merged 1 commit intoAug 12, 2026
Conversation
Commit 868b621 previously added required: false directly to the merged methods/chat/*.json output files (chat.postEphemeral, chat.postMessage, chat.scheduleMessage, chat.update) to mark the [text, markdown_text] mutually_exclusive arg_group as at-most-one instead of exactly-one. However, that fix only touched the generated output, not the methods/_patches/chat/*.json source files that api:methods:update merges on top of freshly scraped docs. The next doc scrape regenerated the merged files from the docs plus the (still-unfixed) patches, silently dropping the required: false flag again. This adds required: false to the patch source files instead, so the fix survives future `rake api:methods:update` runs, and regenerates the merged methods/chat/*.json files to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#84 fixed the
[text, markdown_text]mutually_exclusivearg_group inchat.postEphemeral,chat.postMessage,chat.scheduleMessageandchat.updateby adding"required": falsedirectly to the merged output files inmethods/chat/*.json. Without it, downstream consumers (e.g. slack-ruby-client) treat a missingrequiredflag on amutually_exclusivegroup as "exactly one is required" (XOR), when in facttext/markdown_textcan both be omitted as long as another required arg (e.g.attachmentsorblocks) is present.That fix only touched the generated output (
methods/chat/*.json), not themethods/_patches/chat/*.jsonsource files thatrake api:methods:updatemerges on top of freshly scraped docs (seeprocess_methodintasks/lib/slack_api/methods_generator.rb, which doesresult.merge!(patch)). The very next doc scrape (634d664, 2026/08/10) regenerated the merged files from docs + the still-unfixed patches, silently droppingrequired: falseagain. This surfaced downstream in slack-ruby/slack-ruby-client#590, where CI failed becausechat_postMessage/chat_postEphemeral/etc. once again raisedArgumentError, 'Exactly one of :text, :markdown_text is required'when onlytext(or onlymarkdown_text) was passed.Fix
Add
"required": falseto the[text, markdown_text]arg_group in the fourmethods/_patches/chat/*.jsonsource files, so the fix persists across future doc re-scrapes, and regenerate the mergedmethods/chat/*.jsonfiles (viarake api:methods:update) to match.Verified with
rake api:methods:update(regenerates only the intended 4 merged files, no other diffs) andrake api:methods:validate(passes).