Docs: Add OpenAPI specs for list, distribute, history, update_collabo…#133
Merged
mimijuwonlo-commits merged 1 commit intoSplit-Naira:mainfrom Mar 30, 2026
Merged
Conversation
|
@iGEORGE17 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
📝 Description
This PR addresses issue #104 by documenting the missing endpoints required for full interaction with the SplitNaira smart contracts and backend. These additions ensure that the frontend and external integrators have a clear contract for listing splits, triggering distributions, viewing history, and managing collaborators.
🚀 Scope of Changes
New Endpoints Added:
GET /splits: Added pagination and status filtering.
POST /splits/{id}/distribute: Documented the trigger for fund dispersal.
GET /splits/{id}/history: Added audit trail for split lifecycle events.
PUT /splits/{id}/collaborators: Defined schema for updating participant addresses and share ratios.
Schema Enhancements:
Updated BuildTransactionMetadata examples to include varied contexts (distribution vs. collaborator updates).
Standardized error responses (404 for missing splits, 400 for invalid share totals).
✅ Acceptance Criteria Check
[x] OpenAPI file passes spectral linting with zero errors.
[x] All new endpoints render correctly in Swagger UI.
[x] Request/Response examples provided for all new paths.
📸 Documentation Preview
[!TIP]
You can view the rendered version of these changes by pasting the openapi.yaml content into the Swagger Editor.
🧪 How to Test
Pull this branch: git checkout docs-update-104.
Run the local docs server: npm run docs:dev (or your equivalent command).
Navigate to /docs or the Swagger UI endpoint.
Verify that the distribute and collaborators endpoints correctly display the BuildTransactionMetadata object in the response example.
Closes #104