koemeet / JsonApiBundle

Integration of JSON API with Symfony using JMS Serializer
55 stars 26 forks source link

List of JSON API specification implemented and pending issues [META] #35

Open RuslanZavacky opened 7 years ago

RuslanZavacky commented 7 years ago

This is a meta issue to gather full Specification of JSON API and to check what is supported/implemented by this library. (Will add more things, any contribution is welcome)

Each checkmark can be converted into a test case as a result.

Server Responsibilities

Document structure

Resource Objects

Identification

Fields

Relationships

Related Resource Links

Resource Linkage

Resource Links

Resource Identifier Objects

Compound Documents

Meta Information

Links

JSON API Object

Member Names

Allowed Characters

Fetching Data

Responses

200 OK

404 Not Found

Fetching Relationships

Responses

200 OK

404 Not Found

Inclusion of Related Resources

Sparse Fieldsets

Sorting

Pagination

Filtering

Creating, Updating and Deleting Resources

Creating Resources

Client-Generated IDs

Responses

(will add more a bit later....)

dbalabka commented 6 years ago

@RuslanZavacky I realized that there no strict description of filter rules in JSONAPI spec. It is up to a developer how to implement filtering operators. I see that it might be a big effort to implement this functionality properly to fit multiple use cases.

Here are some options which I have found:

  1. http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html
  2. https://github.com/scoutforpets/bookshelf-jsonapi-params#api
  3. Filter param might contain an only string of some query format. 3.1. There is a RSQL/FIQL language which fits to be used in URL: https://github.com/jirutka/rsql-parser 3.2. Or it might be Lucene query laguage. BTW Zend has a library to parse and build Lucene queries.https://framework.zend.com/manual/2.3/en/modules/zendsearch.lucene.queries.html We can convert lucene query into DQL, SQL or directly use in Elastica.

Here is a discussion on this topic: https://discuss.jsonapi.org/t/share-propose-a-filtering-strategy/257