Open
Conversation
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.
Adds
v2.jsonnext to the existingv2.yaml. The YAML is not deleted yet, butv2.jsonshould be the source of truth from now on. Future updates should go in the JSON file, following the same conventions.Changes
Same 34 endpoints, same API, but the spec just actually documents it now.
Descriptions: Every endpoint, parameter, and response has a real description.
Typed responses: The YAML used
TonlibResponsefor every single 200 response (65 references). Now each endpoint has its own response schema.Error responses: Instead of one generic
defaulterror, there are now 21 specific error responses (401, 403, 404, 409, 422 variants per category, 429, 500 variants, 504, 542) with descriptions of what triggers each.Removed duplicate POSTs: The YAML duplicated every GET as a POST under the
rpctag. Removed all of those. POST is now only on the 6 endpoints that actually need it:jsonRPC,sendBoc,sendBocReturnHash,estimateFee,runGetMethod,runGetMethodStd.Servers block: Added mainnet (
toncenter.com) and testnet (testnet.toncenter.com) so Swagger UI / Postman work out of the box.Conventions for future edits
TonlibResponse422_*pattern