mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
parent
4b41bb103f
commit
3c6de2cafc
|
@ -40,6 +40,13 @@ export class Schema extends React.Component<Partial<SchemaProps>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (discriminatorProp !== undefined) {
|
if (discriminatorProp !== undefined) {
|
||||||
|
if (!oneOf || !oneOf.length) {
|
||||||
|
throw new Error(
|
||||||
|
`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${
|
||||||
|
schema.title
|
||||||
|
}`,
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<ObjectSchema
|
<ObjectSchema
|
||||||
{...{ ...this.props, schema: oneOf![schema.activeOneOf] }}
|
{...{ ...this.props, schema: oneOf![schema.activeOneOf] }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user