-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathManifestStore_schema_edited.json
1241 lines (1241 loc) · 32.9 KB
/
ManifestStore_schema_edited.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
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$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.",
"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`.",
"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",
"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
},
"Coordinate": {
"description": "An x, y coordinate used for specifying vertices in polygons.",
"type": "object",
"required": [
"x",
"y"
],
"properties": {
"x": {
"description": "The coordinate along the x-axis.",
"type": "number",
"format": "double"
},
"y": {
"description": "The coordinate along the y-axis.",
"type": "number",
"format": "double"
}
}
},
"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.",
"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"
}
}
},
"Frame": {
"description": "A frame range representing starting and ending frames or pages.\n\nIf both `start` and `end` are missing, the frame will span the entire asset.",
"type": "object",
"properties": {
"end": {
"description": "The end of the frame inclusive or the end of the asset if not present.",
"type": [
"integer",
"null"
],
"format": "int32"
},
"start": {
"description": "The start of the frame or the end of the asset if not present.\n\nThe first frame/page starts at 0.",
"type": [
"integer",
"null"
],
"format": "int32"
}
}
},
"HashedUri": {
"description": "Hashed Uri structure as defined by C2PA spec It is annotated to produce the correctly tagged cbor serialization",
"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 asset.",
"type": "object",
"required": [
"title"
],
"properties": {
"active_manifest": {
"description": "The active manifest label (if one exists).\n\nIf this ingredient has a [`ManifestStore`](crate::ManifestStore) , this will hold the label of the active [`Manifest`](crate::Manifest).",
"type": [
"string",
"null"
]
},
"data": {
"description": "A reference to the actual data of the ingredient.",
"anyOf": [
{
"$ref": "#/definitions/ResourceRef"
},
{
"type": "null"
}
]
},
"data_types": {
"description": "Additional information about the data's type to the ingredient V2 structure.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AssetType"
}
},
"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[`Metadata`]: crate::Manifest",
"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"
}
]
},
"thumbnail": {
"description": "A thumbnail image capturing the visual state at the time of import.\n\nA tuple of thumbnail MIME format (for example `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",
"type": "object",
"properties": {
"assertions": {
"description": "A list of assertions",
"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",
"default": "c2pa/0.36.3",
"type": "string"
},
"claim_generator_info": {
"description": "A list of claim generator info data identifying the software/hardware/system produced this claim",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ClaimGeneratorInfo"
}
},
"credentials": {
"description": "A List of verified credentials",
"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.",
"default": "xmp:iid:eafef862-379d-44a1-99f7-2ead485e279d",
"type": "string"
},
"label": {
"type": [
"string",
"null"
]
},
"metadata": {
"description": "A list of user metadata for this claim",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Metadata"
}
},
"redactions": {
"description": "A list of redactions - URIs to a redacted assertions",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"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",
"type": [
"integer",
"null"
],
"format": "uint",
"minimum": 0.0
},
"kind": {
"description": "The [ManifestAssertionKind](crate::ManifestAssertionKind) for this assertion (as stored in c2pa content)",
"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",
"type": "object",
"properties": {
"dataSource": {
"anyOf": [
{
"$ref": "#/definitions/DataSource"
},
{
"type": "null"
}
]
},
"dateTime": {
"type": "string",
"description": "A date time in ISO 8601 format."
},
"reference": {
"anyOf": [
{
"$ref": "#/definitions/HashedUri"
},
{
"type": "null"
}
]
},
"regionOfInterest": {
"anyOf": [
{
"$ref": "#/definitions/RegionOfInterest"
},
{
"type": "null"
}
]
},
"reviewRatings": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ReviewRating"
}
}
},
"additionalProperties": true
},
"Range": {
"description": "A spatial, temporal, frame, or textual range describing the region of interest.",
"type": "object",
"required": [
"type"
],
"properties": {
"frame": {
"description": "A frame range.",
"anyOf": [
{
"$ref": "#/definitions/Frame"
},
{
"type": "null"
}
]
},
"shape": {
"description": "A spatial range.",
"anyOf": [
{
"$ref": "#/definitions/Shape"
},
{
"type": "null"
}
]
},
"text": {
"description": "A textual range.",
"anyOf": [
{
"$ref": "#/definitions/Text"
},
{
"type": "null"
}
]
},
"time": {
"description": "A temporal range.",
"anyOf": [
{
"$ref": "#/definitions/Time"
},
{
"type": "null"
}
]
},
"type": {
"description": "The type of range of interest.",
"allOf": [
{
"$ref": "#/definitions/RangeType"
}
]
}
}
},
"RangeType": {
"description": "The type of range for the region of interest.",
"oneOf": [
{
"description": "A spatial range, see [`Shape`](#shape) for more details.\n\n",
"type": "string",
"enum": [
"spatial"
]
},
{
"description": "A temporal range, see [`Time`](#time) for more details.",
"type": "string",
"enum": [
"temporal"
]
},
{
"description": "A spatial range, see [`Frame`](#frame) for more details.",
"type": "string",
"enum": [
"frame"
]
},
{
"description": "A textual range, see [`Text`](#text) for more details.",
"type": "string",
"enum": [
"textual"
]
}
]
},
"RegionOfInterest": {
"description": "A region of interest within an asset describing the change.\n\nThis struct can be used from [`Action::changes`](https://docs.rs/c2pa/latest/c2pa/assertions/struct.Action.html#method.changes) or [`Metadata::region_of_interest`](https://docs.rs/c2pa/latest/c2pa/assertions/struct.Metadata.html#method.region_of_interest).",
"type": "object",
"required": [
"region"
],
"properties": {
"description": {
"description": "A free-text string.",
"type": [
"string",
"null"
]
},
"identifier": {
"description": "A free-text string representing a machine-readable, unique to this assertion, identifier for the region.",
"type": [
"string",
"null"
]
},
"metadata": {
"description": "Additional information about the asset.",
"anyOf": [
{
"$ref": "#/definitions/Metadata"
},
{
"type": "null"
}
]
},
"name": {
"description": "A free-text string representing a human-readable name for the region which might be used in a user interface.",
"type": [
"string",
"null"
]
},
"region": {
"description": "A range describing the region of interest for the specific asset.",
"type": "array",
"items": {
"$ref": "#/definitions/Range"
}
},
"role": {
"description": "A value from our controlled vocabulary or an entity-specific value (e.g., com.litware.coolArea) that represents the role of a region among other regions.",
"anyOf": [
{
"$ref": "#/definitions/Role"
},
{
"type": "null"
}
]
},
"type": {
"description": "A value from a controlled vocabulary such as <https://cv.iptc.org/newscodes/imageregiontype/> or an entity-specific value (e.g., com.litware.newType) that represents the type of thing(s) depicted by a region.\n\nNote this field serializes/deserializes into the name `type`.",
"type": [
"string",
"null"
]
}
}
},
"Relationship": {
"type": "string",
"enum": [
"parentOf",
"componentOf",
"inputTo"
]
},
"ResourceRef": {
"description": "A reference to a resource to be used in JSON serialization.\n\nThe underlying data can be read as a stream via [`Reader::resource_to_stream`](https://docs.rs/c2pa/latest/c2pa/struct.Reader.html#method.resource_to_stream).",
"type": "object",
"required": [
"format",
"identifier"
],
"properties": {
"alg": {
"description": "The algorithm used to hash the resource (if applicable).",
"type": [
"string",
"null"
]
},
"data_types": {
"description": "More detailed data types as defined in the C2PA spec.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/AssetType"
}
},
"format": {
"description": "The mime type of the referenced resource.",
"type": "string"
},
"hash": {
"description": "The hash of the resource (if applicable).",
"type": [
"string",
"null"
]
},
"identifier": {
"description": "A URI that identifies the resource as referenced from the manifest.\n\nThis may be a JUMBF URI, a file path, a URL or any other string. Relative JUMBF URIs will be resolved with the manifest label. Relative file paths will be resolved with the base path if provided.",
"type": "string"
}
}
},
"ReviewRating": {
"description": "A rating on an [`Assertion`](crate::ManifestAssertion).\n\n See [Review Ratings in C2PA spec](https://c2pa.org/specifications/specifications/1.4/specs/C2PA_Specification.html#_review_ratings.)",
"type": "object",
"required": [
"explanation",
"value"
],
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"explanation": {
"type": "string"
},
"value": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
},
"Role": {
"description": "A role describing the region.",
"oneOf": [
{
"description": "Arbitrary area worth identifying.",
"type": "string",
"enum": [
"c2pa.areaOfInterest"
]
},
{
"description": "This area is all that is left after a crop action.",
"type": "string",
"enum": [
"c2pa.cropped"
]
},
{
"description": "This area has had edits applied to it.",
"type": "string",
"enum": [
"c2pa.edited"
]
},
{
"description": "The area where an ingredient was placed/added.",
"type": "string",
"enum": [
"c2pa.placed"
]
},
{
"description": "Something in this area was redacted.",
"type": "string",
"enum": [
"c2pa.redacted"
]
},
{
"description": "Area specific to a subject (human or not).",
"type": "string",
"enum": [
"c2pa.subjectArea"
]
},
{
"description": "A range of information was removed/deleted.",
"type": "string",
"enum": [
"c2pa.deleted"
]
},
{
"description": "Styling was applied to this area.",
"type": "string",
"enum": [
"c2pa.styled"
]
},
{
"description": "Invisible watermarking was applied to this area for the purpose of soft binding.",
"type": "string",
"enum": [
"c2pa.watermarked"
]
}
]
},
"Shape": {
"description": "A spatial range representing rectangle, circle, or a polygon.",
"type": "object",
"required": [
"origin",
"type",
"unit"
],
"properties": {
"height": {
"description": "The height of a rectnagle.\n\nThis field can be ignored for circles and polygons.",
"type": [
"number",
"null"
],
"format": "double"
},
"inside": {
"description": "If the range is inside the shape.\n\nThe default value is true.",
"type": [
"boolean",
"null"
]
},
"origin": {
"description": "THe origin of the coordinate in the shape.",
"allOf": [
{
"$ref": "#/definitions/Coordinate"
}
]
},
"type": {
"description": "The type of shape.",
"allOf": [
{
"$ref": "#/definitions/ShapeType"
}
]
},
"unit": {
"description": "The type of unit for the shape range.",
"allOf": [
{
"$ref": "#/definitions/UnitType"
}
]
},
"vertices": {
"description": "The vertices of the polygon.\n\nThis field can be ignored for rectangles and circles.",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Coordinate"
}
},
"width": {
"description": "The width for rectangles or diameter for circles.\n\nThis field can be ignored for polygons.",
"type": [
"number",
"null"
],
"format": "double"
}
}
},
"ShapeType": {
"description": "The type of shape for the range.",
"oneOf": [
{
"description": "A rectangle.",
"type": "string",
"enum": [
"rectangle"
]
},
{
"description": "A circle.",
"type": "string",
"enum": [
"circle"
]
},
{
"description": "A polygon.",
"type": "string",
"enum": [
"polygon"
]
}
]
},
"SignatureInfo": {
"description": "Holds information about a signature",
"type": "object",
"properties": {
"alg": {
"description": "human readable issuing authority for this signature",
"anyOf": [
{
"$ref": "#/definitions/SigningAlg"
},
{
"type": "null"
}
]
},
"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"