Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/manifest/json-ref/crjson-ref.mdx
Original file line number Diff line number Diff line change
@@ -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';

<SchemaReference schemaUrl="/schemas/crJSON-schema.json" />
1 change: 1 addition & 0 deletions docs/manifest/json-ref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).



Expand Down
5 changes: 0 additions & 5 deletions docs/manifest/writing/assertions-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<div style={{display: 'none'}}>
The CAI APIs can read all v2 actions and write **most** v2 actions.
We should document v2 actions that can it NOT write.
</div>

### 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.
Expand Down
19 changes: 18 additions & 1 deletion remote-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
{
Expand Down Expand Up @@ -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
}
},
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ const sidebars = {
id: 'manifest/json-ref/settings-schema',
label: 'Settings',
},
{
type: 'doc',
id: 'manifest/json-ref/crjson-schema',
label: 'CrJSON',
},
],
},
{
Expand Down
8 changes: 2 additions & 6 deletions src/components/SchemaReference.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<a href="#${slugify(name)}">${name}</a>`;
}

Expand Down Expand Up @@ -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';
};
Expand Down
Loading