#1248 createXMLSample Added handling readyOnly params

This commit is contained in:
Anna Bodnia
2016-01-18 13:50:21 +02:00
parent add91792fb
commit f68420051f
5 changed files with 57 additions and 25 deletions

View File

@@ -418,6 +418,30 @@ describe('SwaggerUi.partials.signature tests', function () {
expect(sut.createSchemaXML(name, definition, models)).to.equal(expected);
});
it('returns object with no readonly fields for parameter', function () {
var expected = '<animals>' +
'<id>1</id>'+
'</animals>';
var name = 'animals';
var definition = {
type: 'object',
properties: {
id: {
type: 'integer'
},
cat: {
readOnly: true,
type: 'string'
}
},
xml: {
name: 'animals'
}
};
expect(sut.createSchemaXML(name, definition, models, true)).to.equal(expected);
});
});
describe('schema is in definitions', function () {