Fix discriminator ui issue

This commit is contained in:
Roman Hotsiy 2016-04-28 10:19:39 +03:00
parent 84e702aa7a
commit 95d257d404

View File

@ -105,14 +105,14 @@ export default class JsonSchema extends BaseComponent {
}
return propertySchema;
});
if (this.skipReadOnly) {
props = props.filter(prop => !prop.readOnly);
}
// Move discriminator field to the end of properties list
if (discriminatorFieldIdx > -1) {
let discrProp = props.splice(discriminatorFieldIdx, 1);
props.push(discrProp[0]);
}
if (this.skipReadOnly) {
props = props.filter(prop => !prop.readOnly);
}
schema.properties = props;
}