docs(sdks): use ForAction in authorization examples and document fulfillableObligationFqns#367
docs(sdks): use ForAction in authorization examples and document fulfillableObligationFqns#367marythought wants to merge 3 commits into
Conversation
…illableObligationFqns
Update the v2 GetDecision / GetDecisionBulk Go examples to use the new
authorizationv2.ForAction(name) constructor instead of hand-building
&policy.Action{Name: ...}, dropping the now-unused policy import from those
snippets. V1 legacy examples (plural Actions) are unchanged.
Also document the request-side fulfillableObligationFqns field on both the
GetDecision and GetDecisionMultiResourceRequest parameter tables, and add a
note pairing it with the response-side requiredObligations.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
📄 Preview deployed to https://opentdf-docs-pr-367.surge.sh |
The GetDecision error-handling snippet imported the policy package but never referenced it; collapse to the single authorizationv2 import used elsewhere. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
listDocuments made an unauthenticated @octokit/request call to the git trees API, hitting GitHub's 60 req/hr unauthenticated limit and failing the docs build (Test deployment). The workflow already passes GITHUB_TOKEN; read it and send an Authorization header when present, matching the check-vendored-yaml fix (#252). Falls back to unauthenticated requests locally when unset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
|
Codex Review: review from Codex: LGTM ✅ |
Summary
Companion to opentdf/platform#3783, which adds the
authorizationv2.ForAction(name)constructor.GetDecision/GetDecisionBulkGo examples to useForAction(...)instead of hand-building&policy.Action{Name: ...}, and drops the now-unusedpolicyimport from those snippets.fulfillableObligationFqnsfield (previously undocumented) on both theGetDecisionandGetDecisionMultiResourceRequestparameter tables.fulfillableObligationFqns(request: what the PEP can enforce) withrequiredObligations(response: what it must enforce).V1 legacy examples (plural
Actions: []*policy.Action{...}) are intentionally left unchanged —ForActionreturns a single*policy.Actionand there is no slice helper.Notes
ForActionexamples reference an API that lands with feat(sdk): add ForAction helper to authorization/v2 platform#3783; thecode_samples/**.mdxsnippets here are documentation-only and are not compiled by the SDK-example CI (which buildstests/sdk-examples/go), so this can merge independently.policywithout using it — happy to fix in a follow-up if wanted.Testing
vale docs/sdks/authorization.mdx code_samples/authorization/get_decision.mdx— 0 errors/warnings🤖 Generated with Claude Code