Closed geoidesic closed 4 years ago
Any idea whether this is handled by crud-json-api
or neomerx
? I'm wondering if this issue is on the correct repo.
The type casting is done by crud-json-api
as it is enforced by the neomerx
interfaces. The reason is that the JSON:API spec explicitly requires id
to be string.
Given an entity
enquiry
which is related toperson
viaperson_id
column. When storing a newenquiry
the relatedperson_id
is stored to the database as an integer. In the JSONAPI return, anyattributes
that are integer values will be returned as Integer type, however relationships will return integer ids as String type.Is this necessary due to the JSONAPI spec?
To my mind it's a bug because you should not lose type information where it's possible to retain it.