Forum Discussion

anurag2810's avatar
anurag2810
New Member
2 years ago

Swagger - Links - runtime expression

Link for reference 

https://swagger.io/docs/specification/links/#runtime-expressions

 

 

$response.body#/users/0{"id": 1, "name": "Alice"}JSON Pointer (the #/… part) uses 0-based indexes to access array elements. There is no wildcard syntax though, so $response.body#/users/*/id is not valid.

On this page comment does say that wildcard can't be used in runtime expression but it doesn't say what should be used here.

Considering the same example if there are 'n' number of users sent back in the response, how shall i specify the links for all users in general or some kind of example for caller to be used? Are there any suggested good practices?

 

thanks,

Anurag

No RepliesBe the first to reply