An example {JSON:API} for Game of Thrones ⚔️ based on Rails and fast_jsonapi
by Netflix
Check out the project and run
$ rails db:setup # create database and seed it
$ rails server # launch your API
Query your api on localhost:3000
, for instance http://localhost:3000/houses
☕️
This demo is based on 2 models only:
- Houses (e.g. House Stark 🐺)
- Characters (e.g. Jon Snow ❄️)
There is a 1..n relationship between House and Characters.
This project was made for a Tech Talk 🍺 to demonstrate the power of JSON:API. To follow along using a progressive path, use the branches:
1-data-relationships
: API answering basic object w/ attributes & relationships2-includes
: adds Compound documents (included
)3-paginaton
: adds pagination,links
and `meta``4-sparse-fieldsets
: adds Sparse Fieldsets