{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klisten-co-kr/json-schema/klisten-co-kr-trust-schema.json",
  "title": "Trust",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klisten-co-kr-services-api-openapi.yml#/components/schemas/Trust",
  "type": "object",
  "properties": {
    "service_id": {
      "type": "string",
      "pattern": "^svc_[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
    },
    "latest_observation_id": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^obs_[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "fingerprint": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "risk_score": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "coverage": {
      "type": "object",
      "properties": {
        "identity": {
          "type": "string",
          "enum": [
            "complete",
            "partial",
            "not_checked"
          ]
        },
        "metadata": {
          "type": "string",
          "enum": [
            "complete",
            "partial",
            "not_checked"
          ]
        },
        "tool_schema": {
          "type": "string",
          "enum": [
            "complete",
            "partial",
            "not_checked"
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "complete",
            "partial",
            "not_checked"
          ]
        },
        "vulnerability": {
          "type": "string",
          "enum": [
            "complete",
            "partial",
            "not_checked"
          ]
        }
      },
      "required": [
        "identity",
        "metadata",
        "tool_schema",
        "availability",
        "vulnerability"
      ],
      "additionalProperties": false
    },
    "freshness": {
      "type": "string",
      "enum": [
        "missing",
        "fresh",
        "stale"
      ]
    },
    "observed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "approved_fingerprint": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "request_id": {
      "type": "string",
      "pattern": "^req_[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
    }
  },
  "required": [
    "service_id",
    "latest_observation_id",
    "fingerprint",
    "risk_score",
    "coverage",
    "freshness",
    "observed_at",
    "expires_at",
    "approved_fingerprint",
    "request_id"
  ],
  "additionalProperties": false
}