Skip to content

Validate content JSON object fields#222

Closed
leehack wants to merge 1 commit into
spec/sampling-json-object-validationfrom
spec/content-meta-json-object-validation
Closed

Validate content JSON object fields#222
leehack wants to merge 1 commit into
spec/sampling-json-object-validationfrom
spec/content-meta-json-object-validation

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Jun 1, 2026

Summary

  • validate common content/resource _meta fields with shared JSON-object checks
  • validate ResourceContents passthrough fields and resource_link.annotations during parsing and serialization
  • add 2025-11-25 and 2026-07-28 RC regression coverage for non-JSON content object values

Validation

  • dart format .
  • dart analyze
  • dart test test/types_test.dart test/mcp_2025_11_25_test.dart test/mcp_2026_07_28_test.dart
  • dart test
  • git diff --check
  • (cd packages/mcp_dart_cli && dart run mcp_dart_cli:mcp_dart conformance --suite all --json)

Spec status: this is part of the RC spec work and is intentionally draft/stacked until the official spec release.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 95.12195% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.07%. Comparing base (802ade1) to head (43b3f9f).

Files with missing lines Patch % Lines
lib/src/types/content.dart 95.12% 2 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           spec/sampling-json-object-validation     #222      +/-   ##
========================================================================
+ Coverage                                 88.04%   88.07%   +0.02%     
========================================================================
  Files                                        47       47              
  Lines                                      9204     9217      +13     
========================================================================
+ Hits                                       8104     8118      +14     
+ Misses                                     1100     1099       -1     
Flag Coverage Δ
unittests 88.07% <95.12%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leehack
Copy link
Copy Markdown
Owner Author

leehack commented Jun 1, 2026

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #270 (JSON-RPC metadata hardening); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 2026
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