feat(methods): add blocks.validate method#1622
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add the blocks.validate Web API method to the Slack API client. Callers can validate Block Kit payloads via methods().blocksValidate(req) (and the async equivalent), passing blocks, message, or view as JSON-encoded strings. No scopes are required. Adds the endpoint constant, sync and async interface methods and impls, the request form builder, the request/response model classes (with an errors[] list of code/message/pointer/relatedComponent), the Tier3 rate limit, a local test, and a response sample for type generation. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1622 +/- ##
============================================
+ Coverage 73.30% 73.31% +0.01%
- Complexity 4518 4524 +6
============================================
Files 478 478
Lines 14300 14310 +10
Branches 1490 1490
============================================
+ Hits 10483 10492 +9
- Misses 2925 2930 +5
+ Partials 892 888 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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.
This pull request adds the
blocks.validateWeb API method to the Slack API client for Java.slack.methods(token).blocksValidate(req)and the async equivalentslack.methodsAsync(token).blocksValidate(req).blocks,message, andvieware accepted as JSON-encoded String arguments (all optional; the API expects exactly one). No scopes required.BLOCKS_VALIDATEendpoint constant, sync + async interface methods and implementations, theRequestFormBuildermapping,BlocksValidateRequest/BlocksValidateResponsemodel classes (the response includes anerrors[]list ofcode/message/pointer/relatedComponent), theTier3rate limit and metadata entry, atest_locallytest, and ablocks.validate.jsonresponse sample.Category (place an
xin each of the[ ])Testing
./mvnw test -pl slack-api-client -Dtest=test_locally.api.methods.BlocksTestand confirm both the sync and async cases pass against the mock Slack API server.Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.
🤖 Generated with Claude Code