Forum Discussion

iasisalomon's avatar
iasisalomon
Occasional Visitor
4 years ago

Using a Response parameter as a body parameter in other route

Hi there,

I have a route that upon other parameters, returns an operation ID.

I need to use that ID in other requests, so that a new user can execute that request without changing anything. 

If that is not possible, I need to create a required parameter box in the Swagger UI so that the user knows that he needs to copy the operation ID to make the call. (that parameter is part of the requestBody)

Thanks!

  • Hey iasisalomon. It sounds like what you're describing could be implemented in an OpenAPI definition using Links. Using Links, you can define how values returned by one operation can be used as inputs for other operations. Does this sound like what you're looking for?

     

    Documentation for this functionality is here: https://swagger.io/docs/specification/links/