When resource have an empty to-one relationship, the package unable to parse the document.
Detailed description
I believe this is a bug. I tried to fetch resource which had empty to-one relationship defined. But the package unable to parse the document because it has null object given when it expect a class which implement ItemInterface. For the record, i'm using custom model with TypeMapper.
Argument 1 passed to Swis\JsonApi\Client\Parsers\DocumentParser::getItemKey() must implement interface Swis\JsonApi\Client\Interfaces\ItemInterface, null given, called in C:\Users\afrastgeek\Projects\Playground\blog-composer\vendor\swisnl\json-api-client\src\Parsers\DocumentParser.php on line 213
When resource have an empty to-one relationship, the package unable to parse the document.
Detailed description
I believe this is a bug. I tried to fetch resource which had empty to-one relationship defined. But the package unable to parse the document because it has null object given when it expect a class which implement
ItemInterface
. For the record, i'm using custom model with TypeMapper.However, empty relationship are recognized in the specification.
Sample resource i tried to fetch:
Environment