mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
REST API: Specify specific json-schema version.
Explicitly specifies that the REST API uses JSON Schema draft-04, as JSON Schema has deprecated versionless schema URIs and recommends the use of a specific draft version. Props @TimothyBlynJacobs Fixes #41734 git-svn-id: https://develop.svn.wordpress.org/trunk@41731 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1685,7 +1685,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
public function get_item_schema() {
|
||||
|
||||
$schema = array(
|
||||
'$schema' => 'http://json-schema.org/schema#',
|
||||
'$schema' => 'http://json-schema.org/draft-04/schema#',
|
||||
'title' => $this->post_type,
|
||||
'type' => 'object',
|
||||
// Base properties for every Post.
|
||||
|
||||
Reference in New Issue
Block a user