Commit a82f860
chore(docs): add Resource constructor helpers and update examples (#301)
## Summary
- Add `### Resource` section documenting helper functions for all 3 SDKs
(`ForAttributeValues`, `ForRegisteredResourceValueFqn`)
- Add `<SdkVersion>` annotations with minimum SDK versions: Go v0.17.0,
Java v0.14.0, JS v0.15.0
- Update GetDecision examples (Go, Java, JS) to use helpers instead of
verbose proto construction
- Update Type Reference Resource section with tabbed helper examples
- Add note about `ephemeralId` not being set by helpers (relevant for
GetDecisionBulk)
Based on #303 (SdkVersion component + EntityIdentifier annotations).
**Companion PRs (SDK implementations):**
- Go: opentdf/platform#3337
- Java: opentdf/java-sdk#354
- JavaScript: opentdf/web-sdk#921
## Test plan
- [ ] `npm run build` passes
- [ ] Visual review of rendered authorization page
- [ ] CI checks pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Enhanced authorization docs with a new Resource section describing
attribute-value and registered-resource formats, plus language-specific
helper APIs and “without helpers” manual examples.
* Updated GetDecision/GetDecisionBulk/GetEntitlements parameter docs to
link entity/resource types and note Resource helper usage.
* Rewrote multi-language GetDecision samples (Go/Java/JavaScript) to use
Resource/Entity helper constructors.
* Added Go TDFObject type reference and minor Go example ctx
initialization updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4362792 commit a82f860
4 files changed
Lines changed: 218 additions & 119 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
144 | | - | |
145 | 141 | | |
146 | 142 | | |
147 | 143 | | |
| |||
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 157 | + | |
172 | 158 | | |
173 | 159 | | |
174 | 160 | | |
175 | 161 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 162 | + | |
| 163 | + | |
183 | 164 | | |
184 | 165 | | |
185 | 166 | | |
| |||
202 | 183 | | |
203 | 184 | | |
204 | 185 | | |
| 186 | + | |
205 | 187 | | |
206 | 188 | | |
207 | 189 | | |
| |||
223 | 205 | | |
224 | 206 | | |
225 | 207 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
253 | 213 | | |
254 | 214 | | |
255 | 215 | | |
| |||
0 commit comments