View Source API Reference jsonapi v1.7.1

Modules

A module for working with the JSON API specification in Elixir

Configuration struct containing JSON API information for a request

Provides content type negotiation by validating the content-type and accept headers.

Generate warnings in places where we want to deprecate functions or struct parameters

This plug flattens incoming params for ease of use when casting to changesets. As a result, you are able to pattern match specific attributes in your controller actions.

A helper Plug to enforce the JSON API specification

Defines a generic exception for when an invalid query is received and is unable to be parsed nor handled.

Enforces the JSONAPI format of {"data" => {"attributes" => ...}} for request bodies

Ensure that the URL id matches the id in the request body and is a string

Pagination strategy behaviour

Implements a fully JSONAPI V1 spec for parsing a complex query string via the query_params field from a Plug.Conn struct and returning Elixir datastructures. The purpose is to validate and encode incoming queries and fail quickly.

Simply add this plug to your endpoint or your router :api pipeline and it will ensure you return the correct response type.

Serialize a map of data into a properly formatted JSON API response object

Takes dasherized JSON:API params and converts them to underscored params. Add this to your API's pipeline to aid in dealing with incoming parameters such as query params or data.

Converts a Map representation of the JSON:API resource object format into a flat Map convenient for changeset casting.

Internal utility for building trees of resource relationships

String manipulation helpers.

A View is simply a module that defines certain callbacks to configure proper rendering of your JSONAPI documents.