[wp-trac] [WordPress Trac] #53079: Rest API Json Schema is invalid
WordPress Trac
noreply at wordpress.org
Fri Apr 23 00:10:48 UTC 2021
#53079: Rest API Json Schema is invalid
-------------------------------------+-------------------------------------
Reporter: bukowa | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 5.7.1
Severity: critical | Keywords: needs-patch dev-
Focuses: docs, rest-api, coding- | feedback needs-design needs-design-
standards | feedback needs-testing needs-docs
-------------------------------------+-------------------------------------
Hello i tried to validate JSON SCHEMA using online validators from https
://json-schema.org/implementations.html#validators
Looks like the schema does not pass any validator. I would like to
generate some client code in different languages but all of them says
schema is invalid.
Overall i couldn't find a way to get the schema directly from wordpress
documentation. After some googling i found out i have to call `curl -X
OPTIONS https://mydomain.com/wp-json/wp/v2/posts` and then there's a
nested 'schema' property.
Also the docs at https://developer.wordpress.org/rest-api/reference/posts/
are kinda missleading because for the 'content' it says 'object' - so that
can be actually anything?
I would really like to work with wordpress and the REST API it provides
but overall i find it pretty difficult.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53079>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list