mirror of
https://github.com/Redocly/redoc.git
synced 2025-04-04 00:44:17 +03:00
Fix discriminator ui issue
This commit is contained in:
parent
84e702aa7a
commit
95d257d404
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user