{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/looot/json-schema/looot-submit-compatibility-gate-schema.json",
  "title": "SubmitCompatibilityGate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/looot-compatibility-drafts-api-openapi.yml#/components/schemas/SubmitCompatibilityGate",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "gate",
    "claim",
    "evidenceRefs"
  ],
  "properties": {
    "gate": {
      "enum": [
        "provider_identity",
        "capability_mapping",
        "official_evidence",
        "rights",
        "auth",
        "base_url",
        "effect_classification",
        "price",
        "executor",
        "error_contract",
        "rate_limits",
        "retention",
        "authenticated_test",
        "production_approval"
      ]
    },
    "claim": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "evidenceRefs": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "$ref": "#/$defs/CompatibilityEvidenceRef"
      }
    }
  },
  "$defs": {
    "CompatibilityEvidenceRef": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "url",
        "digest",
        "observedAt",
        "kind"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://"
        },
        "digest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        },
        "kind": {
          "enum": [
            "official_docs",
            "openapi",
            "terms",
            "pricing",
            "authenticated_test",
            "internal_review"
          ]
        }
      }
    }
  }
}