Font Library: refactor REST API #55278
Labels
[Feature] Font Library
[Feature] Typography
Font and typography-related issues and PRs
[Status] In Progress
Tracking issues with work in progress
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Enhancement
A suggestion for improvement.
[Type] Tracking Issue
Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
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 ofnew 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
The text was updated successfully, but these errors were encountered: