chore(docs): use shorthand enum names in subject mapping docs#308
chore(docs): use shorthand enum names in subject mapping docs#308marythought wants to merge 3 commits intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
|
📄 Preview deployed to https://opentdf-docs-pr-308.surge.sh |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation to promote the use of shorthand enum names (e.g., 'IN', 'AND', 'OR') in API examples and descriptions, replacing the more verbose canonical proto names and numeric values. These changes are reflected across the subject mapping guides, policy component documentation, and SDK references to improve readability. I have no feedback to provide as there were no review comments.
2cc862d to
ea2c87c
Compare
|
Updated to companion opentdf/platform#3408 (SDK shorthand enum constants). The previous middleware approach (opentdf/platform#3401) is being replaced by this simpler SDK-only approach. |
|
❌ Surge preview build failed — no preview was deployed. Check the workflow logs for details. Once the build passes, the preview will be at: https://opentdf-docs-pr-308.surge.sh Common cause: If the build failed on vendored YAML validation, run the following locally and commit the result: |
60e4c70 to
5b66443
Compare
eugenioenko
left a comment
There was a problem hiding this comment.
Reviewed WebSDK example, those changes look correct
Update Go code samples to use the new policy.OperatorIn, policy.BooleanAnd, policy.RuleAnyOf shorthand constants instead of verbose proto enum names. Companion to opentdf/platform#3408. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… badges - Update JS imports to use barrel exports from @opentdf/sdk instead of deep proto paths - Update policy.mdx Java example to use PolicyEnums shorthand constants - Update policy.mdx JS example to use enum values instead of strings - Add SdkVersion badges with NEXT placeholders to code samples (replace with actual versions once SDK releases ship) Note: Java code_samples/java/ files are pulled from the java-sdk repo at build time via remote-content plugin. They will update automatically once javaSdkVersion is bumped in docusaurus.config.ts after the java-sdk release containing opentdf/java-sdk#357. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
- Go: 0.18.0 (opentdf/platform#3410) - Java: 0.15.0 (opentdf/java-sdk#358) - JS: 0.17.0 (opentdf/web-sdk#929) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2e4a675 to
53d6526
Compare
Summary
policy.OperatorIn,policy.BooleanAnd,policy.RuleAnyOf) instead of verbose proto enum names@opentdf/sdkinstead of deep proto paths (@opentdf/sdk/platform/policy/objects_pb.js)ConditionBooleanTypeEnum.AND) instead of string literals ('CONDITION_BOOLEAN_TYPE_ENUM_AND')PolicyEnumsshorthand constantsSdkVersionbadges withNEXTplaceholders — replace with actual versions once SDK releases shipCompanion PRs
Note on Java code samples
The
code_samples/java/files are pulled from the java-sdk repo at build time viadocusaurus-plugin-remote-content. They will update automatically oncejavaSdkVersionis bumped indocusaurus.config.tsafter the java-sdk release containing opentdf/java-sdk#357.Test plan
npm run buildpassesNEXTversion placeholders after SDK releases🤖 Generated with Claude Code
Summary by CodeRabbit