{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kentekenkompas-nl/json-schema/kentekenkompas-nl-comparison-schema.json",
  "title": "Comparison",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kentekenkompas-nl-openapi.yml#/components/schemas/Comparison",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sourceModelKey",
    "modelKey",
    "targetModelKey",
    "label",
    "relationType",
    "relationMeaning",
    "classification",
    "reasons",
    "rationale",
    "limitations",
    "citationUrl"
  ],
  "properties": {
    "sourceModelKey": {
      "type": "string"
    },
    "modelKey": {
      "type": "string",
      "description": "Backwards-compatible target model key."
    },
    "targetModelKey": {
      "type": "string",
      "description": "The comparison target model."
    },
    "label": {
      "type": "string"
    },
    "relationType": {
      "type": "string",
      "enum": [
        "DIRECT_ALTERNATIVE",
        "CONTROL_MODEL",
        "POWERTRAIN_CONTRAST",
        "CROSS_BODY_COMPARISON"
      ]
    },
    "relationMeaning": {
      "type": "string"
    },
    "classification": {
      "$ref": "#/$defs/Classification"
    },
    "importantDifference": {
      "type": "string"
    },
    "reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "rationale": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "limitations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Limitation"
      }
    },
    "citationUrl": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Classification": {
      "type": "string",
      "enum": [
        "OFFICIAL",
        "DERIVED",
        "EDITORIAL"
      ],
      "description": "OFFICIAL: directly stated by the identified official/primary source. DERIVED: reproducibly derived by KentekenKompas from source data. EDITORIAL: KentekenKompas interpretation or guidance; never an official RDW fact."
    },
    "Limitation": {
      "type": "string",
      "minLength": 1,
      "description": "Explicit constraint on scope, applicability, freshness or interpretation."
    }
  }
}