!!!Test discriminator in AJV v7.1.1

by Leo

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/ajv/8.10.0/ajv7.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 ={
  "$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"
        },
        "granularity": {
          "$ref": "#/definitions/AcceptanceGranularity"
        },
        "id": {
          "type": "string"
        },
        "includeThresholds": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "enum": [
            "bar"
          ],
          "type": "string"
        }
      },
      "required": [
        "aggregationMethod",
        "granularity",
        "id",
       ...