Make WordPress Core

Opened 5 years ago

#50239 new feature request

REST API Debug/Dev Mode

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: REST API Keywords:
Focuses: Cc:

Description

I think we should consider adding some additional debug/dev helpers for the REST API when WP_DEBUG is active. When in this mode we'd provide additional validation that the developer is following the REST API paradigms correctly, validation that would be too intrusive or slow in production.

Some things that come to mind.

  1. Verify that a developer is not calling die() in a response handler instead of using a WP_REST_Response object. This would be on top of #36271. I still see this in the wild.
  2. Validating that the schemas themselves are valid.

Change History (0)

Note: See TracTickets for help on using tickets.