This commit is contained in:
sokol
2017-06-16 21:14:00 +03:00
parent 129129be97
commit acff34e1d4
5 changed files with 7 additions and 8 deletions

View File

@@ -224,7 +224,6 @@ class Model extends Component {
if ( schema && (schema.get("type") || schema.get("properties")) ) {
modelSchema = schema
modelName = name
} else if ( $$ref ) {
modelSchema = this.getRefSchema( modelName )
}
@@ -237,7 +236,7 @@ class Model extends Component {
switch(type) {
case "object":
return <ObjectModel className="object" { ...this.props } schema={ modelSchema }
name={ modelName || name }
name={ name || modelName }
isRef={ isRef!== undefined ? isRef : !!$$ref }/>
case "array":
return <ArrayModel className="array" { ...this.props } schema={ modelSchema } required={ required } />