Skip to content

Omit included resources on empty incoming ?include= #1196

Closed
@bkoelman

Description

@bkoelman

DESCRIPTION

The JSON:API specification has been updated to require what we did for sparse fieldsets in #996 to also apply for includes.

STEPS TO REPRODUCE

  1. Create a custom resource definition that silently includes a relationship
  2. Execute GET request with query string ?include=

EXPECTED BEHAVIOR

The response body contains either an empty include array or omits it entirely.

ACTUAL BEHAVIOR

HTTP 400 Bad Request.

VERSIONS USED

  • JsonApiDotNetCore version: 5.0.3
  • ASP.NET Core version: 6.0
  • Entity Framework Core version: N/A
  • Database provider: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions