{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compatlab-me/json-schema/compatlab-me-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compatlab-me-openapi.yml#/components/schemas/SearchResponse",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "packages": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 214
          },
          "version": {
            "type": "string",
            "maxLength": 256
          },
          "description": {
            "type": "string",
            "maxLength": 4096
          },
          "repositoryUrl": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri"
          },
          "reportId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "availableReport": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "observedAt": {
                    "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+)?(?:Z))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "classifierRevision": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "pass",
                      "partial",
                      "fail",
                      "inconclusive",
                      "unsupported",
                      "not_applicable",
                      "infrastructure_error"
                    ]
                  },
                  "coverageComplete": {
                    "type": "boolean"
                  },
                  "matchesCurrentMatrix": {
                    "type": "boolean"
                  },
                  "matrix": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "revision": {
                        "type": "string",
                        "maxLength": 128
                      },
                      "platform": {
                        "type": "string",
                        "const": "linux_amd64_glibc"
                      }
                    },
                    "required": [
                      "id",
                      "revision",
                      "platform"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "observedAt",
                  "classifierRevision",
                  "outcome",
                  "coverageComplete",
                  "matchesCurrentMatrix",
                  "matrix"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "version",
          "reportId"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "schemaVersion",
    "packages"
  ],
  "additionalProperties": false
}