postmanlabs / openapi-to-postman

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

#708 Fixes issue where if string is defined for required field, conversion was failing. #722

Closed VShingala closed 1 year ago

VShingala commented 1 year ago

Overview

Fixes issue: #708

RCA

According to JSON. schema standards, value of required should always be an array (Ref). But when it contains string type of data, json-schema-faker was failing to convert the data due to invalid types passing down in further logic resulting in TypeError.

Fix

We'll make sure that requiredProperties is always an array to avid TypeErrors.