{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:junexis:schema:sdk-provider-conformance:0.1",
  "title": "Wynik zgodności providera Junexis SDK 0.1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "status", "providerId", "abiVersion", "checks", "summary"],
  "properties": {
    "schemaVersion": { "const": "junexis.sdk.provider-conformance/0.1" },
    "status": { "enum": ["pass", "fail"] },
    "providerId": {
      "anyOf": [
        { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*(?![\\s\\S])" },
        { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)+(?![\\s\\S])" }
      ]
    },
    "abiVersion": { "const": "junexis.storage.runtime/0.1" },
    "checks": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "status", "message", "durationMilliseconds"],
        "properties": {
          "name": { "type": "string", "minLength": 1, "maxLength": 128 },
          "status": { "enum": ["pass", "fail"] },
          "message": { "type": ["string", "null"], "maxLength": 4096 },
          "durationMilliseconds": { "type": "integer", "minimum": 0 }
        }
      }
    },
    "summary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["passed", "failed", "total"],
      "properties": {
        "passed": { "type": "integer", "minimum": 0 },
        "failed": { "type": "integer", "minimum": 0 },
        "total": { "type": "integer", "minimum": 1, "maximum": 1000 }
      }
    }
  }
}
