View Source PhxJsonRpc.Router.Validator behaviour (Phoenix JSON RPC v0.3.6)

Validation behaviour for the rpc requests.

Link to this section Summary

Callbacks

Validates the given rpc request against json-schema provided.

Link to this section Callbacks

Link to this callback

validate(request, schema_ref, schema)

View Source
@callback validate(
  request :: PhxJsonRpc.Request.t(),
  schema_ref :: nil | binary(),
  schema :: map()
) :: PhxJsonRpc.Request.t()

Validates the given rpc request against json-schema provided.

If validation fails, enriches request with error struct and set valid? parameter to false.