docs: fix gRPC signatures, DID parse, and TrustStore examples#58
Merged
docs: fix gRPC signatures, DID parse, and TrustStore examples#58
Conversation
- request_badge returns (success, result_dict, error), not (token, error) - badge keeper events are dicts with 'type'/'token' keys, not objects - verify() takes (payload, signature), returns (valid, key_id, error) - verify_attached() takes (jws) only, returns (valid, payload, key_id, error) Fixes: DOCS_REMEDIATION_PLAN P0-5
- DID parse returns dict without 'document_url'; that's a separate client.did.document_url() call. Split example accordingly. - TrustStore add_key() raises NotImplementedError. Updated docs to show available is_trusted() method and mark add_key as unimplemented. - Fixed path output from string to list (actual return type). Fixes: DOCS_REMEDIATION_PLAN P2-8
|
✅ Documentation validation passed!
|
|
✅ All checks passed! Ready for review. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Updates SDK documentation examples to match the actual gRPC client method signatures and return shapes, reducing copy/paste breakage for users of CapiscioRPCClient.
Changes:
- Corrected
BadgeService.request_badge()example to use(success, result_dict, error)and readresult["token"]/result["expires_at"]. - Updated DID parsing docs to reflect
parse()returningpathas a list and to use a separatedocument_url()call. - Updated TrustStore docs to note
add_key()is unimplemented and to showis_trusted()usage; fixedSimpleGuardService.verify()/verify_attached()return signatures.
Comment on lines
455
to
459
| @@ -456,8 +459,8 @@ with CapiscioRPCClient() as client: | |||
| ttl_seconds=300, | |||
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
Fixes incorrect gRPC method signatures and misleading code examples in the SDK documentation.
Issues Fixed
document_urlkey; TrustStoreadd_key()documented as working but raises NotImplementedErrorChanges
gRPC Signatures (commit 1)
verify()→ returns(valid, key_id, error)not(valid, error)verify_attached()→ returns(valid, payload, key_id, error)not(valid, payload, error)request_badge()→ returns(success, result_dict, error)not(badge_token, error)type/token, not objectsDID & TrustStore (commit 2)
parse()returns dict withoutdocument_url— split into separatedocument_url()callpathfield is a list, not a joined stringadd_key()as NotImplementedError; show workingis_trusted()instead