Alembic v2.1.0 API Reference
Modules
JSON API refers to the top-level JSON structure as a document
Error objects provide additional information about problems encountered
while performing an operation. Error objects MUST be returned as an array keyed by errors
in the top level of a
JSON API document
Fetching Data in the JSON API spec
JSON objects that have constrained members in the JSON API format are represented as
struct
s. In order to convert plain, decoded JSON in map
s and list
s, from_json/2
can be implemented by a
module to convert to its struct
A link object represents a URL and metadata about it
Where specified, a
links
member can be used to represent links. The value of eachlinks
member MUST be an object (a “links object”).
Where specified, a
meta
member can be used to include non-standard meta-information. The value of eachmeta
member MUST be an object (a “meta object”).
Pagination by fixed-size pages
A page using paged pagination where the size of pages is fixed
Members of the relationships object (“relationships”) represent references from the resource object in which it’s defined to other resource objects.
Relationships may be to-one or to-many.
— JSON API - Document Structure - Resource Objects - Relationships
A relationship path is a dot-separated (U+002E FULL-STOP, “.”) list of relationship names.
The value of the
relationships
key MUST be an object (a “relationships object”). Members of the relationships object (“relationships”) represent references from the resource object in which it’s defined to other resource objects.Relationships may be to-one or to-many.
— JSON API - Document Structure - Resource Objects - Relationships
The individual JSON object of elements of the list of the data
member of the
JSON API document are
resources as are the members of the included
member
Resource linkage in a compound document allows a client to link together all of the included resource objects without having to
GET
any URLs via links.Resource linkage MUST be represented as one of the following
The source
of an error
The Alembic.ToEctoSchema
behaviour converts a struct in the Alembic
namespace to
an Ecto.Schema.t
struct
The Alembic.ToParams
behaviour converts a data structure in the Alembic
namespace to
the params format used by Ecto.Changeset.cast/4