Opened 4 months ago
Last modified 7 weeks ago
#61911 new defect (bug)
Incorrect schema for global styles REST API endpoint
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | rest-api | Cc: |
Description
The schema for the wp/v2/global-styles/{id}
REST API endpoint declares the id
property as a string, but it is in fact an integer containing the post ID for the global style.
Change History (9)
This ticket was mentioned in PR #7234 on WordPress/wordpress-develop by @narenin.
4 months ago
#1
- Keywords has-patch added; needs-patch removed
@johnbillion commented on PR #7234:
4 months ago
#2
@narenin Thanks for the PR. int
isn't a valid type in JSON schema.
3 months ago
#3
@johnbillion Thanks for the review, I have updated the same to integer
, please check.
@TimothyBlynJacobs commented on PR #7234:
3 months ago
#4
This is slightly weird because the value does have a sanitize_callback
registered for it which calls urldecode
, which seems like an indication that the value is supposed to be a string. Are we sure this is supposed to be an integer
? If so, we should probably also be removing the sanitize_callback
.
narendraie commented on PR #7234:
3 months ago
#5
Thanks @johnbillion @TimothyBJacobs for your feedback's, I have implemented the same, could you please take a look.
3 months ago
#6
Thanks @johnbillion @TimothyBJacobs for your feedback's, I have implemented the same, could you please take a look.
narendraie commented on PR #7234:
3 months ago
#7
Thanks @johnbillion @TimothyBJacobs for your feedback's, I have implemented the same, could you please take a look.
Trac ticket: https://core.trac.wordpress.org/ticket/61911