{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://portal.yesilveri.tr/standart/kades-json/v1.1.0/kades-sozlesmesel-arac.schema.json",
  "title": "kadesSozlesmeselAracSemasi",
  "description": "KADES-JSON kades-sozlesmesel-arac şeması\n\nKOBİZON Proje Danışmanlık ve Yazılım Tic. Ltd. Şti. — Sürüm 1.1.0",
  "$ref": "#/definitions/kadesSozlesmeselAracSemasi",
  "definitions": {
    "kadesSozlesmeselAracSemasi": {
      "type": "object",
      "properties": {
        "tur": {
          "type": "string",
          "enum": [
            "yekg",
            "yesil_tarife",
            "ppa",
            "tedarikci_ozel"
          ]
        },
        "aciklama": {
          "type": "string",
          "minLength": 5,
          "maxLength": 500
        },
        "miktar": {
          "type": "string",
          "minLength": 1,
          "pattern": "^-?\\d+(\\.\\d+)?$"
        },
        "birim": {
          "type": "string",
          "enum": [
            "MJ",
            "GJ",
            "TJ",
            "kJ",
            "kcal",
            "kWh",
            "MWh",
            "GWh",
            "kg",
            "g",
            "ton",
            "kton",
            "litre",
            "m3",
            "Sm3",
            "km",
            "m",
            "mil",
            "ton-km",
            "kg-km",
            "yolcu-km",
            "hektar",
            "m2",
            "TL",
            "adet"
          ]
        },
        "faktorKodu": {
          "type": "string",
          "minLength": 2,
          "maxLength": 100
        },
        "belgeId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "belgeNo": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": [
        "tur",
        "aciklama",
        "miktar",
        "birim",
        "faktorKodu",
        "belgeId"
      ],
      "additionalProperties": false
    }
  }
}
