Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit included resources on empty incoming ?include= #1196

Closed
bkoelman opened this issue Sep 30, 2022 · 0 comments · Fixed by #1197
Closed

Omit included resources on empty incoming ?include= #1196

bkoelman opened this issue Sep 30, 2022 · 0 comments · Fixed by #1197
Labels

Comments

@bkoelman
Copy link
Member

bkoelman commented Sep 30, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant