Byh/ingredient digital source type support#2078
Open
trufo-ai wants to merge 2 commits into
Open
Conversation
Add digital_source_type field to Ingredient, allowing callers to specify an IPTC digital source type URI on ingredients that lack their own C2PA manifest, per C2PA v2.4 §18.16.12.3. - Add digital_source_type field to both ingredient assertion and public Ingredient structs - Serialize/deserialize as "digitalSourceType" in CBOR and JSON - Enforce mutual exclusivity with activeManifest during serialization - Include field in V3 allowed-fields list - Propagate through merge, to_assertion, and from_assertion paths - Add getter and setter on Ingredient
Cover the new digitalSourceType field in existing and new tests: - Add setter/getter coverage to test_ingredient_api alongside other fields - Add digital_source_type: None to test_serialization struct literal - Add test_digital_source_type_in_ingredient: v3 CBOR round-trip with digitalSourceType set (no active_manifest), and mutual exclusivity check when both digitalSourceType and active_manifest are present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
Give a narrative description of what has been changed.
Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.