postmanlabs / openapi-to-postman

Plugin for converting OpenAPI 3.0 specs to the Postman Collection (v2) format
Apache License 2.0
930 stars 200 forks source link

Added support for enableOptionalParameters option in v2 interface. #709

Closed VShingala closed 1 year ago

VShingala commented 1 year ago

Overview

This PR adds support for option enableOptionalParameters in convertV2 and validateTransactionV2 interfaces. As reported by users here https://github.com/postmanlabs/openapi-to-postman/issues/31#issuecomment-1481258315, we did not add this option with v2 interface.

Solution

We'll now be marking all optional params as disabled if option enableOptionalParameters is provided as false. (Default value for it is true).

We'll also be making sure to not report such params as missing in validation flow given option is false.

Track

https://go.postman-beta.co?_track=br-feature-IMPORT-227

Both conversion and validation can be checked on this branch.