All Projects → DockYard → Inquisitor_jsonapi

DockYard / Inquisitor_jsonapi

JSON API Matchers for Inquisitor

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Inquisitor jsonapi

Ja resource
A behaviour to reduce boilerplate code in your JSON-API compliant Phoenix controllers without sacrificing flexibility.
Stars: ✭ 111 (+753.85%)
Mutual labels:  json-api, phoenix
Django Rest Framework Json Api
JSON API support for Django REST Framework
Stars: ✭ 898 (+6807.69%)
Mutual labels:  json-api
Laravel Json Api
JSON API (jsonapi.org) package for Laravel applications.
Stars: ✭ 667 (+5030.77%)
Mutual labels:  json-api
Hexpm
API server and website for Hex
Stars: ✭ 798 (+6038.46%)
Mutual labels:  phoenix
Acme bank
An example ☂ project
Stars: ✭ 700 (+5284.62%)
Mutual labels:  phoenix
Drab
Remote controlled frontend framework for Phoenix.
Stars: ✭ 833 (+6307.69%)
Mutual labels:  phoenix
Torch
A rapid admin generator for Elixir & Phoenix
Stars: ✭ 640 (+4823.08%)
Mutual labels:  phoenix
Tns Restful Json Api
This is the code repository that goes along with the "TheNewStack" article for RESTful JSON API post
Stars: ✭ 846 (+6407.69%)
Mutual labels:  json-api
Karma werks
A project management tool created with Elixir, Phoenix and Dgraph
Stars: ✭ 17 (+30.77%)
Mutual labels:  phoenix
Graphiti
Stylish Graph APIs
Stars: ✭ 783 (+5923.08%)
Mutual labels:  json-api
Kakapo
🐤Dynamically Mock server behaviors and responses in Swift
Stars: ✭ 768 (+5807.69%)
Mutual labels:  json-api
Phx gen auth
An authentication system generator for Phoenix 1.5 applications.
Stars: ✭ 702 (+5300%)
Mutual labels:  phoenix
Forbes400
JSON Api Of The Forbes 400 Richest People List
Stars: ✭ 7 (-46.15%)
Mutual labels:  json-api
Faker
Faker is a pure Elixir library for generating fake data.
Stars: ✭ 673 (+5076.92%)
Mutual labels:  phoenix
Query
Query adds tools to aid the use of Ecto in web settings.
Stars: ✭ 23 (+76.92%)
Mutual labels:  phoenix
Jsonapi Serializer
A Node.js framework agnostic library for (de)serializing your data to JSON API
Stars: ✭ 651 (+4907.69%)
Mutual labels:  json-api
Elide
Elide is a Java library that lets you stand up a GraphQL/JSON-API web service with minimal effort.
Stars: ✭ 766 (+5792.31%)
Mutual labels:  json-api
Szt Bigdata
深圳地铁大数据客流分析系统🚇🚄🌟
Stars: ✭ 826 (+6253.85%)
Mutual labels:  phoenix
Phoenix
Mirror of Apache Phoenix
Stars: ✭ 867 (+6569.23%)
Mutual labels:  phoenix
Reproduce Ck Paper
Shared artifacts in the Collective Knowledge Format as a proof-of-concept to reproduce our recent Collective Mind- and Collective Knowledge-related papers
Stars: ✭ 24 (+84.62%)
Mutual labels:  json-api

Inquisitor JSONAPI Build Status

Easily build composable queries for Ecto for JSON API endpoints using Inquisitor

Inquisitor JSONAPI is built and maintained by DockYard, contact us for expert Elixir and Phoenix consulting.

This plugin for Inquisitor aims to implement all of the relevant Fetching Data section for the JSON API spec

Make sure you reference Inquisitor's Usage section first

Progress

Include

JSON API Include (Ecto preload) Plugin

Usage

Use Inquisitor.JsonApi.Include after Inquisitor

defmodule MyApp.PostController do
  use MyAp.Web, :controller
  use Inquisitor
  use Inquisitor.JsonApi.Include

  ...

This plugin follows the spec for sorting with JSON API. All requests should conform to that URL schema for this plugin to work.

[GET] http://example.com/posts?include=tags,author

Refer to the Docs for this module on how to enable preloading properly.

Sort

JSON API Sorting Plugin

Usage

Use Inquisitor.JsonApi.Sort after Inquisitor

defmodule MyApp.PostController do
  use MyAp.Web, :controller
  use Inquisitor
  use Inquisitor.JsonApi.Sort

  ...

This plugin follows the spec for sorting with JSON API. All requests should conform to that URL schema for this plugin to work.

[GET] http://example.com/posts?sort=-create,title

The plugin with correct apply ASC and DESC sort order to the built query.

Page

JSON API Pagination Plugin

Usage

Use Inquisitor.JsonApi.Page after Inquisitor

defmodule MyApp.PostController do
  use MyAp.Web, :controller
  use Inquisitor
  use Inquisitor.JsonApi.Page

  ...

This plugin follows the spec for pagination with JSON API. All requests should conform to that URL schema for this plugin to work.

[GET] http://example.com/posts?page[limit]=10&page[offset]=2 [GET] http://example.com/posts?page[size]=10&page[number]=2

Cursor pagination is not yet implemented.

You may need to calculate certain page data to generate pagination links. You can use page_data/3 that this module imports for you.

  query = build_query(User, conn, params)
  data = page_data(query, repo, params)

  links = build_links(data)
  meta = build_meta(data)
  users = Repo.all(query)

Filter

JSON API Filtering Plugin

Usage

Use Inquisitor.JsonApi.Filter after Inquisitor

defmodule MyApp.PostController do
  use MyAp.Web, :controller
  use Inquisitor
  use Inquisitor.JsonApi.Filter

  ...

This plugin follows the spec for pagination with JSON API. All requests should conform to that URL schema for this plugin to work.

[GET] http://example.com/posts?filter[name]=Brian&filter[age]=99

By default Filter is no-op. You must define a custom build_filter_query/4 handler:

def build_filter_query(query, "name", name, _conn) do
  Ecto.Query.where(query, [r], r.name == ^name)
end

Authors

We are very thankful for the many contributors

Versioning

This library follows Semantic Versioning

Want to help?

Please do! We are always looking to improve this library. Please see our Contribution Guidelines on how to properly submit issues and pull requests.

Legal

DockYard, Inc. © 2017

@dockyard

Licensed under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].