Make WordPress Core

Changeset 41731


Ignore:
Timestamp:
10/04/2017 02:51:03 PM (7 years ago)
Author:
kadamwhite
Message:

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

Location:
trunk/src/wp-includes/rest-api/endpoints
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r41727 r41731  
    11421142    public function get_item_schema() {
    11431143        $schema = array(
    1144             '$schema'              => 'http://json-schema.org/schema#',
     1144            '$schema'              => 'http://json-schema.org/draft-04/schema#',
    11451145            'title'                => 'comment',
    11461146            'type'                 => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php

    r41162 r41731  
    241241    public function get_item_schema() {
    242242        $schema = array(
    243             '$schema'              => 'http://json-schema.org/schema#',
     243            '$schema'              => 'http://json-schema.org/draft-04/schema#',
    244244            'title'                => 'status',
    245245            'type'                 => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php

    r41162 r41731  
    202202    public function get_item_schema() {
    203203        $schema = array(
    204             '$schema'              => 'http://json-schema.org/schema#',
     204            '$schema'              => 'http://json-schema.org/draft-04/schema#',
    205205            'title'                => 'type',
    206206            'type'                 => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r41727 r41731  
    16861686
    16871687        $schema = array(
    1688             '$schema'    => 'http://json-schema.org/schema#',
     1688            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    16891689            'title'      => $this->post_type,
    16901690            'type'       => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php

    r41588 r41731  
    453453    public function get_item_schema() {
    454454        $schema = array(
    455             '$schema'    => 'http://json-schema.org/schema#',
     455            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    456456            'title'      => "{$this->parent_post_type}-revision",
    457457            'type'       => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php

    r41162 r41731  
    275275
    276276        $schema = array(
    277             '$schema'    => 'http://json-schema.org/schema#',
     277            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    278278            'title'      => 'settings',
    279279            'type'       => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php

    r41162 r41731  
    229229    public function get_item_schema() {
    230230        $schema = array(
    231             '$schema'              => 'http://json-schema.org/schema#',
     231            '$schema'              => 'http://json-schema.org/draft-04/schema#',
    232232            'title'                => 'taxonomy',
    233233            'type'                 => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php

    r41588 r41731  
    805805    public function get_item_schema() {
    806806        $schema = array(
    807             '$schema'    => 'http://json-schema.org/schema#',
     807            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    808808            'title'      => 'post_tag' === $this->taxonomy ? 'tag' : $this->taxonomy,
    809809            'type'       => 'object',
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r41588 r41731  
    11301130    public function get_item_schema() {
    11311131        $schema = array(
    1132             '$schema'    => 'http://json-schema.org/schema#',
     1132            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    11331133            'title'      => 'user',
    11341134            'type'       => 'object',
Note: See TracChangeset for help on using the changeset viewer.