swisnl / json-api-client

A PHP package for mapping remote {json:api} resources to Eloquent like models and collections.
MIT License
205 stars 24 forks source link

Add extra verifications for links #59

Closed JaZo closed 5 years ago

JaZo commented 5 years ago

Description

Motivation and context

According to the spec, self and related links can not be null, only pagination links can be.

Spec for error: https://jsonapi.org/format/#error-objects Spec for relationship: https://jsonapi.org/format/#document-resource-object-relationships

How has this been tested?

Tested with new and updated unit tests.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

Checklist:

Go over all the following points, and put an x in all the boxes that apply.