DO NOT MERGE: Add reference doc for crJSON#397
Conversation
✅ Deploy Preview for cai-open-source ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🚀 Deployed on https://deploy-preview-397--cai-open-source.netlify.app |
lrosenthol
left a comment
There was a problem hiding this comment.
You CANNOT copy the crJSON schema from the C2PA site. Please reference it, not copy it!
As discussed separately, this NOT a copy from the C2PA site, but is an ephemeral copy from https://github.com/contentauth/c2pa-rs/blob/main/sdk/tests/fixtures/schemas/crJSON-schema.json updated via workflow. It sounds like this file should not exist, but then we need a canonical version that the SDK uses/supports, since that might not always be the same as what's in the C2PA spec. |
HOW THIS WILL BE DOCUMENTED IS UNDER DISCUSSION. DO NOT MERGE.
Add CrJSON schema reference documentation
Adds a reference doc for the CrJSON schema (
crJSON-schema.json) using the existingSchemaReferencecomponent, following the same pattern as theBuilder/Reader/ManifestDefinition/Settingsreferences.Changes:
SchemaReference.jsto correctly resolve$refsusing the older definitions keyword (#/definitions/...), not just#/$defs/... Needed because CrJSON's schema predates the schemars-generated schemas and wasn't written with$defs.docs/manifest/json-ref/crjson-ref.mdxand wire it into the sidebar and SDK object reference index.crJSON-schema.jsontostatic/schemas/and register it inremote-docs.jsonso it's fetched automatically from contentauth/c2pa-rs@main on every install/build (same mechanism already used forsb-alg-list.json), keeping it in sync without a dedicated GitHub Actions workflow.Note: Unlike the schemars-derived schemas (synced only on tagged c2pa-rs releases via
update-schemas.yml), this schema tracks c2pa-rs@main continuously since it's a hand-authored fixture with no release binding.