Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Comment schema needs embed context #1287

@rachelbaker

Description

@rachelbaker

The comment schema doesn't include any response fields in the embed context right now, which means when embedding the related data for a single post the response data is empty.

Example:

"_embedded": {
    ...
    "replies": [
        [ 
        { 
            "_links": {
                "self": [
                    {
                    "href": "http://vagrant.local/wp-json/wp/v2/comments/3"
                    }
                ],
                "collection": [
                    {
                    "href": "http://vagrant.local/wp-json/wp/v2/comments"
                    }
                ],
                "author": [
                    {
                    "embeddable": true,
                    "href": "http://vagrant.local/wp-json/wp/v2/users/1"
                    }
                ],
                "post": [
                    {
                    "embeddable": true,
                    "href": "http://vagrant.local/wp-json/wp/v2/posts/5"
                    }
                ]
            }
        }
    ] ],
    ...
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions