Ash FrameworkAF
Ash Framework3y ago
12 replies
\ ឵឵឵

Adding custom routes with AshJsonApi

Is it possible to add custom routes like:
json_api do
  type "many_actions"
  routes do
    base "/many_actions"
    post "/another", :another
  end
 end


Looks like you can do something similar with relationships, but is there a way to expose additional actions on the resource?

This is related to the many issues on JSON:API, but most of these have to do with discoverability; the spec is fairly wide-open when it comes to adding additional routes in general.

https://github.com/json-api/json-api/issues/745
https://github.com/json-api/json-api/issues/684
https://github.com/json-api/json-api/issues/773
https://github.com/json-api/json-api/pull/1268
https://github.com/json-api/json-api/pull/1254
Was this page helpful?