!!!JDT Test discriminator in AJV v7.1.1
by Leo
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/ajv/8.10.0/ajvJTD.min.js"></script>
<p>
Test discriminator in AJV v8.10.0
See <a href="https://cdnjs.com/libraries/ajv">cdnjs:ajv </a>
</p>
CSS
html, document {
background-color: black;
}
JavaScript
var schema = {
"definitions": {
"AcceptanceGranularity": {
"enum": [
"1d",
"1w"
]
},
"AcceptanceKpi": {
"properties": {
"deterioration": {
"type": "string"
},
"id": {
"type": "string"
},
"ignore": {
"type": "boolean"
},
"name": {
"type": "string"
},
"technology": {
"type": "string"
},
"threshold": {
"type": "uint8"
},
"unit": {
"type": "string"
}
}
},
"SiteAcceptanceKpiName": {
"type": "string"
},
"AcceptanceKpiRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"optionalProperties": {
"threshold": {
"type": "uint8"
}
}
},
"AAA": {
},
"BBB": {
},
"CCC": {
"discriminator": "type",
"mapping": {
"one_cell_per_kpi": {
"properties": {
"kpis": {
"elements": {
"type": "string"
}
}
}
},
"one_kpi_per_cell": {
"properties": {
}
}
}
},
"AggregationByPeriodBarChart": {
"properties": {
"aggregationMethod": {
"ref": "CCC"
},
"granularity": {
"type": "string"
},
"id": {
"type": "string"
},
"includeThresholds": {
"type": "boolean"
},
"name": {
"type": "string"
}
}
}
},
"properties": {
"kpis": {
"elements": {
"ref": "AcceptanceKpi"
}
},
"sheets": {
"elements": {
"discriminator": "type",
"mapping": {
"mdt": {
"properties": {
"granularity": {
"ref":...