socialwifi / jsonapi-requests

Python client implementation for json api. http://jsonapi.org/
BSD 3-Clause "New" or "Revised" License
96 stars 28 forks source link

The ID implementation (and documentation example) does not follow the JSON:API spec #46

Open CaerphillyMediaLtd opened 4 years ago

CaerphillyMediaLtd commented 4 years ago

From the spec:

Every resource object MUST contain an id member and a type member. The values of the id and type members MUST be strings.

But the library allows any type to be used for the ID, and what's worse is that the ORM documentation on the README uses an integer for the value of id. I don't believe that jsonapi-requests should allow this at all, and should instead raise an exception when an invalid type is used.

If you are no longer interested in maintaining the project I will fork and fix this myself (as there's several other things I'd like to change). But if you are then you'd be better to fix this issue.

Behoston commented 4 years ago

ack, we decide on Monday

Behoston commented 4 years ago
  1. We are open to pull requests
  2. We will fix documentation (https://github.com/socialwifi/jsonapi-requests/pull/47)
  3. For now there is no type checks in jsopnapi-requests (see first point)