miLibris / flask-rest-jsonapi

Flask extension to build REST APIs around JSONAPI 1.0 specification.
http://flask-rest-jsonapi.readthedocs.io
MIT License
598 stars 153 forks source link

Allow relationships to be compared to scalars #182

Open multimeric opened 4 years ago

multimeric commented 4 years ago

This is based on the recommendations part of the spec, which lets you do things like: GET /comments?filter[post]=1, even though filter[post] isn't actually an integer.

In addition, I've allowed queries like filter[id]=1,2,3, which internally is converted into a has operator.

I added tests for these changes.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.03%) to 90.801% when pulling e3e1fed23d271486dcc992692e465eee22f8db23 on TMiguelT:relationship-filter into b44bc08b11213d49fadae873650d3555889052ec on miLibris:master.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.07%) to 90.845% when pulling 8ec2aad21653c7b11e2e0c05f02647647f0473b7 on TMiguelT:relationship-filter into b44bc08b11213d49fadae873650d3555889052ec on miLibris:master.