Hi,
I have an asynchronous REST API that closely follows the design outlined
here and
here. So I have three methods set out like this:
POST /v1/foo (returns "202 Accepted")
GET /v1/foo/queue/{uuid} (returns "200 OK" whilst job is pending, then "303 See Other" on completion)
GET /v1/foo/{uuid} (returns "200 OK" and the JSON result)
My question is: how can I prevent an actual redirect on the queue request? Most clients have some functionality to disable automatic following of redirects. I think I probably do want to do this, since it doesn't seem to make sense for the UI listing to display the response from another method. I couldn't find any option within Swagger UI, so perhaps there is something in Swagger JS (or even shred)?
(I am also tempted to ask whether this is slightly too complex a design... although it seems to be the correct RESTful way to do this).
Thanks,
Christopher