{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://evaluation.keydrop.net/schema/0.3/common.schema.json",
  "title": "OES 共通の定義",
  "$defs": {
    "code": {
      "description": "利用者が決めるコード（社員番号・部署コード・期 ID など）",
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,32}$"
    },
    "ulid": {
      "type": "string",
      "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "dateTime": {
      "description": "オフセット必須（日本時間なら +09:00）",
      "type": "string",
      "format": "date-time",
      "pattern": "(Z|[+-][0-9]{2}:[0-9]{2})$"
    },
    "codeList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/code"
      },
      "uniqueItems": true
    },
    "stringList": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "score": {
      "type": "number",
      "minimum": 1,
      "maximum": 10
    },
    "positiveWeight": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "stage": {
      "enum": [
        "goal",
        "self",
        "first",
        "second"
      ]
    },
    "extensions": {
      "type": "object",
      "propertyNames": {
        "pattern": "^x-[a-z0-9]+-[A-Za-z0-9_-]+$"
      }
    },
    "percent": {
      "description": "割合（%）。100 を超えてよい",
      "type": "number",
      "minimum": 0
    }
  }
}
