Skip to content

chore(docs): restructure Discovery page and add Architecture Response Objects#283

Merged
marythought merged 6 commits into
mainfrom
chore/274-e-discovery-architecture
Apr 8, 2026
Merged

chore(docs): restructure Discovery page and add Architecture Response Objects#283
marythought merged 6 commits into
mainfrom
chore/274-e-discovery-architecture

Conversation

@marythought
Copy link
Copy Markdown
Contributor

@marythought marythought commented Apr 7, 2026

Summary

Discovery Page

  • Add Setup section with client init for Go, Java, JS
  • Add Signature → Parameters → Example → Returns to all 5 methods
  • Strip inline JS auth setup from examples (now in Setup)
  • Link Returns to Policy type references (Attribute, Attribute Value objects)

Architecture Page

  • Add Response Objects section showing getter patterns across Go/Java/JS
  • Four examples: GetAttributeValue (single), ListAttributeValues (list), GetDecision (decision), GetEntitlements (map)

Part of #274

Test plan

  • Verify Discovery page renders all methods with structured docs
  • Verify links to Policy type references work
  • Verify Architecture Response Objects examples render

🤖 Generated with Claude Code

Summary by CodeRabbit

Documentation

  • Reorganized SDK docs with a consistent Setup section for Go, Java, and JavaScript initialization
  • Enhanced method pages with explicit Signature, Parameters, and Returns sections
  • Added a Response Objects section showing how to read API responses in each language
  • Reworked examples to extract client setup, simplify JS usage (no inline auth), tighten error text, and rename "Putting It Together" to "Typical Workflow"

@marythought marythought requested review from a team as code owners April 7, 2026 16:33
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 08dde475-6d99-4fd0-a108-73f901f31678

📥 Commits

Reviewing files that changed from the base of the PR and between 4bbc881 and 4ee7581.

📒 Files selected for processing (2)
  • docs/sdks/discovery.mdx
  • docs/sdks/platform-client.mdx

📝 Walkthrough

Walkthrough

Documentation updates to SDK reference pages: added a standardized Setup section with Go/Java/JavaScript client initialization, restructured several discovery method docs with explicit signatures/params/returns, and added a "Response Objects" guide with language-specific examples for reading protobuf responses.

Changes

Cohort / File(s) Summary
Discovery SDK Documentation
docs/sdks/discovery.mdx
Added a top-level Setup section with Go/Java/JavaScript client/auth initialization; expanded ListAttributes, AttributeExists, AttributeValueExists, ValidateAttributes, GetEntityAttributes to include Signature, Parameters, Returns and per-language call forms; moved SDK init out of workflow examples, renamed "Putting It Together" → "Typical Workflow"; simplified JS examples to rely on shared auth and removed inline token/provider construction.
Platform Client Documentation
docs/sdks/platform-client.mdx
Renamed page/heading from "Architecture" to "Overview"; added a "Response Objects" section describing protobuf return objects and language-specific access patterns (Go getters, Java getters, JS direct properties); appended language-tabbed examples for GetAttributeValue, ListAttributeValues, GetDecision, and GetEntitlements illustrating field access and list iteration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • elizabethhealy
  • jp-ayyappan

Poem

🐰 Hopped through docs with a nibble and pen,
I gathered setups for Go, Java, and Zen.
Responses unpacked in each language's song,
Workflow now tidy — the examples sing along! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references the main changes: restructuring the Discovery page and adding Response Objects to the Architecture page, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/274-e-discovery-architecture

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/274-e-discovery-architecture branch from 485881b to 647c34f Compare April 7, 2026 16:33
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 Discovery and Platform Client by adding a centralized setup section, detailed method signatures, and a guide for handling protobuf response objects across Go, Java, and JavaScript. The review feedback identifies opportunities to improve language neutrality in documentation tables, maintain variable name consistency in JavaScript examples, and correct return type descriptions for JavaScript-specific calls.

Comment thread docs/sdks/discovery.mdx Outdated
Comment thread docs/sdks/discovery.mdx Outdated
Comment thread docs/sdks/discovery.mdx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

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

@marythought marythought force-pushed the chore/274-e-discovery-architecture branch from 7748d8c to 1bcaaad Compare April 7, 2026 18:01
Comment thread docs/sdks/discovery.mdx
Comment thread docs/sdks/discovery.mdx
elizabethhealy
elizabethhealy previously approved these changes Apr 7, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/sdks/discovery.mdx`:
- Around line 492-506: Update the parameters docs to explicitly document the JS
request shape: mention that the JS SDK does not expose getEntityAttributes and
that callers should use PlatformClient.getEntitlements with an object payload
containing entityIdentifier; add a JS-specific parameter note or new table row
describing the expected key name (entityIdentifier) and its accepted values
(email, username, client ID, UUID) and reference PlatformClient.getEntitlements
and getEntityAttributes to avoid confusion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b08994e1-1218-4e83-9d31-3788da7afa5b

📥 Commits

Reviewing files that changed from the base of the PR and between 930f7d2 and 4bbc881.

📒 Files selected for processing (2)
  • docs/sdks/discovery.mdx
  • docs/sdks/platform-client.mdx

Comment thread docs/sdks/discovery.mdx
marythought and others added 6 commits April 8, 2026 09:56
… Objects (#274)

Discovery:
- Add Setup section with client init for Go, Java, JS
- Add Signature/Parameters/Returns to all 5 methods
- Strip inline JS auth setup from examples
- Link Returns to Policy type references

Architecture:
- Add Response Objects section showing getter patterns across Go/Java/JS
  with four examples: GetAttributeValue, ListAttributeValues, GetDecision,
  GetEntitlements

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consistent naming with the Authorization page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use language-neutral "list of strings" instead of Go-specific []string
- Fix platformClient → platform variable name in GetEntityAttributes signature
- Clarify that JS returns EntityEntitlements, not plain FQN strings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All four examples already had Go/Java/JS — now wrapped in Tabs
components so the language selector is visible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Better reflects the page content — SDK structure, client setup, and
response patterns rather than system architecture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JS uses getEntitlements with EntityIdentifier, not the same entity
parameter as Go/Java. Add a note linking to the EntityIdentifier docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought force-pushed the chore/274-e-discovery-architecture branch from 48e117a to 4ee7581 Compare April 8, 2026 16:56
@marythought marythought merged commit bf813a9 into main Apr 8, 2026
7 of 9 checks passed
@marythought marythought deleted the chore/274-e-discovery-architecture branch April 8, 2026 16:57
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.

2 participants