View Source AshJsonApi.Api.Router (ash_json_api v0.34.2)

Use this module to create a router for your AshJsonApi.

To use this, create a module and do the following:

defmodule YourRouter do
  use AshJsonApi.Api.Router,
    apis: [YourApi, YourOtherApi],
    # these next two are optional, only add them if you want those endpoints
    open_api: "/open_api",
    json_schema: "/json_schema"
end

Then in your Phoenix router or plug pipeline, forward to this plug. In phoenix, that looks like this:

    forward "/api", YourRouter

Summary

Functions