Skip to content

feat(methods): add blocks.validate example - #187

Merged
zimeg merged 5 commits into
mainfrom
blocks-validate-example
Aug 27, 2026
Merged

feat(methods): add blocks.validate example#187
zimeg merged 5 commits into
mainfrom
blocks-validate-example

Conversation

@zimeg

@zimeg zimeg commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Adds a blocks method-family example for blocks.validate, mirroring the existing chat example so each Slack API method family has a self-contained, runnable demonstration.

  • methods/src/blocks/blocks-validate.js builds blocks with typed Block Kit values and validates them via client.blocks.validate({ blocks }), then prints the response.
  • methods/src/blocks/manifest.json + .slack/ config for the blocks example.
  • A blocks section in methods/README.md's "What's on call" list.

blocks.validate is unauthenticated, so the client is created without a token (new WebClient()). The method isn't in a published @slack/web-api release yet, so this depends on the SDK change in slackapi/node-slack-sdk#2659; package.json stays on the published ^8.0.0 so the repo keeps building.

Testing

Depends on slackapi/node-slack-sdk#2659.

🤖 Generated with Claude Code

Add a blocks method-family example that validates a Block Kit payload built
with typed blocks via @slack/web-api, mirroring the chat.postMessage example.
blocks.validate is unauthenticated, so the client is created without a token.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added the enhancement New feature or request label Aug 26, 2026
@zimeg zimeg self-assigned this Aug 26, 2026
zimeg and others added 4 commits August 26, 2026 10:16
blocks.validate is unauthenticated, so the example app needs no bot scopes
or bot user.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Write the text composition object one property per line to match the
repo's block-kit examples (block-kit/src/blocks/section.js et al.),
which never inline the text object. Consistent house style for a
reference example.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg marked this pull request as ready for review August 27, 2026 08:13
@zimeg
zimeg requested a review from a team as a code owner August 27, 2026 08:13
@zimeg
zimeg merged commit 173e4c3 into main Aug 27, 2026
7 checks passed
@zimeg
zimeg deleted the blocks-validate-example branch August 27, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant