[wp-trac] [WordPress Trac] #50239: REST API Debug/Dev Mode

WordPress Trac noreply at wordpress.org
Sun May 24 19:39:55 UTC 2020


#50239: REST API Debug/Dev Mode
-------------------------------+-----------------------------
 Reporter:  TimothyBlynJacobs  |      Owner:  (none)
     Type:  feature request    |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  REST API           |    Version:  4.4
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50239>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list