Open sevenseacat opened 1 month ago
Yeah, realistically it's not something we can change now unless we put it behind some kind of strict
flag. I wouldn't be opposed to that. In general we always know the type of something at all times, so it would only be for spec compliance not for anything that we need.
Describe the bug
From: https://jsonapi.org/format/#crud-creating
Something small I noticed - we don't require that the
type
member is present in the request.We do validate it if it is present (empty/invalid values return an error) but if it's omitted, records can still be created.
To Reproduce
A
json_api
config and :Expected behavior
For full compliance with the spec, an error should also be returned if the
type
is not provided as part of thedata
hash. This would probably be a breaking change even though it's to add compliance 🤔Runtime