Skip to content

Fix ContentEncoding and ContentMediaType to Draft-06#23

Closed
Copilot wants to merge 2 commits intofeat/draft-06from
copilot/sub-pr-22
Closed

Fix ContentEncoding and ContentMediaType to Draft-06#23
Copilot wants to merge 2 commits intofeat/draft-06from
copilot/sub-pr-22

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

contentEncoding and contentMediaType were incorrectly marked as Draft-07 features. These annotations were introduced in JSON Schema Draft-06.

Changes:

  • Moved ContentMediaType and ContentEncoding enum cases to new "Draft 06 features" section in SchemaFeature.php
  • Updated getMinimumVersion() to return SchemaVersion::Draft_06 for both features
  • Fixed test expectations in VersionSupportTest.php to assert Draft-06 support

Impact:
Schemas using these features can now correctly target Draft-06 instead of being forced to Draft-07+.

// Now works correctly with Draft-06
$schema = Schema::string('content', SchemaVersion::Draft_06)
    ->contentMediaType('application/json')
    ->contentEncoding('base64');

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: tymondesigns <1801923+tymondesigns@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 5, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/opis/string/zipball/3e4d2aaff518ac518530b89bb26ed40f4503635e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/opis/uri/zipball/0f3ca49ab1a5e4a6681c286e0b2cc081b93a7d5a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/pestphp/pest-plugin/zipball/9d4b93d7f73d3f9c3189bb22c220fef271cdf568
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)
  • https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/q4GsUV /usr/bin/composer install (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update Draft-06 support with $id and content annotations Fix ContentEncoding and ContentMediaType to Draft-06 Feb 5, 2026
Copilot AI requested a review from tymondesigns February 5, 2026 23:37
Copilot stopped work on behalf of tymondesigns due to an error February 5, 2026 23:37
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.

2 participants