Redirect on GET request

Hmm…I might suggest doing this with just a regular route and phoenix controller? Although I guess you want this to show up in your open api schema :thinking: What you can do is use the modify_open_api option to use AshJsonApi.Router to add the operation manually if it is defined as a custom route.

use AshJsonApi.Router,
  ...
  modify_open_api: {__MODULE__, :modify_open_api, []}

def modify_open_api(spec, _conn, _opts) do
   # add an operation to `spec`
end 

I assume something about redirecting in the modify_conn callback causes an issue because we still attempt to render a response or something along those lines. We can potentially check for a redirect and not render a response, or check if the conn has been halted in some way.

But to be sure I’d need to know specifically how it didn’t work when you tried it.