Commit 07d4562
Make subjects and resources optional on policy entries
With entry-level references, an entry can inherit subjects and resources
from referenced entries, making explicit declaration unnecessary. Both
fields now default to empty when absent from JSON.
This enables patterns like:
- Entry with only references (inherits everything)
- Entry with only subjects (shared-subjects for local references)
Updated ImmutablePolicyEntry.fromJson, OpenAPI schema, and JSON schema.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 83328c5 commit 07d4562
5 files changed
Lines changed: 38 additions & 42 deletions
File tree
- documentation/src/main/resources
- jsonschema
- openapi
- sources/schemas/policies
- policies/model/src
- main/java/org/eclipse/ditto/policies/model
- test/java/org/eclipse/ditto/policies/model
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 205 | + | |
210 | 206 | | |
211 | 207 | | |
212 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10730 | 10730 | | |
10731 | 10731 | | |
10732 | 10732 | | |
10733 | | - | |
| 10733 | + | |
| 10734 | + | |
| 10735 | + | |
| 10736 | + | |
10734 | 10737 | | |
10735 | 10738 | | |
10736 | 10739 | | |
| |||
10754 | 10757 | | |
10755 | 10758 | | |
10756 | 10759 | | |
10757 | | - | |
10758 | | - | |
10759 | | - | |
10760 | 10760 | | |
10761 | 10761 | | |
10762 | 10762 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
27 | | - | |
28 | | - | |
Lines changed: 20 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 198 | + | |
205 | 199 | | |
206 | 200 | | |
207 | 201 | | |
208 | 202 | | |
209 | 203 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
224 | 216 | | |
225 | 217 | | |
226 | 218 | | |
| |||
317 | 309 | | |
318 | 310 | | |
319 | 311 | | |
320 | | - | |
321 | | - | |
322 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
323 | 319 | | |
324 | 320 | | |
325 | 321 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
0 commit comments