Skip to content

Docs: Add OpenAPI specs for list, distribute, history, update_collabo…#133

Merged
mimijuwonlo-commits merged 1 commit intoSplit-Naira:mainfrom
iGEORGE17:fix#104
Mar 30, 2026
Merged

Docs: Add OpenAPI specs for list, distribute, history, update_collabo…#133
mimijuwonlo-commits merged 1 commit intoSplit-Naira:mainfrom
iGEORGE17:fix#104

Conversation

@iGEORGE17
Copy link
Copy Markdown
Contributor

📝 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

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@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! 🚀

Learn more about application limits

@mimijuwonlo-commits mimijuwonlo-commits merged commit 9bb36f3 into Split-Naira:main Mar 30, 2026
0 of 3 checks passed
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.

Docs: Add OpenAPI specs for list, distribute, history, update_collaborators

2 participants