Skip to content

Commit f3bc0fa

Browse files
committed
Added support for usage of XML examples of type string - Fixed test to use v2 interface
1 parent 723dac6 commit f3bc0fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/convertV2.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,11 +1110,11 @@ describe('The convert v2 Function', function() {
11101110

11111111
it('Should convert xml request body with complete string example correctly', function(done) {
11121112
const openapi = fs.readFileSync(xmlrequestExampleBody, 'utf8');
1113-
Converter.convert({ type: 'string', data: openapi },
1114-
{ schemaFaker: true, requestParametersResolution: 'Example' }, (err, conversionResult) => {
1113+
Converter.convertV2({ type: 'string', data: openapi },
1114+
{ schemaFaker: true, parametersResolution: 'Example' }, (err, conversionResult) => {
11151115
expect(err).to.be.null;
11161116
expect(conversionResult.result).to.equal(true);
1117-
expect(conversionResult.output[0].data.item[0].request.body.raw)
1117+
expect(conversionResult.output[0].data.item[0].item[0].request.body.raw)
11181118
.to.equal(`<?xml version="1.0" encoding="UTF-8"?>
11191119
<Errors>
11201120
<error>

0 commit comments

Comments
 (0)