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 proper support for usage of examples in cases of XML type of body. #731

Closed VShingala closed 1 year ago

VShingala commented 1 year ago

Overview

This PR adds support for generating request and response body correctly for XML type of data from example if available. This change is done on both v1 and v2 interface with corresponding tests.

This improves the already merged PR https://github.com/postmanlabs/openapi-to-postman/pull/724 with better approach that also adds support for usage of examples at schema level as well.

All this support is added using existing xmlSchemaFaker. We've also removed anther library that was added in that PR named js2xml as it's not needed anymore.