Skip to content

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

Draft
zimeg wants to merge 2 commits into
mainfrom
blocks-validate-example
Draft

feat(methods): add blocks.validate example#53
zimeg wants to merge 2 commits into
mainfrom
blocks-validate-example

Conversation

@zimeg

@zimeg zimeg commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

This pull request 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/main/java/blocks/BlocksValidate.java validates a Block Kit payload and prints the response.
  • methods/src/main/java/blocks/manifest.json for the blocks example (no scopes — blocks.validate is unauthenticated).
  • A blocks section in methods/README.md's "What's on call" list.

blocks.validate is not yet in a published slack-api-client release, so it depends on the SDK change in slackapi/java-slack-sdk#1622. The pom.xml stays pinned to the published 1.49.0 so the repo keeps building; to run this example today, build the SDK from source and point the dependency at the locally-installed snapshot.

Testing

  • Build the SDK from source per the Java SDK setup guide: in a checkout of feat(methods): add blocks.validate method slackapi/java-slack-sdk#1622, run mvn install -Dmaven.test.skip=true so slack-api-client installs to $HOME/.m2/repository as a snapshot (e.g. 1.49.1-SNAPSHOT).
  • In methods/pom.xml, temporarily bump the slack-api-client <version> to that snapshot.
  • Run cd methods && mvn compile exec:java -Dexec.mainClass=blocks.BlocksValidate and confirm the response prints ok=true with no errors for the well-formed payload.

Depends on slackapi/java-slack-sdk#1622.

Co-Authored-By: Claude svc-devxp-claude@slack-corp.com

Add a "blocks" method-family example mirroring the existing "chat" example:
BlocksValidate.java validates a well-formed and a malformed Block Kit payload
and prints each response, plus its own manifest and a "What's on call" README
entry. blocks.validate is unauthenticated, so the example calls it without a
token.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Match the chat example's one-call shape: build one request with a single
well-formed blocks payload and print the response, rather than demonstrating
multiple calls.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant