You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.
It's challenging, beacuse the WordPress REST API is so extensible. The node-wpapi generates dynamic schemas, per site, which is cool. I am not sure how to provide a "standard" defintion of something that can be different on any site.
The text was updated successfully, but these errors were encountered:
I changed this library a few days ago so its interfaces are all generated from wp-json-schemas, so if the default schemas in an OPTIONS request to the REST API are correct (ie. with additionalProperties set to true) then we should be okay. Or we can tweak the TS interfaces accordingly so they fit the default schema for a vanilla site.
johnbillion
added a commit
to johnbillion/wp-json-schemas
that referenced
this issue
Nov 26, 2020
I've added definitions for posts and users in b958d04. Like the rest of this library, these are generated from wp-json-schemas and are based only on the default endpoints on a vanilla site.
For now, most property definitions are part of the main User or Post object, but I think splitting them out like you did in your definitions has value.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@johnbillion I wanted to continue this discussion: WP-API/node-wpapi#149 (comment) I'm sorry for the delayed response. Life happened.
I found the types I had started:
It's challenging, beacuse the WordPress REST API is so extensible. The node-wpapi generates dynamic schemas, per site, which is cool. I am not sure how to provide a "standard" defintion of something that can be different on any site.
The text was updated successfully, but these errors were encountered: