Opened 10 years ago
Last modified 15 months ago
#38813 assigned enhancement
REST API: Test schema registration for required fields.
| Reported by: | rmccue | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | REST API | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch has-unit-tests |
| Cc: | Focuses: |
Description
Follow-up from #38792.
For all endpoints included in WordPress core, we want to make sure arguments and parameters are consistently registered and expose a nice, stable API to the world. While we can check this manually, building it into the unit tests is even better.
@jnylen0 wrote an initial version in Node-based JS, so we can port this to PHP and use the built-in schema rather than sending a HTTP request.
Change History (8)
This ticket was mentioned in Slack in #core-restapi by kadamwhite. View the logs.
10 years ago
This ticket was mentioned in Slack in #core by sergey. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-restapi by gaupoit. View the logs.
7 years ago
This ticket was mentioned in PR #8923 on WordPress/wordpress-develop by @hugod.
15 months ago
#6
- Keywords has-patch has-unit-tests added; needs-unit-tests removed
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add PHPUnit tests for REST Schema registration.
Ensures full schema is rendered in REST response as well as accepted arguments.
Cover most of allowed schema keywords and types.