REST API Chat Summary: June 6, 2019

This post summarizes the weekly REST API chat meeting for June 6, 2019. (Slack transcript). Weekly REST API component office hours are held every Thursday at 18:00 UTC in the #core-restapi room in the Make WordPress Slack.

Supporting object & array types in register_meta()

Currently, register_meta() only supports the string, number, integer, and boolean types. #43392 proposes adding support for object and array types as well. This is particularly useful for Gutenberg blocks that save to post meta.

A preliminary patch has been added. There are a number of open questions. The main point of discussion was around how strict the REST API should be about ensuring that the current meta value is valid according to its registered schema. This is enforced in the Settings controller (which supports object and array types, but is not currently in the Meta Fields controllers.

It was decided to explore adding this validation to the Meta Fields controller. However, more feedback and comments would be appreciated. In particular from Gutenberg block authors who want to persist data to post meta.

Menus Route

@wpscholar and @spacedmonkey have been working on a menus REST API route. This is being tracked in #40878 and actively developed in the WP-API Github organization.

Scheduling a time to chat with the Gutenberg team working on Navigation would be highly valuable to explore how Gutenberg could make use of the route.

Bug Scrub

There are a number of tickets without a reply in the component. We’d like to schedule a scrub to go through this list next week. Previous secondary team meetings occurred on Tuesdays at 18:00 UTC. The next team meeting is on Thursday, June 13 at 18:00 UT where a final date and time will be decided.

#rest-api