-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathManifestStore_schema_annotated.json
550 lines (549 loc) · 18.9 KB
/
ManifestStore_schema_annotated.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ManifestStore",
"description": "A Container for a set of Manifests and a ValidationStatus list.",
"type": "object",
"required": ["manifests"],
"properties": {
"active_manifest": {
"description": "A label for the active (most recent) manifest in the store\n\n Clarify that the value of this property is the UUID of the active manifest. \n{: .comment}",
"type": ["string", "null"]
},
"manifests": {
"description": "A HashMap of Manifests",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Manifest"
}
},
"validation_status": {
"description": "ValidationStatus generated when loading the ManifestStore from an asset",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/ValidationStatus"
}
}
},
"definitions": {
"Actor": {
"description": "Identifies a person responsible for an action.",
"type": "object",
"properties": {
"credentials": {
"description": "List of references to W3C Verifiable Credentials.",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/HashedUri"
}
},
"identifier": {
"description": "An identifier for a human actor, used when the \"type\" is `humanEntry.identified`. \n\nWhat \"type\" does this refer to?\n{: .comment} ",
"type": ["string", "null"]
}
}
},
"AssetType": {
"type": "object",
"required": ["type"],
"properties": {
"type": {
"type": "string"
},
"version": {
"type": ["string", "null"]
}
}
},
"ClaimGeneratorInfo": {
"description": "Description of the claim generator, or the software used in generating the claim.\n\nThis structure is also used for actions softwareAgent\n\n What does it mean to have `additionalProperties` here? \n{: .comment}",
"type": "object",
"required": ["name"],
"properties": {
"icon": {
"description": "hashed URI to the icon (either embedded or remote)",
"anyOf": [
{
"$ref": "#/definitions/UriOrResource"
},
{
"type": "null"
}
]
},
"name": {
"description": "A human readable string naming the claim_generator",
"type": "string"
},
"version": {
"description": "A human readable string of the product's version",
"type": ["string", "null"]
}
},
"additionalProperties": true
},
"DataSource": {
"description": "A description of the source for assertion data",
"type": "object",
"required": ["type"],
"properties": {
"actors": {
"description": "A list of [`Actor`]s associated with this source.\n\n Reference-style link missing shortlink. \n{: .comment}",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/Actor"
}
},
"details": {
"description": "A human-readable string giving details about the source of the assertion data.",
"type": ["string", "null"]
},
"type": {
"description": "A value from among the enumerated list indicating the source of the assertion.",
"type": "string"
}
}
},
"DateT": {
"type": "string",
"description": "DateT store date strings in CBOR with datetime Tag(0) This helper class should be used where the C2PA spec specifies a tagged CBOR datatime"
},
"HashedUri": {
"description": "Hashed Uri structure as defined by C2PA spec It is annotated to produce the correctly tagged cbor serialization\n\n Link to relevant section of spec. Spelling/capitalization issues. \n{: .comment}",
"type": "object",
"required": ["hash", "url"],
"properties": {
"alg": {
"type": ["string", "null"]
},
"hash": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
"url": {
"type": "string"
}
}
},
"Ingredient": {
"description": "An `Ingredient` is any external asset that has been used in the creation of an image.",
"type": "object",
"required": ["title"],
"properties": {
"active_manifest": {
"description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`], this will hold the label of the active [`Manifest`].\n\n[`Manifest`]: crate::Manifest [`ManifestStore`]: crate::ManifestStore\n\nShort links for reference-style links must be separated by newline.\n{: .comment}",
"type": ["string", "null"]
},
"data": {
"description": "A reference to the actual data of the ingredient.",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"description": {
"description": "Additional description of the ingredient.",
"type": ["string", "null"]
},
"document_id": {
"description": "Document ID from `xmpMM:DocumentID` in XMP metadata.",
"type": ["string", "null"]
},
"format": {
"description": "The format of the source file as a MIME type.",
"default": "application/octet-stream",
"type": "string"
},
"hash": {
"description": "An optional hash of the asset to prevent duplicates.",
"type": ["string", "null"]
},
"informational_URI": {
"description": "URI to an informational page about the ingredient or its data.",
"type": ["string", "null"]
},
"instance_id": {
"description": "Instance ID from `xmpMM:InstanceID` in XMP metadata.",
"type": ["string", "null"]
},
"manifest_data": {
"description": "A [`ManifestStore`] from the source asset extracted as a binary C2PA blob.\n\n[`ManifestStore`]: crate::ManifestStore",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Any additional [`Metadata`] as defined in the C2PA spec.\n\n[`Manifest`]: crate::Metadata\n\n Reference-style link does not match shortlink: `Manifest != Metadata` \n{: .comment}",
"anyOf": [
{
"$ref": "#/definitions/Metadata"
},
{
"type": "null"
}
]
},
"provenance": {
"description": "URI from `dcterms:provenance` in XMP metadata.",
"type": ["string", "null"]
},
"relationship": {
"description": "Set to `ParentOf` if this is the parent ingredient.\n\nThere can only be one parent ingredient in the ingredients.",
"default": "componentOf",
"allOf": [
{
"$ref": "#/definitions/Relationship"
}
]
},
"resources": {
"description": "_No description provided_\n\nIf we don't document ResourceStore, then what should we do about this property?\n{: .comment}",
"readOnly": true,
"allOf": [
{
"$ref": "#/definitions/ResourceStore"
}
]
},
"thumbnail": {
"description": "A thumbnail image capturing the visual state at the time of import.\n\nA tuple of thumbnail MIME format (i.e. `image/jpeg`) and binary bits of the image.",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"title": {
"description": "A human-readable title, generally source filename.",
"type": "string"
},
"validation_status": {
"description": "Validation results.",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/ValidationStatus"
}
}
}
},
"Manifest": {
"description": "A Manifest represents all the information in a c2pa manifest. \n\nThis is not a terribly helpful description.\n{: .comment}",
"type": "object",
"properties": {
"assertions": {
"description": "A list of assertions\n\nShould this say an array of ManifestAssertions (with link)?\n{: .comment}",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/ManifestAssertion"
}
},
"claim_generator": {
"description": "A User Agent formatted string identifying the software/hardware/system produced this claim Spaces are not allowed in names, versions can be specified with product/1.0 syntax\n\n Link to <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent>?\n{: .comment}",
"default": "c2pa/0.25.2",
"type": "string"
},
"claim_generator_hints": {
"description": "_No description provided_.\n Does `additionalProperties` here just mean this object can have any properites?\n{: .comment}",
"type": ["object", "null"],
"additionalProperties": true
},
"claim_generator_info": {
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/ClaimGeneratorInfo"
}
},
"credentials": {
"description": "A List of verified credentials \n\nThe type definition is strange... An array of 'true'?\n{: .comment}",
"type": ["array", "null"],
"items": true
},
"format": {
"description": "The format of the source file as a MIME type.",
"default": "application/octet-stream",
"type": "string"
},
"ingredients": {
"description": "A List of ingredients",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Ingredient"
}
},
"instance_id": {
"description": "Instance ID from `xmpMM:InstanceID` in XMP metadata. \n\nWhat is the significance of the default value?\n{: .comment}",
"default": "xmp:iid:c1fcfabf-75b8-49ac-9032-34c7c6463098",
"type": "string"
},
"label": {
"type": ["string", "null"]
},
"redactions": {
"description": "A list of redactions - URIs to a redacted assertions",
"type": ["array", "null"],
"items": {
"type": "string"
}
},
"resources": {
"description": "container for binary assets (like thumbnails)\n\nIf we don't document ResourceStore, then what should we do about this property?\n{: .comment}",
"readOnly": true,
"allOf": [
{
"$ref": "#/definitions/ResourceStore"
}
]
},
"signature_info": {
"description": "Signature data (only used for reporting)",
"anyOf": [
{
"$ref": "#/definitions/SignatureInfo"
},
{
"type": "null"
}
]
},
"thumbnail": {
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"title": {
"description": "A human-readable title, generally source filename.",
"type": ["string", "null"]
},
"vendor": {
"description": "Optional prefix added to the generated Manifest Label This is typically Internet domain name for the vendor (i.e. `adobe`)",
"type": ["string", "null"]
}
}
},
"ManifestAssertion": {
"description": "A labeled container for an Assertion value in a Manifest",
"type": "object",
"required": ["data", "label"],
"properties": {
"data": {
"description": "The data of the assertion as Value",
"allOf": [
{
"$ref": "#/definitions/ManifestData"
}
]
},
"instance": {
"description": "There can be more than one assertion for any label\n\n So is this property just a counter? How do you know what value to use here?\n{: .comment} ",
"type": ["integer", "null"],
"format": "uint",
"minimum": 0.0
},
"kind": {
"description": "The [ManifestAssertionKind] for this assertion (as stored in c2pa content)\n\n Reference-style link missing shortlink and formatting. \n{: .comment}",
"anyOf": [
{
"$ref": "#/definitions/ManifestAssertionKind"
},
{
"type": "null"
}
]
},
"label": {
"description": "An assertion label in reverse domain format",
"type": "string"
}
}
},
"ManifestAssertionKind": {
"description": "Assertions in C2PA can be stored in several formats",
"type": "string",
"enum": ["Cbor", "Json", "Binary", "Uri"]
},
"ManifestData": {
"anyOf": [
true,
{
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
]
},
"Metadata": {
"description": "The Metadata structure can be used as part of other assertions or on its own to reference others\n\n What does it mean to have `additionalProperties` here? \n{: .comment}",
"type": "object",
"properties": {
"data_source": {
"anyOf": [
{
"$ref": "#/definitions/DataSource"
},
{
"type": "null"
}
]
},
"dateTime": {
"anyOf": [
{
"$ref": "#/definitions/DateT"
},
{
"type": "null"
}
]
},
"reference": {
"anyOf": [
{
"$ref": "#/definitions/HashedUri"
},
{
"type": "null"
}
]
},
"reviewRatings": {
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/ReviewRating"
}
}
},
"additionalProperties": true
},
"Relationship": {
"type": "string",
"enum": ["parentOf", "componentOf", "inputTo"]
},
"ResourceRef": {
"description": "A reference to a resource to be used in JSON serialization",
"type": "object",
"required": ["format", "identifier"],
"properties": {
"data_types": {
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/AssetType"
}
},
"format": {
"type": "string"
},
"identifier": {
"type": "string"
}
}
},
"ResourceStore": {
"description": "Resource store to contain binary objects referenced from JSON serializable structures\n\nThis should not be documented.\n{: .comment}",
"type": "object",
"required": ["resources"],
"properties": {
"base_path": {
"type": ["string", "null"]
},
"resources": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
}
}
},
"ReviewRating": {
"description": "A rating on an [`Assertion`].\n\nSee <https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_claim_review>.\n\n Update spec to link to v1.3. Reference-style link missing shortlink. \n{: .comment}",
"type": "object",
"required": ["explanation", "value"],
"properties": {
"code": {
"type": ["string", "null"]
},
"explanation": {
"type": "string"
},
"value": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
},
"SignatureInfo": {
"description": "Holds information about a signature",
"type": "object",
"properties": {
"cert_serial_number": {
"description": "The serial number of the certificate",
"type": ["string", "null"]
},
"issuer": {
"description": "human readable issuing authority for this signature",
"type": ["string", "null"]
},
"time": {
"description": "the time the signature was created",
"type": ["string", "null"]
}
}
},
"UriOrResource": {
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"$ref": "#/definitions/HashedUri"
}
]
},
"ValidationStatus": {
"description": "A `ValidationStatus` struct describes the validation status of a specific part of a manifest.\n\nSee <https://c2pa.org/specifications/specifications/1.0/specs/C2PA_Specification.html#_existing_manifests>.\n\n Maybe \"struct\" is not the best word to use here? Would \"object\" be the right JSON term? \n Update link to spec to v1.3. \n\n{: .comment}",
"type": "object",
"required": ["code"],
"properties": {
"code": {
"type": "string"
},
"explanation": {
"type": ["string", "null"]
},
"url": {
"type": ["string", "null"]
}
}
}
}
}