Skip to content

Best approach to determine which entities are present in a REST API response #2

@luisherranz

Description

@luisherranz

Hey guys, I was taking a look at the code and I saw that the approach you use is different than what the Pantheon people is doing:

It looks like they are using the rest_prepare_xxx filters to add that entity to a global array. That works well with _embed=true because the rest_prepare_xxx filters of the embedded entities are also called.

My question is: why did you choose to extract the entities from the fields present in the response? Is there a benefit from doing so, or did you find that the Pantheon's approach has some edge cases that are not covered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions