cancel
Showing results for 
Search instead for 
Did you mean: 

Using a Response parameter as a body parameter in other route

iasisalomon
Occasional Visitor

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!

1 REPLY 1
joejoyce
Staff

Re: Using a Response parameter as a body parameter in other route

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/

 

Tags (1)
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors