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
When attempting to encode a resource that has a relationship to a single other resource (i.e. what is often referred to as a "toOne" resource) the Parser throws the following error:
Schema is not registered for a resource at path "toOneResource"
Note that the error only occurs when the relationship is not empty. If the relationship is empty, the data is generated correctly. (e.g. below)
data: {}
instead of
data: []
Is this a bug, or are "toMany" relationships not supported?
The text was updated successfully, but these errors were encountered:
It supports both types of relationships to single resource and collections. Encoder understands that array, Iterator or Traversable are toMany relationships and acts accordingly. You just provide your data in Schema and encoder does the rest. That's an example for both types of relationships and how encoding result looks like.
Apart from numerous encoding samples there is a wiki as well.
When attempting to encode a resource that has a relationship to a single other resource (i.e. what is often referred to as a "toOne" resource) the Parser throws the following error:
Schema is not registered for a resource at path "toOneResource"
Note that the error only occurs when the relationship is not empty. If the relationship is empty, the data is generated correctly. (e.g. below)
data: {}
instead of
data: []
Is this a bug, or are "toMany" relationships not supported?
The text was updated successfully, but these errors were encountered: