Parent issue: #3457
Currently, the API doesn't follow any standard schema. Ensure it follows the json-api schema
Any of the following libraries can be used:
http://jsonapi.org/implementations/#server-libraries-python
@niranjan94 Since we're using flask-restplus which is using swagger docs. I think it is compliant with the OpenApi specification (previously known as swagger specification). flask-restplus is also listed on http://swagger.io/open-source-integrations/ .
shubham-padia swagger spec is a spec for describing an API and its documentation. where as JSON-API spec is a specification for all the response objects, relationships, paths and is widely compatible with a lot of clients.
JSON-API spec and swagger spec are actually do different things meant for two different purposes. We'll still be using swagger for our docs.
How do I get started with this?
I read the docs at http://jsonapi.org/format/ and took an overview of Flask-REST-JSONAPI from the list of the libraries above.
@enigmaeth Since this is gonna be a major change to the current API, the first step would be to propose how you're planning to implement it, here ... So, that all can know what is happening and can suggest improvements
@shubham-padia @SaptakS @enigmaeth @poush @LuD1161 @magdalenesuo
Please research on this and give in your ideas here.
flask-rest-jsonapi seems like the best choice out of the given libraries and has better out of the box support for json-api. Also according to some testaments, it perfectly couples with emberjs.
@shubham-padia that looks like a great library ! 馃槃
These are the primary things that we require:
Looks like Flask-REST-JSONAPI has all of them. Let's keep this mind. We'll see what the rest of them come up.
@niranjan94 I'm having second thoughts about the library. I missed out Flask-restless as it wasn't listed in the implementations link, but it also supports jsonapi spec. Flask-restless has a detailed documentation and has been widely used. Can you have a look at it and provide some feedback from it.
https://github.com/jfinkels/flask-restless
https://flask-restless.readthedocs.org/
How well does it support relationship definitions as per json api
specifications?
I don't seem to be able to find anything about relationships in the docs. Also, is there sorting support out of the box?
I don't seem to be able to find anything about relationships in the docs
Yes. Seems so, lets leave it then.
@shubham-padia cool. Then please proceed with Flask-REST-JSONAPI :)