Skip to content

Issue with Processing Nested includes in Requests #56

@gnc-git

Description

@gnc-git

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

  1. Make a request to the endpoint (e.g., /users) with the query parameter ?include=posts,posts.user,posts.comments.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions