JSON API and schemas in Badgeyay

Words
233
Reading
2 min
Listen
Play
8y

Repository

https://github.com/fossasia/badgeyay
ssa.png

New Features

  • What feature(s) did you add?
    Added JSON-API convention to the project and created several schemas.
    JSON-API is a convention followed by developers while sending out their REST-API data. It signifies how and what must be given as an output data from an endpoint through your application. I also worked on simplifying the User Interface a bit. I also created a route for uploading default images in the flask backend.
  • What is JSON API?
    JSON API is a format that works with HTTP. It delineates how clients should request or edit data from a server, and how the server should respond to said requests. A main goal of the specification (now at a stable v1.0) is to optimize HTTP requests; both in terms of the number of requests and the size of data packages exchanged between clients and servers.
  • How did you implement it/them?
    I used marshmallow_jsonapi to implement the JSON API standards in the project. It is a Python package that one can easily install in their system using pip. After installing I created Schemas. Schemas are nothing but layers of abstraction over the data model that needs to be provided as an output from a particular endpoint. Json API standard is also followed since we are using EmberJS in the frontend.

Contributions

My Pull Request that are linked with this contribution are :
#863,#870,#878,#891,#903

JSON API and schemas in Badgeyay | Ecency