!!!Test discriminator in AJV v8.10.0
by Leo
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/ajv/8.10.0/ajv7.bundle.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 = {
"$ref": "#/definitions/SiteAcceptanceTemplate",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AcceptanceGranularity": {
"enum": [
"1d",
"1w"
],
"type": "string"
},
"AcceptanceKpi": {
"properties": {
"deterioration": {
"$ref": "#/definitions/SiteAcceptanceKpiDeterioration"
},
"id": {
"type": "string"
},
"ignore": {
"type": "boolean"
},
"name": {
"type": "string"
},
"technology": {
"$ref": "#/definitions/SiteAcceptanceTechnology"
},
"threshold": {
"type": "number"
},
"unit": {
"$ref": "#/definitions/SiteAcceptanceKpiUnit"
}
},
"required": [
"deterioration",
"id",
"ignore",
"name",
"technology",
"threshold",
"unit"
],
"type": "object"
},
"AcceptanceKpiRef": {
"properties": {
"id": {
"type": "string"
},
"name": {
"$ref": "#/definitions/SiteAcceptanceKpiName"
},
"threshold": {
"type": "number"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"AggregationByPeriodBarChart": {
"properties": {
"aggregationMethod": {
"$ref": "#/definitions/ChartAggregationMethod"
...