diff --git a/docs/manifest/json-ref/crjson-ref.mdx b/docs/manifest/json-ref/crjson-ref.mdx new file mode 100644 index 00000000..4abc57f5 --- /dev/null +++ b/docs/manifest/json-ref/crjson-ref.mdx @@ -0,0 +1,13 @@ +--- +id: crjson-schema +title: CrJSON reference +hide_table_of_contents: true +--- + +:::note +This is a beta release of this reference. It is a work in progress and may have issues or errors. +::: + +import SchemaReference from '@site/src/components/SchemaReference'; + + diff --git a/docs/manifest/json-ref/index.md b/docs/manifest/json-ref/index.md index f7f46fec..24b0befb 100644 --- a/docs/manifest/json-ref/index.md +++ b/docs/manifest/json-ref/index.md @@ -16,6 +16,7 @@ The JSON manifest is an abstract translation layer that's easier to understand t - [Builder](builder-ref.mdx) - Use to add a signed manifest to an asset. - [ManifestDefinition](manifest-def.mdx) - Use to define a manifest (a collection of ingredients and assertions) that can be added to a manifest store, signed, and embedded into a file. - [Settings](settings-ref.mdx) - Use to define all aspects of code for working with Content Credentials. +- [CrJSON](crjson-ref.mdx) - Content Credential JSON document format for representing C2PA manifests as JSON (excludes asset_info, content, and metadata). diff --git a/docs/manifest/writing/assertions-actions.md b/docs/manifest/writing/assertions-actions.md index 219c670b..b46c09dc 100644 --- a/docs/manifest/writing/assertions-actions.md +++ b/docs/manifest/writing/assertions-actions.md @@ -280,11 +280,6 @@ The [C2PA Technical Specification](https://c2pa.org/specifications/specification V1 actions are fully specified in the `actions` array. However, a v2 action may either be fully specified in an element of the `actions` array or it may be derived from an element in the `templates` array with the same action name. -
-The CAI APIs can read all v2 actions and write **most** v2 actions. -We should document v2 actions that can it NOT write. -
- ### Action names The value of the `action` property must be either one of the pre-defined [standard C2PA action strings](https://c2pa.org/specifications/specifications/2.2/specs/C2PA_Specification.html#_actions) of the form `c2pa.*` or a custom action name. The set of standard C2PA actions includes fundamental ones as `c2pa.created` for when an asset is first created, and others (`c2pa.cropped`, `c2pa.resized`, and so on) for when an asset's content is modified in some way. diff --git a/remote-docs.json b/remote-docs.json index c53b8500..ae840839 100644 --- a/remote-docs.json +++ b/remote-docs.json @@ -171,6 +171,16 @@ "order": 10 } }, + { + "repo": "contentauth/c2pa-rs", + "path": "docs/instanceid_behavior.md", + "dest": "docs/rust-sdk/docs/instanceid-behavior.md", + "sidebar": { + "category": "rust-sdk", + "label": "InstanceID behavior", + "order": 11 + } + }, { "_comment": "Working with the SDK" }, { @@ -326,7 +336,7 @@ "dest": "docs/c2pa-cpp/docs/context-settings.md", "sidebar": { "category": "c2pa-cpp", - "label": "Configuring the SDK", + "label": "Configuring SDK settings", "order": 3 } }, @@ -474,6 +484,13 @@ "dest": "static/sb-alg-list.json" }, + { "_comment": "CrJSON schema (static JSON, hand-authored fixture)" }, + { + "repo": "contentauth/c2pa-rs", + "path": "sdk/tests/fixtures/schemas/crJSON-schema.json", + "dest": "static/schemas/crJSON-schema.json" + }, + { "_comment": "Durable Content Credentials - TrustMark watermarking" }, { "repo": "adobe/trustmark", diff --git a/sidebars.js b/sidebars.js index db58db58..44430f29 100644 --- a/sidebars.js +++ b/sidebars.js @@ -225,6 +225,11 @@ const sidebars = { id: 'manifest/json-ref/settings-schema', label: 'Settings', }, + { + type: 'doc', + id: 'manifest/json-ref/crjson-schema', + label: 'CrJSON', + }, ], }, { diff --git a/src/components/SchemaReference.js b/src/components/SchemaReference.js index 726c3aeb..3388da7a 100644 --- a/src/components/SchemaReference.js +++ b/src/components/SchemaReference.js @@ -21,8 +21,7 @@ function formatType(cellSchema) { // $ref if (cellSchema.$ref) { - const ref = cellSchema.$ref; - const name = ref.startsWith('#/$defs/') ? ref.replace('#/$defs/', '') : ref; + const name = refToDefName(cellSchema.$ref) || cellSchema.$ref; return `${name}`; } @@ -464,10 +463,7 @@ function UnionOptionsTable({ options, contextName }) { if (Array.isArray(opt.type)) return opt.type.map(capitalizeType).join(' or '); if (opt.$ref) { - const name = opt.$ref.startsWith('#/$defs/') - ? opt.$ref.replace('#/$defs/', '') - : opt.$ref; - return name; + return refToDefName(opt.$ref) || opt.$ref; } return 'N/A'; };