OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

[Request] Define parameters in Example Object

Open takuyahara opened this issue 3 years ago • 3 comments

Just shortly, I would like to request a capability to define parameters in Example Object to associate each parameters passed and response received.

takuyahara avatar Jun 06 '21 13:06 takuyahara

This is also an important request for us (https://github.com/Adyen/adyen-openapi). We define a lot of examples for each API request body (and corresponding examples of responses), and if any of them require path parameters or query parameters, it's currently not possible to provide their values per each example.

a-akimov avatar Jun 07 '21 07:06 a-akimov

@philsturgeon may have some bearing on #sig-workflows

MikeRalphson avatar Jun 07 '21 07:06 MikeRalphson

Gotcha, so if /payments/{type} and type == "bank" then you want to show a bank account example instead of a credit card example, etc.

This is commonly requested for mocking tools like Prism as a feature, but could be interesting to see if workflows can take care of it. It's edging a liiiiitle close to business logic in the contract, but I think if its focused purely on examples then its safe enough.

philsturgeon avatar Jun 17 '21 10:06 philsturgeon