-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Problem Description
An issue has been identified in the processing of requests involving nested includes
. The API does not seem to handle requests with multiple levels of includes
correctly. Specifically, when requesting resources with nested relationships (e.g., posts.user
and posts.comments
), the expected related entities are not always properly included in the response.
Expected Behavior
When making a request with nested includes
, such as ?include=posts,posts.user,posts.comments
, the API should return the main resource along with all the specified related entities in the included
section of the response.
Actual Behavior
The API response does not consistently include all the specified nested relationships. This leads to incomplete data being returned for requests that require detailed relational information.
Steps to Reproduce
- Make a request to the endpoint (e.g.,
/users
) with the query parameter?include=posts,posts.user,posts.comments
. - Observe the returned JSON response, particularly the
included
section.
Proposed Test
A test has been written to validate the correct behavior of nested includes
in the API response. The test ensures that all specified relationships are properly included in the response data.