feat(methods): add blocks.validate example - #53
Draft
zimeg wants to merge 2 commits into
Draft
Conversation
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>
6 tasks
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>
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 adds a
blocksmethod-family example forblocks.validate, mirroring the existingchatexample so each Slack API method family has a self-contained, runnable demonstration.methods/src/main/java/blocks/BlocksValidate.javavalidates a Block Kit payload and prints the response.methods/src/main/java/blocks/manifest.jsonfor theblocksexample (no scopes —blocks.validateis unauthenticated).blockssection inmethods/README.md's "What's on call" list.blocks.validateis not yet in a publishedslack-api-clientrelease, so it depends on the SDK change in slackapi/java-slack-sdk#1622. Thepom.xmlstays pinned to the published1.49.0so the repo keeps building; to run this example today, build the SDK from source and point the dependency at the locally-installed snapshot.Testing
mvn install -Dmaven.test.skip=truesoslack-api-clientinstalls to$HOME/.m2/repositoryas a snapshot (e.g.1.49.1-SNAPSHOT).methods/pom.xml, temporarily bump theslack-api-client<version>to that snapshot.cd methods && mvn compile exec:java -Dexec.mainClass=blocks.BlocksValidateand confirm the response printsok=truewith no errors for the well-formed payload.Depends on slackapi/java-slack-sdk#1622.
Co-Authored-By: Claude svc-devxp-claude@slack-corp.com