-
Notifications
You must be signed in to change notification settings - Fork 49
Update: Json schema version #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #142 +/- ##
============================================
- Coverage 80.39% 76.31% -4.08%
Complexity 178 178
============================================
Files 20 13 -7
Lines 1474 1140 -334
Branches 120 0 -120
============================================
- Hits 1185 870 -315
+ Misses 289 270 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
(Related discussion re JSON draft-4 #109 (review) - for the cross-link) |
|
It looks like The other aspect is that we could offer in the future to opt-in for the most recent JSON schema by explicitly defining the version. I don't think we even do it now, and set: '$schema' => 'http://json-schema.org/draft-04/schema#',That would be helpful to be explicit. |
|
Closed in favor of #144 and WordPress/wordpress-develop#10510. |
We are currently using draft-04 of json schema on the validator, but the schemas we are using required at least the 2020 version because of having examples and defaults.
Testing
Currently the ajv validation only happens for the output of client side abiltiies not the server ones so this issue is hidden but it will be exposed when hybrid abilities are implemented.
Paste the following code on the browser console:
It registers a core/get-environment-info-client client ability exactly the same as the server one.
Verify things work well.
Paste the same code on trunk and verify there is this error and the ability does not works: