Skip to content

chore(docs): update Java/JS examples to use EntityIdentifier helpers#291

Open
marythought wants to merge 4 commits intomainfrom
chore/entity-identifier-helpers-docs
Open

chore(docs): update Java/JS examples to use EntityIdentifier helpers#291
marythought wants to merge 4 commits intomainfrom
chore/entity-identifier-helpers-docs

Conversation

@marythought
Copy link
Copy Markdown
Contributor

@marythought marythought commented Apr 10, 2026

Summary

  • Add EntityIdentifiers helper tables and examples for Java and JavaScript to the EntityIdentifier reference section (now in language tabs)
  • Update all Java examples to use EntityIdentifiers.forEmail(...) instead of verbose EntityIdentifier.newBuilder().setEntityChain(...) construction
  • Update all JavaScript examples to use EntityIdentifiers.forEmail(...) instead of verbose nested object literals
  • Update discovery page JS example to use helpers
  • Move verbose construction patterns to collapsible <details> blocks for reference

Related

Test plan

  • Verify docs build (npm run build) passes
  • Check surge preview for correct rendering of helper tables, code examples, and details blocks

🤖 Generated with Claude Code

@marythought marythought requested review from a team as code owners April 10, 2026 20:55
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Warning

Rate limit exceeded

@marythought has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 54 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 54 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 93a13e63-068c-48c8-82d6-b2c8ebd2ee49

📥 Commits

Reviewing files that changed from the base of the PR and between 248646b and e921be4.

📒 Files selected for processing (2)
  • docs/sdks/authorization.mdx
  • docs/sdks/discovery.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/entity-identifier-helpers-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@marythought marythought force-pushed the chore/entity-identifier-helpers-docs branch from d45435b to f137e39 Compare April 10, 2026 20:57
@github-actions
Copy link
Copy Markdown
Contributor

📄 Preview deployed to https://opentdf-docs-pr-291.surge.sh

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the SDK documentation for authorization and discovery to promote the use of helper functions for entity identification in Java and JavaScript. It replaces manual object and proto construction in examples with these helpers and moves the manual methods into collapsible sections for better readability. The review feedback correctly identifies that the 'Supported entity types' table now omits 'Claims' and 'Registered Resource' types which were previously documented, and notes an inconsistency in the naming convention for Java helpers within that table.

marythought and others added 4 commits April 10, 2026 14:39
All three SDKs now ship convenience constructors for EntityIdentifier
(Go: ForEmail, Java: EntityIdentifiers.forEmail, JS: forEmail). Update
the authorization and discovery docs to use these helpers instead of
verbose nested proto/object construction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update JS examples to use `EntityIdentifiers.forEmail(...)` instead of
bare `forEmail(...)` to match opentdf/web-sdk#916.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address Gemini review feedback:
- Restore Claims and Registered Resource rows to entity types table
- Add EntityIdentifiers. prefix to Java column for consistency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought force-pushed the chore/entity-identifier-helpers-docs branch from 8908184 to e921be4 Compare April 10, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant