feat: Add comprehensive API documentation with OpenAPI spec#233
Open
wangxiaofei860208-source wants to merge 1 commit intoANAVHEOBA:mainfrom
Open
feat: Add comprehensive API documentation with OpenAPI spec#233wangxiaofei860208-source wants to merge 1 commit intoANAVHEOBA:mainfrom
wangxiaofei860208-source wants to merge 1 commit intoANAVHEOBA:mainfrom
Conversation
- Add OpenAPI 3.0.3 specification (650+ lines) - Add Postman collection for API testing - Add TypeScript/JavaScript code examples - Add documentation README with setup instructions - Document all contract methods (initialize, deposit, withdraw, view, admin) - Include request/response schemas and error codes - Add interactive Swagger UI instructions Closes ANAVHEOBA#62 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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 PR adds comprehensive API documentation for the PrivacyLayer privacy pool smart contract, addressing issue #62.
Deliverables
✅ OpenAPI 3.0.3 Specification (
docs/openapi.yaml- 650+ lines)✅ Postman Collection (
docs/postman_collection.json)✅ Code Examples (
docs/examples/typescript-example.ts)✅ Documentation README (
docs/README.md)API Coverage
Initialization
POST /initialize- Initialize the privacy poolCore Operations
POST /deposit- Deposit into shielded poolPOST /withdraw- Withdraw using ZK proofView Functions
GET /get_root- Get current Merkle rootGET /deposit_count- Get total depositsGET /is_known_root- Check root validityGET /is_spent- Check nullifier statusGET /get_config- Get pool configurationAdmin Functions
POST /pause- Pause the poolPOST /unpause- Unpause the poolPOST /set_verifying_key- Update verifying keyTesting
View the OpenAPI spec:
docs/openapi.yamlImport Postman collection:
docs/postman_collection.jsonCloses
Closes #62
🤖 Generated with Claude Code