Closed egmacke closed 2 years ago
Hey @egmacke, we've noticed you seem to work quite a bit with ts:japi. Are you interested in helping maintain this project? In favor of gRPC, We no longer use this internally sadly.
@jun-sheaf we're in the process of adopting JSON API as the standard across the platform I'm currently working on. This library seemed to give the best implementation when we were initially looking and still seems one of the best options out there, there are just a few places where we've struggled to get it to work how we've needed (while still conforming to the spec)
That said - yes I would certainly be open to helping maintain this project! Let me know what I can do (and I'll start putting together a solution for this issue!)
Describe the bug*
Given a model with an optional field, if that field is defined in the serializer as a relationship, and in a specific instance of the model, does not exist, then the serialization fails.
To Reproduce*
Produces this error:
Relationships must contain at least a link, data, or meta. See https://jsonapi.org/format/#document-resource-object-relationships for more information.
Expected behavior*
When no value is provided in the un-serialized object and that field is optional, the relationship should not be created, and should not throw an error.