docs: align webhook events documentation, OpenAPI spec, and registry … - #142
Open
OmniZlatoon wants to merge 1 commit into
Open
docs: align webhook events documentation, OpenAPI spec, and registry …#142OmniZlatoon wants to merge 1 commit into
OmniZlatoon wants to merge 1 commit into
Conversation
Author
|
Good morning sir , please review PR on the changes that were being made and if any further changes, please do let me know |
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.
Webhook Events Alignment Walkthrough
We have successfully clarified the status of non-implemented webhook events across the codebase, README.md, and openapi.yaml.
Changes Made
1. Webhook Registry (src/services/webhookEvents.js)
Kept POOL_EVENTS registered to avoid breaking existing clients or test cases.
Added a clear comment matching the pattern of AIRDROP_EVENTS, clarifying that none of these events are currently dispatched since the indexer only processes airdrop lifecycle events.
2. User Documentation (README.md)
Marked all pool.* events in the Supported Event Types table as Planned (not yet implemented).
Updated the Webhook Delivery System setup section to clearly mark airdrop.failed as active and other airdrop events as planned/unimplemented.
Modified the worked example POST /api/v1/webhooks payload to use the active airdrop.failed and price.alert events.
Added a prominent caveat warning under the #### Test endpoint section, explaining that a successful test delivery (which uses a synthetic pool.assets_locked payload) does not imply that the event type will ever fire for real in production.
3. API Specification (openapi.yaml)
Corrected the /api/v1/webhooks/{id}/test description and payload schema to match the actual implementation (sends pool.assets_locked rather than ping).
Added a warning note to the test endpoint description explaining the synthetic nature of the payload and that pool events are not yet implemented.
Added pool.* and price.alert events to the WebhookEvent schema enum to be fully exhaustive.
Categorized all enum values in WebhookEvent's description into "Active / implemented" and "Planned / not yet implemented".
Updated all /api/v1/webhooks endpoint request/response examples to use active/implemented events.
Verification Results
Automated Jest Tests
We executed the full Jest test suite containing 370 tests:
bash
npm test
All tests passed successfully, confirming zero regressions:
PASS test/leaderElection.test.js
PASS test/alerts.test.js
PASS test/priceOracle.test.js
PASS test/coinmarketcap.test.js
PASS test/airdrops-service.test.js
PASS test/webhookDispatcher.test.js
PASS test/webhookSignature.test.js
PASS test/auth.test.js
PASS test/eventPoller.test.js
PASS test/prices.test.js
PASS test/indexerParser.test.js
PASS test/airdropExpiry.test.js
PASS test/webhooks.routes.test.js
PASS test/api-docs.test.js
PASS test/cors.test.js
PASS test/resilience.test.js
PASS test/errorHandler.test.js
PASS test/paginationContract.test.js
PASS test/airdrops.test.js
PASS test/priceWebSocket.test.js
PASS test/apiRateLimit.test.js
PASS test/rateLimit.test.js
PASS test/coingecko.test.js
PASS test/stellarDex.test.js
PASS test/circuitBreaker.test.js
PASS test/priceOracleCircuit.test.js
PASS test/cacheWarm.test.js
PASS test/indexerRoutes.test.js
PASS test/webhooks.test.js
PASS test/pagination.test.js
PASS test/indexerStore.test.js
PASS test/webhookEvents.test.js
PASS test/webhookRepository.test.js
PASS test/deliveryRepository.test.js
PASS test/config.test.js
PASS test/alerts-routes.test.js
PASS test/validate.test.js
PASS test/requestId.test.js
PASS test/health.test.js
Test Suites: 39 passed, 39 total
Tests: 370 passed, 370 total
Snapshots: 0 total
Time: 6.679 s
Ran all test suites.
closes #127