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

Is there any way to include not related models into a model for JsonApiFramework 2.8.0? #88

Open
tylerton opened this issue Sep 27, 2022 · 1 comment

Comments

@tylerton
Copy link

tylerton commented Sep 27, 2022

Hello team,

When I was using JsonApiFramework 2.1.0, I was able to include not related models to a model without defining any relationship in JsonApiWriter or Mapping. I just simply pass an empty string as its relationship name.

For example, food and vehicle are not related to each other. When I want to include vehicles with food, I just call
.IncludeMany(food, String.Empty, vehicles)

However, when I update from 2.1.0 to 2.8.0, it complains about the relationship name. It requires a valid one. However, I don't want to define a fake relationship name because those models are not really related. I just want to get everything in one API call. I believe we cannot use it that way since the 2.2.0 update
image

Could you please tell me if we have any way to do that?

Thank you very much.

@scott-mcdonald
Copy link
Owner

@tylerton I am trying to understand your issue and if it is still an issue. You want to include unrelated resource(s) in the included section of a json:api document? Can you provide an example JSON document on what you are asking for? Also it seems this would violate the specification when it talks about full linkage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants