Opened 5 years ago
#50239 new feature request
REST API Debug/Dev Mode
Reported by: |
|
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.
- Verify that a developer is not calling
die()
in a response handler instead of using aWP_REST_Response
object. This would be on top of #36271. I still see this in the wild. - Validating that the schemas themselves are valid.
Note: See
TracTickets for help on using
tickets.