mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
parent
4b41bb103f
commit
3c6de2cafc
|
@ -40,6 +40,13 @@ export class Schema extends React.Component<Partial<SchemaProps>> {
|
|||
}
|
||||
|
||||
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 (
|
||||
<ObjectSchema
|
||||
{...{ ...this.props, schema: oneOf![schema.activeOneOf] }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user