Open nidhinek opened 2 weeks ago
On the JSON:API specification, it says:
Fields for a resource object MUST share a common namespace with each other and with type and id. In other words, a resource can not have an attribute and relationship with the same name, nor can it have an attribute or relationship named type or id.
So you shouldn't have the same name in attributes
and in relationships
.
With my current code, you could fix your problem by adding the annotations @JsonApiAttribute
or @JsonApiRelationship
to your property media, like this:
@JsonApiType("menus")
data class Menu(
// ......
@JsonApiAttribute("media") val media: /* Your type */,
)
In Api response if media object included as both attribute and relationship , the parsing failing with unknown error JsonApiType
sample.txt It works if I remove media from include