postmanlabs / openapi-to-postman

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

Added support for reporting UserErrors in case when OpenAPI definition to converted is invalid. #782

Closed VShingala closed 9 months ago

VShingala commented 9 months ago

Overview

This PR adds support for throwing an UserError in case validation for corresponding OpenAPI to converted fails. Till now we were providing result with reason property. But to make sure that error reporting is uniform across various modules and correct, we're changing the behavior to make sure UserErrors are reported as errors here.

This means some of existing test cases also needed update.