You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
Although you seem to be right about this behaviour, I wonder what the point is of having a relationship that doesn't use any kwargs. Normally the related URL would be /posts/1/comments, or /authors/1 , both of which use an argument. What is your use-case for a hard-coded URL?
It is a one to one relationship and there will never be more than one. For example, there is one 10 GigE interface and that interface has one SFP, which is in the API as /xgige/sfp. This is much cleaner than having /xgiges/1/sfps/1, which also doesn't make sense to clients of the api since there aren't multiple interfaces.
If you have a relationship with a related url of
/foo/bar
, you specify the relationship in the schema like this:This will never add the
related
URL to the output due to the following check in the code:marshmallow-jsonapi/marshmallow_jsonapi/fields.py
Line 159 in 540cf1b
Instead, this code should do the following:
This makes more sense because we've already checked that the
related_url
was specified:marshmallow-jsonapi/marshmallow_jsonapi/fields.py
Line 154 in 540cf1b
and it doesn't make sense to just ignore it.
The text was updated successfully, but these errors were encountered: