{"id":19163613,"url":"https://github.com/dockyard/inquisitor_jsonapi","last_synced_at":"2025-10-18T08:47:18.149Z","repository":{"id":57506987,"uuid":"84600090","full_name":"DockYard/inquisitor_jsonapi","owner":"DockYard","description":"JSON API Matchers for Inquisitor","archived":false,"fork":false,"pushed_at":"2017-07-19T16:49:30.000Z","size":30,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-23T11:28:48.758Z","etag":null,"topics":["elixir","inquisitor","json-api","phoenix"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DockYard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T20:56:48.000Z","updated_at":"2022-12-09T17:46:58.000Z","dependencies_parsed_at":"2022-08-29T20:01:26.051Z","dependency_job_id":null,"html_url":"https://github.com/DockYard/inquisitor_jsonapi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DockYard/inquisitor_jsonapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DockYard%2Finquisitor_jsonapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DockYard%2Finquisitor_jsonapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DockYard%2Finquisitor_jsonapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DockYard%2Finquisitor_jsonapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DockYard","download_url":"https://codeload.github.com/DockYard/inquisitor_jsonapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DockYard%2Finquisitor_jsonapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272192669,"owners_count":24889452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","inquisitor","json-api","phoenix"],"created_at":"2024-11-09T09:16:05.544Z","updated_at":"2025-10-18T08:47:18.049Z","avatar_url":"https://github.com/DockYard.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inquisitor JSONAPI [![Build Status](https://secure.travis-ci.org/DockYard/inquisitor_jsonapi.svg?branch=master)](http://travis-ci.org/DockYard/inquisitor_jsonapi)\n\nEasily build composable queries for Ecto for JSON API endpoints using\n[Inquisitor](https://github.com/dockyard/inquisitor)\n\n**[Inquisitor JSONAPI is built and maintained by DockYard, contact us for expert Elixir and Phoenix consulting](https://dockyard.com/phoenix-consulting)**.\n\nThis plugin for [Inquisitor](https://github.com/dockyard/inquisitor)\naims to implement all of the relevant [Fetching\nData](http://jsonapi.org/format/#fetching) section for the [JSON API spec](http://jsonapi.org/)\n\n[Make sure you reference Inquisitor's Usage section\nfirst](https://github.com/DockYard/inquisitor#usage)\n\n#### Progress\n\n* - [x] [Include](http://jsonapi.org/format/#fetching-includes)\n* - [ ] [Field](http://jsonapi.org/format/#fetching-sparse-fieldsets)\n* - [x] [Sort](http://jsonapi.org/format/#fetching-sorting)\n* [Page](http://jsonapi.org/format/#fetching-pagination)\n  * - [x] `order,limit`\n  * - [x] `number,size`\n  * - [ ] `cursor`\n* - [x] [Filter](http://jsonapi.org/format/#fetching-filtering)\n\n## Include\n\nJSON API Include (Ecto preload) Plugin\n\n### Usage\n\nUse `Inquisitor.JsonApi.Include` *after* `Inquisitor`\n\n```elixir\ndefmodule MyApp.PostController do\n  use MyAp.Web, :controller\n  use Inquisitor\n  use Inquisitor.JsonApi.Include\n\n  ...\n```\n\n[This plugin follows the spec for sorting with JSON\nAPI](http://jsonapi.org/format/#fetching-includes). All requests should\nconform to that URL schema for this plugin to work.\n\n`[GET] http://example.com/posts?include=tags,author`\n\nRefer to the Docs for this module on how to enable preloading properly.\n\n## Sort\n\nJSON API Sorting Plugin\n\n### Usage\n\nUse `Inquisitor.JsonApi.Sort` *after* `Inquisitor`\n\n```elixir\ndefmodule MyApp.PostController do\n  use MyAp.Web, :controller\n  use Inquisitor\n  use Inquisitor.JsonApi.Sort\n\n  ...\n```\n\n[This plugin follows the spec for sorting with JSON\nAPI](http://jsonapi.org/format/#fetching-sorting). All requests should\nconform to that URL schema for this plugin to work.\n\n`[GET] http://example.com/posts?sort=-create,title`\n\nThe plugin with correct apply `ASC` and `DESC` sort order to the built\nquery.\n\n## Page\n\nJSON API Pagination Plugin\n\n### Usage\n\nUse `Inquisitor.JsonApi.Page` *after* `Inquisitor`\n\n```elixir\ndefmodule MyApp.PostController do\n  use MyAp.Web, :controller\n  use Inquisitor\n  use Inquisitor.JsonApi.Page\n\n  ...\n```\n\n[This plugin follows the spec for pagination with JSON\nAPI](http://jsonapi.org/format/#fetching-pagination). All requests should\nconform to that URL schema for this plugin to work.\n\n`[GET] http://example.com/posts?page[limit]=10\u0026page[offset]=2`\n`[GET] http://example.com/posts?page[size]=10\u0026page[number]=2`\n\nCursor pagination is not yet implemented.\n\nYou may need to calculate certain page data to generate pagination\nlinks. You can use `page_data/3` that this module `import`s for you.\n\n```elixir\n  query = build_query(User, conn, params)\n  data = page_data(query, repo, params)\n\n  links = build_links(data)\n  meta = build_meta(data)\n  users = Repo.all(query)\n```\n\n## Filter\n\nJSON API Filtering Plugin\n\n### Usage\n\nUse `Inquisitor.JsonApi.Filter` *after* `Inquisitor`\n\n```elixir\ndefmodule MyApp.PostController do\n  use MyAp.Web, :controller\n  use Inquisitor\n  use Inquisitor.JsonApi.Filter\n\n  ...\n```\n\n[This plugin follows the spec for pagination with JSON\nAPI](http://jsonapi.org/format/#fetching-filtering). All requests should\nconform to that URL schema for this plugin to work.\n\n`[GET] http://example.com/posts?filter[name]=Brian\u0026filter[age]=99`\n\nBy default `Filter` is no-op. You must define a custom\n`build_filter_query/4` handler:\n\n```elixir\ndef build_filter_query(query, \"name\", name, _conn) do\n  Ecto.Query.where(query, [r], r.name == ^name)\nend\n```\n\n## Authors\n\n* [Brian Cardarella](http://twitter.com/bcardarella)\n\n[We are very thankful for the many contributors](https://github.com/dockyard/inquisitor_jsonapi/graphs/contributors)\n\n## Versioning\n\nThis library follows [Semantic Versioning](http://semver.org)\n\n## Want to help?\n\nPlease do! We are always looking to improve this library. Please see our\n[Contribution Guidelines](https://github.com/dockyard/inquisitor_jsonapi/blob/master/CONTRIBUTING.md)\non how to properly submit issues and pull requests.\n\n## Legal\n\n[DockYard](http://dockyard.com/), Inc. \u0026copy; 2017\n\n[@dockyard](http://twitter.com/dockyard)\n\n[Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockyard%2Finquisitor_jsonapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockyard%2Finquisitor_jsonapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockyard%2Finquisitor_jsonapi/lists"}