[wp-trac] [WordPress Trac] #53621: The `wp/v2/block-directory/search` schema is incorrect

WordPress Trac noreply at wordpress.org
Wed Jul 7 16:01:41 UTC 2021


#53621: The `wp/v2/block-directory/search` schema is incorrect
--------------------------+-------------------------
 Reporter:  johnbillion   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.9
Component:  REST API      |    Version:  5.5
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:  rest-api      |
--------------------------+-------------------------
 Some problems with the declared schema for the `wp/v2/block-
 directory/search` endpoint:

 * `rating` is a float, not an integer
 * `active_installs` is an integer, not a string
 * `author_block_rating` is a float, not an integer

 This can be seen by performing a search for a common term such as "block"
 and looking through the various results.

 This can also be seen in the code: https://github.com/WordPress/wordpress-
 develop/blob/73e24c997c1182ac48856c1546cf4719b51ae27d/src/wp-includes
 /rest-api/endpoints/class-wp-rest-block-directory-controller.php#L127-L130

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


More information about the wp-trac mailing list