REST API Chat Summary: June 6, 2019

This post summarizes the weekly REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/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 SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

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 GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ blocks that save to post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress..

A preliminary patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. 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 blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. 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