Certain tooling like NSwag generates examples for separate response code differently. i.e. Request body contains examples field with multiple response code values as keys and actual example as value. Meanwhile, relative responses will simply define example as actual example value.
Since Our existing support (https://github.com/postmanlabs/openapi-to-postman/pull/792) only supports example matching based on examples key-matching, such definitions created collections with multiple examples that users might not find useful.
This PR adds support for collection generation from such definition to have response code based examples matching. More details is mentioned in code. And related tests has also been added.
Overview
Certain tooling like NSwag generates examples for separate response code differently. i.e. Request body contains examples field with multiple response code values as keys and actual example as value. Meanwhile, relative responses will simply define
example
as actual example value.Here's example definition generated by NSwag.
Since Our existing support (https://github.com/postmanlabs/openapi-to-postman/pull/792) only supports example matching based on examples key-matching, such definitions created collections with multiple examples that users might not find useful.
This PR adds support for collection generation from such definition to have response code based examples matching. More details is mentioned in code. And related tests has also been added.