#1248 createXMLSample added error message
This commit is contained in:
44
dist/swagger-ui.js
vendored
44
dist/swagger-ui.js
vendored
@@ -26882,9 +26882,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var items = definition.items;
|
var items = definition.items;
|
||||||
var xml = definition.xml || {};
|
var xml = definition.xml || {};
|
||||||
|
|
||||||
if (!items) { return ''; }
|
if (!items) { return getErrorMessage(); }
|
||||||
|
|
||||||
value = createXMLSample(name, items, models);
|
value = createSchemaXML(name, items, models);
|
||||||
value += value;
|
value += value;
|
||||||
|
|
||||||
xml = xml || {};
|
xml = xml || {};
|
||||||
@@ -26901,11 +26901,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var model = models[type] || {};
|
var model = models[type] || {};
|
||||||
var name = model.name || modelType;
|
var name = model.name || modelType;
|
||||||
|
|
||||||
if (!model.definition) {
|
if (!model.definition) { return getErrorMessage(); }
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return createXMLSample(name, model.definition, models);
|
return createSchemaXML(name, model.definition, models);
|
||||||
};
|
};
|
||||||
|
|
||||||
var createPrimitiveXML = function (name, definition) {
|
var createPrimitiveXML = function (name, definition) {
|
||||||
@@ -26931,7 +26929,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var attributes = [];
|
var attributes = [];
|
||||||
var value;
|
var value;
|
||||||
|
|
||||||
if (_.keys(primitivesMap).indexOf(type) < 0) { return ''; }
|
if (_.keys(primitivesMap).indexOf(type) < 0) { return getErrorMessage(); }
|
||||||
|
|
||||||
if (namespace) {
|
if (namespace) {
|
||||||
attributes.push(namespace);
|
attributes.push(namespace);
|
||||||
@@ -26947,7 +26945,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function createObjectXML (name, definition, models) {
|
function createObjectXML (name, definition, models) {
|
||||||
var props;
|
var serializedProperties;
|
||||||
var attrs = [];
|
var attrs = [];
|
||||||
var properties = definition.properties;
|
var properties = definition.properties;
|
||||||
var additionalProperties = definition.additionalProperties;
|
var additionalProperties = definition.additionalProperties;
|
||||||
@@ -26958,31 +26956,24 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
attrs.push(namespace);
|
attrs.push(namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!properties && !additionalProperties) { return ''; }
|
if (!properties && !additionalProperties) { return getErrorMessage(); }
|
||||||
|
|
||||||
properties = properties || {};
|
properties = properties || {};
|
||||||
|
|
||||||
props = _.map(properties, function (prop, key) {
|
serializedProperties = _.map(properties, function (prop, key) {
|
||||||
return createXMLSample(key, prop, models);
|
return createSchemaXML(key, prop, models);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
if (additionalProperties) {
|
if (additionalProperties) {
|
||||||
props += '<!-- additional elements allowed -->';
|
serializedProperties += '<!-- additional elements allowed -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
return wrapTag(name, props, attrs);
|
return wrapTag(name, serializedProperties, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createXMLSample (name, definition, models) {
|
function createSchemaXML (name, definition, models) {
|
||||||
var type, xml, $ref;
|
var type, xml, $ref;
|
||||||
|
|
||||||
// allow ingnoring 'name' parameter
|
|
||||||
if (arguments.length === 2) {
|
|
||||||
models = arguments[1];
|
|
||||||
definition = arguments[0];
|
|
||||||
name = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
type = definition.type || 'object';
|
type = definition.type || 'object';
|
||||||
xml = definition.xml || {};
|
xml = definition.xml || {};
|
||||||
$ref = definition.$ref;
|
$ref = definition.$ref;
|
||||||
@@ -27002,11 +26993,22 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getErrorMessage () {
|
||||||
|
return '<!-- invalid XML -->';
|
||||||
|
}
|
||||||
|
|
||||||
|
function createXMLSample (definition, models) {
|
||||||
|
var prolog = '<?xml version="1.0"?>';
|
||||||
|
|
||||||
|
return prolog + createSchemaXML('', definition, models);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getModelSignature: getModelSignature,
|
getModelSignature: getModelSignature,
|
||||||
createJSONSample: createJSONSample,
|
createJSONSample: createJSONSample,
|
||||||
getParameterModelSignature: getParameterModelSignature,
|
getParameterModelSignature: getParameterModelSignature,
|
||||||
createParameterJSONSample: createParameterJSONSample,
|
createParameterJSONSample: createParameterJSONSample,
|
||||||
|
createSchemaXML: createSchemaXML,
|
||||||
createXMLSample: createXMLSample
|
createXMLSample: createXMLSample
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -715,9 +715,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var items = definition.items;
|
var items = definition.items;
|
||||||
var xml = definition.xml || {};
|
var xml = definition.xml || {};
|
||||||
|
|
||||||
if (!items) { return ''; }
|
if (!items) { return getErrorMessage(); }
|
||||||
|
|
||||||
value = createXMLSample(name, items, models);
|
value = createSchemaXML(name, items, models);
|
||||||
value += value;
|
value += value;
|
||||||
|
|
||||||
xml = xml || {};
|
xml = xml || {};
|
||||||
@@ -734,11 +734,9 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var model = models[type] || {};
|
var model = models[type] || {};
|
||||||
var name = model.name || modelType;
|
var name = model.name || modelType;
|
||||||
|
|
||||||
if (!model.definition) {
|
if (!model.definition) { return getErrorMessage(); }
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return createXMLSample(name, model.definition, models);
|
return createSchemaXML(name, model.definition, models);
|
||||||
};
|
};
|
||||||
|
|
||||||
var createPrimitiveXML = function (name, definition) {
|
var createPrimitiveXML = function (name, definition) {
|
||||||
@@ -764,7 +762,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
var attributes = [];
|
var attributes = [];
|
||||||
var value;
|
var value;
|
||||||
|
|
||||||
if (_.keys(primitivesMap).indexOf(type) < 0) { return ''; }
|
if (_.keys(primitivesMap).indexOf(type) < 0) { return getErrorMessage(); }
|
||||||
|
|
||||||
if (namespace) {
|
if (namespace) {
|
||||||
attributes.push(namespace);
|
attributes.push(namespace);
|
||||||
@@ -780,7 +778,7 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function createObjectXML (name, definition, models) {
|
function createObjectXML (name, definition, models) {
|
||||||
var props;
|
var serializedProperties;
|
||||||
var attrs = [];
|
var attrs = [];
|
||||||
var properties = definition.properties;
|
var properties = definition.properties;
|
||||||
var additionalProperties = definition.additionalProperties;
|
var additionalProperties = definition.additionalProperties;
|
||||||
@@ -791,31 +789,24 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
attrs.push(namespace);
|
attrs.push(namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!properties && !additionalProperties) { return ''; }
|
if (!properties && !additionalProperties) { return getErrorMessage(); }
|
||||||
|
|
||||||
properties = properties || {};
|
properties = properties || {};
|
||||||
|
|
||||||
props = _.map(properties, function (prop, key) {
|
serializedProperties = _.map(properties, function (prop, key) {
|
||||||
return createXMLSample(key, prop, models);
|
return createSchemaXML(key, prop, models);
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
if (additionalProperties) {
|
if (additionalProperties) {
|
||||||
props += '<!-- additional elements allowed -->';
|
serializedProperties += '<!-- additional elements allowed -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
return wrapTag(name, props, attrs);
|
return wrapTag(name, serializedProperties, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createXMLSample (name, definition, models) {
|
function createSchemaXML (name, definition, models) {
|
||||||
var type, xml, $ref;
|
var type, xml, $ref;
|
||||||
|
|
||||||
// allow ingnoring 'name' parameter
|
|
||||||
if (arguments.length === 2) {
|
|
||||||
models = arguments[1];
|
|
||||||
definition = arguments[0];
|
|
||||||
name = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
type = definition.type || 'object';
|
type = definition.type || 'object';
|
||||||
xml = definition.xml || {};
|
xml = definition.xml || {};
|
||||||
$ref = definition.$ref;
|
$ref = definition.$ref;
|
||||||
@@ -835,11 +826,22 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getErrorMessage () {
|
||||||
|
return '<!-- invalid XML -->';
|
||||||
|
}
|
||||||
|
|
||||||
|
function createXMLSample (definition, models) {
|
||||||
|
var prolog = '<?xml version="1.0"?>';
|
||||||
|
|
||||||
|
return prolog + createSchemaXML('', definition, models);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getModelSignature: getModelSignature,
|
getModelSignature: getModelSignature,
|
||||||
createJSONSample: createJSONSample,
|
createJSONSample: createJSONSample,
|
||||||
getParameterModelSignature: getParameterModelSignature,
|
getParameterModelSignature: getParameterModelSignature,
|
||||||
createParameterJSONSample: createParameterJSONSample,
|
createParameterJSONSample: createParameterJSONSample,
|
||||||
|
createSchemaXML: createSchemaXML,
|
||||||
createXMLSample: createXMLSample
|
createXMLSample: createXMLSample
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('method createXMLSample', function () {
|
describe('method createSchemaXML', function () {
|
||||||
var date = new Date(1).toISOString().split('T')[0];
|
var date = new Date(1).toISOString().split('T')[0];
|
||||||
var dateTime = new Date(1).toISOString();
|
var dateTime = new Date(1).toISOString();
|
||||||
|
|
||||||
@@ -73,42 +73,42 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'string'};
|
var definition = {type: 'string'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>string</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>string</tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <tagname>1</tagname> when passing type integer', function () {
|
it('returns tag <tagname>1</tagname> when passing type integer', function () {
|
||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'integer'};
|
var definition = {type: 'integer'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>1</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>1</tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <tagname>1.1</tagname> when passing type number', function () {
|
it('returns tag <tagname>1.1</tagname> when passing type number', function () {
|
||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'number'};
|
var definition = {type: 'number'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>1.1</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>1.1</tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <tagname>boolean</tagname> when passing type boolean', function () {
|
it('returns tag <tagname>boolean</tagname> when passing type boolean', function () {
|
||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'boolean'};
|
var definition = {type: 'boolean'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>true</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>true</tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <tagname>' + date + '</tagname> when passing type string format date', function () {
|
it('returns tag <tagname>' + date + '</tagname> when passing type string format date', function () {
|
||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'string', format: 'date'};
|
var definition = {type: 'string', format: 'date'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>' + date + '</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>' + date + '</tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <tagname>' + dateTime + '</tagname> when passing type string format date-time', function () {
|
it('returns tag <tagname>' + dateTime + '</tagname> when passing type string format date-time', function () {
|
||||||
var name = 'tagname';
|
var name = 'tagname';
|
||||||
var definition = {type: 'string', format: 'date-time'};
|
var definition = {type: 'string', format: 'date-time'};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<tagname>' + dateTime + '</tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<tagname>' + dateTime + '</tagname>');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<newtagname>string</newtagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<newtagname>string</newtagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <test:newtagname>string</test:newtagname> when passing type string and xml:{name: "newtagname", prefix:"test"}', function () {
|
it('returns tag <test:newtagname>string</test:newtagname> when passing type string and xml:{name: "newtagname", prefix:"test"}', function () {
|
||||||
@@ -135,7 +135,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<test:newtagname>string</test:newtagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<test:newtagname>string</test:newtagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <test:tagname>string</test:tagname> when passing type string and xml:{name: "newtagname", prefix:"test"}', function () {
|
it('returns tag <test:tagname>string</test:tagname> when passing type string and xml:{name: "newtagname", prefix:"test"}', function () {
|
||||||
@@ -147,7 +147,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<test:tagname>string</test:tagname>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<test:tagname>string</test:tagname>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <test:tagname >string</test:tagname> when passing type string and xml:{"namespace": "http://swagger.io/schema/sample", "prefix": "sample"}', function () {
|
it('returns tag <test:tagname >string</test:tagname> when passing type string and xml:{"namespace": "http://swagger.io/schema/sample", "prefix": "sample"}', function () {
|
||||||
@@ -160,7 +160,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<sample:name xlmns:sample="http://swagger.io/schema/sample">string</sample:name>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<sample:name xlmns:sample="http://swagger.io/schema/sample">string</sample:name>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <test:tagname >string</test:tagname> when passing type string and xml:{"namespace": "http://swagger.io/schema/sample"}', function () {
|
it('returns tag <test:tagname >string</test:tagname> when passing type string and xml:{"namespace": "http://swagger.io/schema/sample"}', function () {
|
||||||
@@ -172,7 +172,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal('<name xlmns="http://swagger.io/schema/sample">string</name>');
|
expect(sut.createSchemaXML(name, definition, models)).to.equal('<name xlmns="http://swagger.io/schema/sample">string</name>');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <animal>string</animal><animal>string</animal> when passing string items with name', function () {
|
it('returns tag <animal>string</animal><animal>string</animal> when passing string items with name', function () {
|
||||||
@@ -203,7 +203,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <animals><animal>string</animal><animal>string</animal></animals> when passing string items with name', function () {
|
it('returns tag <animals><animal>string</animal><animal>string</animal></animals> when passing string items with name', function () {
|
||||||
@@ -222,7 +222,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns tag <aliens><animal>string</animal><animal>string</animal></aliens> when passing string items with name and {wrapped: true}', function () {
|
it('returns tag <aliens><animal>string</animal><animal>string</animal></aliens> when passing string items with name and {wrapped: true}', function () {
|
||||||
@@ -242,7 +242,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('return correct nested wrapped array', function () {
|
it('return correct nested wrapped array', function () {
|
||||||
@@ -265,7 +265,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('return correct nested wrapped array', function () {
|
it('return correct nested wrapped array', function () {
|
||||||
@@ -295,7 +295,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns object with integer property and array property', function () {
|
it('returns object with integer property and array property', function () {
|
||||||
@@ -349,7 +349,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns object with integer property and array property', function () {
|
it('returns object with integer property and array property', function () {
|
||||||
@@ -382,7 +382,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns nested objects', function () {
|
it('returns nested objects', function () {
|
||||||
@@ -416,7 +416,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(name, definition, models)).to.equal(expected);
|
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -438,7 +438,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(schema, models)).to.equal(expected);
|
expect(sut.createSchemaXML('', schema, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns Object with properties Pet and name', function () {
|
it('returns Object with properties Pet and name', function () {
|
||||||
@@ -463,7 +463,7 @@ describe('SwaggerUi.partials.signature tests', function () {
|
|||||||
$ref: '#/definitions/Pet'
|
$ref: '#/definitions/Pet'
|
||||||
};
|
};
|
||||||
|
|
||||||
expect(sut.createXMLSample(schema, models)).to.equal(expected);
|
expect(sut.createSchemaXML('', schema, models)).to.equal(expected);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user