fix: models view when object key contains deprecated:true (#6371)

fixes #6369
This commit is contained in:
Tim Lai
2020-09-09 16:43:01 -07:00
committed by GitHub
parent 5123b47ef4
commit d4eea4da1b
6 changed files with 165 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ export default class ObjectModel extends Component {
let requiredProperties = schema.get("required")
let infoProperties = schema
.filter( ( v, key) => ["maxProperties", "minProperties", "nullable"].indexOf(key) !== -1 )
let deprecated = schema.get("deprecated")
const JumpToPath = getComponent("JumpToPath", true)
const Markdown = getComponent("Markdown", true)
@@ -92,6 +93,18 @@ export default class ObjectModel extends Component {
</td>
</tr>
}
{
!deprecated ? null :
<tr className={"property"}>
<td>
deprecated:
</td>
<td>
true
</td>
</tr>
}
{
!(properties && properties.size) ? null : properties.entrySeq().filter(
([, value]) => {