Repository navigation
SDP-2119 doc: update SDP API reference for 7.0.0 - #2791
ElliotFriend merged 5 commits into
Conversation
ElliotFriend
left a comment
There was a problem hiding this comment.
Looks great, overall! I added a couple notes throughout. the only real "blocker" from my review would be the asset_code and asset_issuer thing.
might also be good to change the info.version in the api spec (currently still sits at 2.1.0). happy to have it as a different PR, if you want, but this feels like the natural time to update that version, too.
| asset_issuer: | ||
| type: string | ||
| description: Issuer of the asset. Empty for the native asset. | ||
| example: USDC |
There was a problem hiding this comment.
Small snag from adding this property: it landed above the example: USDC line that belonged to asset_code, so asset_code lost its example and asset_issuer now documents USDC as an issuer value. (using the circle testnet issuer, since that matches what Balance and Amount already use for asset_issuer.)
| example: USDC | |
| asset_code: | |
| type: string | |
| example: USDC | |
| asset_issuer: | |
| type: string | |
| description: Issuer of the asset. Empty for the native asset. | |
| example: GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5 |
There was a problem hiding this comment.
Good catch, thank you. Addressed.
| can_create_payment: true | ||
| can_retry_payment: true | ||
| can_cancel_payment: false | ||
| parameters: |
There was a problem hiding this comment.
This parameters: node is empty, so it parses as null and the redocly check rejects it:
Expected type `NamedParameters` (object) but got `null`
Nothing in CI runs redocly lint today (and main already fails it on the unused DirectPayment component), so this won't turn the build red. Still worth dropping, since the next person to run the linter will hit it.
If it was a placeholder for a shared X-Wallet-Id parameter, that would be a nice follow-up on its own: the header is spelled out 13 times across this diff with six slightly different descriptions. Two or three shared components (list scoping, write routing, trustline target) would cover it, though I can see the argument for keeping the wording per-operation.
There was a problem hiding this comment.
The placeholder is for exactly that yes. X-Wallet-Id was originally a shared component, but was deliberately changed to be per-operation since the semantics genuinely differ (e.g. optional narrowing vs required source vs default-fallback). The suggestion of 3 shared components is great, so this is how it is now implemented: XWalletIdListScope, XWalletIdWriteSource and XWalletIdTrustlineTarget covering 10 instances where the mechanical description fits very well, and the last 3 are kept inline (they contain nuances that shouldn't be generalized). Also added a comment on the inline ones to explain the inconsistency.
| operation: | ||
| type: string | ||
| description: The change that was recorded |
There was a problem hiding this comment.
Could this be written as an enum? I think the backend writes INSERT for a grant and DELETE for a revoke (please correct me if i'm mistaken), and as an unconstrained string described as "The change that was recorded" a consumer doesn't really have anything concrete to branch on.
There was a problem hiding this comment.
Correct, the possible values are INSERT, DELETE and UPDATE. Addressed.
| required: | ||
| - name | ||
| properties: | ||
| name: |
There was a problem hiding this comment.
might be nice to include a maxLength: 64 here?
Thanks a lot for the review. Regarding the version bump, totally agreed. I'd bump to 3.0.0, but the commit history suggests that this should correspond to the SDP's current version (and it just hasn't been updated in a while), so I've bumped to 7.0.0. |
ElliotFriend
left a comment
There was a problem hiding this comment.
this looks great!! thanks for working through everything and getting this finished!
i left one non-blocking note, but feel free to merge whenever you're ready!
What
Add the multi-wallet API surface to the OpenAPI spec:
/distribution-walletsdistribution_wallet_idson the API-key schemasX-Wallet-Idon the 13 existing operations that honour it.circle_transfer_request_idtocircle_transaction_idplus the newcircle_transaction_typesource_wallet_idon Payment and Disbursementwebhook_urlon Organization.Only
openapi/stellar-disbursement-platform/main.yamlis hand-edited. Everything else ispnpm apioutput.Why
The multi-wallet endpoints shipped in 7.0.0 and require documentation in the API reference. 7.0.0 also introduces some changes to existing endpoints, and the Circle field rename is a breaking change the spec still describes under its old name.
SDP 7.0.0 release changelogs:
Known limitations
pnpm apiexits1.api:genuses brace expansion ({callbacks,platform/transactions}) which dash does not expand, so the Anchor Platform.info.mdx cleanupfails and the SDP one after it never runs. Three.info.mdxfiles are left behind and were removed by hand.api:cleandeletesdocs/platforms/stellar-disbursement-platform/api-reference/_category_.json, which the generator does not recreate. Restored by hand.openapi/horizon/bundled.ymlsince4e7fd938. Excluded here as unrelated.Note: the rest of the SDP Admin Guide is being updated in #2790.