Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for usage of XML examples of type string. #738

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

VShingala
Copy link
Member

Overview

This PR adds support for usage of string type of XML examples even for complex types like object and array. Existing support for constructing example based on xml field will still continue to support but mentioning example at any schema level of type string will override the mentioned example to be used in generated collection.

@@ -1107,6 +1108,25 @@ describe('The convert v2 Function', function() {
});
});

it('Should convert xml request body with complete string example correctly', function(done) {
const openapi = fs.readFileSync(xmlrequestExampleBody, 'utf8');
Converter.convert({ type: 'string', data: openapi },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a convertV2 test, shouldn't we use the convertV2 method? And in that case requestParametersResolution will not be applicable right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, missed this. Have updated test to use correct option and interface.

@VShingala VShingala merged commit fedd1d3 into develop Jun 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants