Skip to content

Font Library: refactor REST API #55278

@matiasbenedetto

Description

@matiasbenedetto

What?

Font Library: refactor REST API endpoints.

Refactor REST endpoint URLs

(reference reference).
PR:

Transition the Font Family APIs to be SINGULAR

(accepting as parameters and returning as responses a single Font Family item) (reference reference )

PR:

Return a single Error (with multiple calls to add())

instead of a collection of errors. (reference reference )

Return API responses with rest_ensure_response instead of new WP_REST_Response()

(reference)

Ensure there is error handling of any decoded JSON string

( reference )

Add schema's to the requests

(reference)

Break the font library REST API controller in 2 controllers.

One for font families and one for font collections. (reference)

PR:

Error code strings need to be translated

([reference]).

Ensure the gutenberg domain used for translations is removed when porting to core.

(reference)

Why?

To standardize the endpoint routes and input/output data formats and schemas.

How?

This task is somewhat big, so multiple PRs for it are expected.


Props to all the folks that brought this issue in this PR: WordPress/wordpress-develop#5285

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions