Simple implementation of JSON-RPC server, written in elixir and working with phoenix.
Allows you to define any number of rpc endpoints, which can be accessed via http protocol.
The package uses router macro
for matching RPC calls to your end-user service.
It uses JSON SCHEMA
as a specification for your services and provides parsing, validation and error handling briefly.
Requests can be served in batches with asyncronous order.
For usage with phoenix see this guide.
The package can be installed
by adding phx_json_rpc
to your list of dependencies in mix.exs
:
def deps do
[
{:phx_json_rpc, "~> 0.7.0"}
]
end
This package depends on ex_json_schema for validation purposes.
The package tested with phoenix >= 1.6
, but probably will work with any version started from 1.4
.
The docs can be found at https://hexdocs.pm/phx_json_rpc.
The package creation was inspired by some other repos:
MIT. Please see the license file for more information.