Ask a Question

OpenApi : How to add variable for some attribut

Mastersnes
Occasional Visitor

OpenApi : How to add variable for some attribut

Hello everyone,

In the life cycle of my API, I have to contact a partner to whom I send a token and a callback url. After having performed his operations, he must then contact me on this callback url by transmitting the given token.
In order to test my API, I try to mock my partner using Prism. I describe my partner using openapi: 3.1.0.

So I describe the requestBody of my partner by quoting the different parameters. "callbackUrl" represents the callback url on which my partner must call me back and "requestId" represents the return token.

Mastersnes_0-1657283823404.png

I also describe the callback using the variable in the requestBody to describe the url

Mastersnes_1-1657284087599.png

 

Everything is fine so far but I would like the "requestId" generated by the callback body to contain the value of the "requestId" of my initial request.
Basically I would like to do something like this:

Mastersnes_2-1657284275703.png

Unfortunately it does not work as I would like...
Does anyone know how to do this please?

 

 

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: