Skip to content

[1] Feat: Add context, settings, and JSON APIs#47

Open
redaranj wants to merge 1 commit intocontentauth:mainfrom
redaranj:feature/context-settings-api
Open

[1] Feat: Add context, settings, and JSON APIs#47
redaranj wants to merge 1 commit intocontentauth:mainfrom
redaranj:feature/context-settings-api

Conversation

@redaranj
Copy link
Member

@redaranj redaranj commented Mar 5, 2026

Changes in this pull request

  • Updates native library to v0.75.19.
  • Adds new context and settings APIs from the underlying library
  • Adds C2PAJson for centralized JSON serialization
  • Adds SettingsValidator for validating C2PA settings

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • All applicable changes have been documented
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment

Introduce C2PAContext and C2PASettings for shared configuration across
readers and builders. Add C2PAJson for centralized JSON serialization.
Add SettingsValidator for validating C2PA settings. Rewrite Builder to
use context-based creation flow. Add Reader context support with
withStream and withFragment. Update native library to v0.75.19.
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 22.43437% with 325 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.15%. Comparing base (16dcd0b) to head (f43629c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...org/contentauth/c2pa/manifest/SettingsValidator.kt 0.00% 278 Missing ⚠️
...ary/src/main/kotlin/org/contentauth/c2pa/Stream.kt 55.55% 8 Missing and 4 partials ⚠️
...ary/src/main/kotlin/org/contentauth/c2pa/Reader.kt 37.50% 8 Missing and 2 partials ⚠️
...ry/src/main/kotlin/org/contentauth/c2pa/Builder.kt 80.85% 5 Missing and 4 partials ⚠️
.../org/contentauth/c2pa/manifest/ValidationResult.kt 0.00% 7 Missing ⚠️
...c/main/kotlin/org/contentauth/c2pa/C2PASettings.kt 66.66% 2 Missing and 4 partials ⚠️
...rc/main/kotlin/org/contentauth/c2pa/C2PAContext.kt 78.57% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #47      +/-   ##
============================================
- Coverage     59.82%   53.15%   -6.67%     
  Complexity        9        9              
============================================
  Files            52       57       +5     
  Lines          1558     1936     +378     
  Branches        162      267     +105     
============================================
+ Hits            932     1029      +97     
- Misses          526      790     +264     
- Partials        100      117      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant