Relax.Responders behaviour

Convienience methods for generating JSONAPI.org spec Plug.Conn responses.

Summary

created(conn, model)
invalid(conn, errors)
not_found(conn)
okay(conn, model)
okay(conn, model, meta)
send_error(conn, status, title)
send_json(conn, status, model, module)
send_json(conn, status, model, module, meta)

Functions

not_found(conn)
send_error(conn, status, title)
send_json(conn, status, model, module)
send_json(conn, status, model, module, meta)

Macros

created(conn, model)
invalid(conn, errors)
okay(conn, model)
okay(conn, model, meta)

Callbacks

serializer/0

Specs:

  • serializer :: module

Defines the module using JaSerializer that will be used to format successfull responses.