[wp-trac] [WordPress Trac] #51940: The schema for the taxonomy property of a term in the REST API should not include all taxonomies

WordPress Trac noreply at wordpress.org
Fri Dec 4 17:28:34 UTC 2020


#51940: The schema for the taxonomy property of a term in the REST API should not
include all taxonomies
--------------------------+-----------------------------
 Reporter:  johnbillion   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  4.7
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 When performing an OPTIONS request to a term endpoint of the REST API, for
 example `/wp-json/wp/v2/tags` or `/wp-json/wp/v2/categories`, the
 `$.schema.properties.taxonomy.enum` property in the schema contains a list
 of names of all taxonomies on the site (and to boot, not just those that
 are exposed via the REST API).

 This is incorrect. The enum should contain only one value containing the
 name of the taxonomy associated with the route.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51940>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list