Gets your posts and comments with one API call by putting comments inside the /posts endpoint. This way there is no need to do separate API call to /wp-json/posts/ID/comments
.
comments-posts-wp-api
directory to /wp-content/plugins/
Add withcomments
in the URI.
Example: /wp-json/posts?withcomments
or /wp-json/posts?filter[posts_per_page]=5&withcomments