Repository navigation
fix(web-api): blank sample placeholders before generating response types - #2879
Merged
Merged
Conversation
Co-Authored-By: Claude <[email protected]>
🦋 Changeset detectedLatest commit: a821590 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2879 +/- ##
==========================================
+ Coverage 94.45% 94.50% +0.05%
==========================================
Files 68 68
Lines 10942 10942
Branches 696 697 +1
==========================================
+ Hits 10335 10341 +6
+ Misses 576 571 -5
+ Partials 31 30 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
zimeg
added a commit
that referenced
this pull request
Nov 20, 2026
…egen Co-Authored-By: Claude <[email protected]>
3 tasks done
zimeg
marked this pull request as ready for review
November 20, 2026 04:06
Co-Authored-By: Claude <[email protected]>
zimeg
added a commit
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude <[email protected]>
Member
Author
|
🌟 Thanks for the kind review @mwbrooks! |
zimeg
added a commit
that referenced
this pull request
Nov 20, 2026
Co-Authored-By: Claude <[email protected]>
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.
Summary
This pull request changes
scripts/code_generator.rbso the placeholders in the slackapi/java-slack-sdk response samples can't narrow the generated@slack/web-apiresponse types.The java sample recorder masks every ID as
<letter>00000000and every timestamp as0000000000.000000, and writes map keys as0000000000,0000000000_and so on. quicktype reads a value that repeats across a sample as an enum or a literal type, and reads an object as a map only when every key is digits. Before passing a sample to quicktype, the generator now blanks those placeholder values and renumbers the placeholder keys. The samples stay as recorded.This regenerates only the two response types the change affects, from the same samples
mainwas generated from:search.all:user,user_id,share_user_idandlast_editorwere theLastEditorenum ('' | 'U00000000'), and arestringnow.rtm.start:bots[].app_id,bots[].idandbot_idwere theAppidandIdenums ('' | 'A00000000'and'' | 'B00000000'), and arestringnow.With these enums, a check like
match.user === 'U012ABC'or a typed fixture{ user: 'U012ABC' }didn't compile. Neither enum is exported from the package. The other response types come out the same.#2878 stacks on this pull request and regenerates the rest from the latest samples. There, this change also keeps the
search.allandsearch.filesID fields from becoming enums, and typesadmin.apps.activities.listfunction_inputsas{ [key: string]: FunctionInput }.Testing
npm run build,npm test(157 tests, the same asmain) andnpm run lintpass forpackages/web-api.Requirements
🤖 Generated with Claude Code