{
  "components": {
    "schemas": {
      "Component": {
        "properties": {
          "build_to_order": {
            "description": "A build-to-order option",
            "type": "boolean"
          },
          "gles": {
            "type": "string"
          },
          "hardware_ids": {
            "description": "IDs a probe can match, e.g. pci:1002:6760",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "hardware_ids"
        ],
        "type": "object"
      },
      "Configuration": {
        "properties": {
          "applicable": {
            "description": "How many criteria apply to it",
            "type": "integer"
          },
          "blocker": {
            "description": "The criterion that decided a failed verdict",
            "type": "string"
          },
          "board_ids": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/CriterionStatus"
            },
            "type": "array"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/Component"
            },
            "type": "array"
          },
          "connectors": {
            "items": {
              "$ref": "#/components/schemas/Connector"
            },
            "type": "array"
          },
          "counts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Counts"
              }
            ],
            "description": "Criteria per verdict"
          },
          "distinction": {
            "description": "What sets it apart from the Mac's other configurations",
            "type": "string"
          },
          "features": {
            "description": "Other tested features, e.g. Battery",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "known_limitations": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "label": {
            "type": "string"
          },
          "layout_sources": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "order_numbers": {
            "description": "Apple order numbers, e.g. MC721LL/A",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "out_of_scope": {
            "description": "Why it's left out of coverage counts",
            "type": "string"
          },
          "portmap_url": {
            "type": "string"
          },
          "ports": {
            "description": "Ports and media that aren't tested per connector",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "release": {
            "description": "Apple's name for the release",
            "type": "string"
          },
          "reports": {
            "items": {
              "$ref": "#/components/schemas/ReportRef"
            },
            "type": "array"
          },
          "tested": {
            "description": "How many of those have a result",
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          },
          "verified": {
            "description": "Every applicable criterion passed",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "identifier",
          "label",
          "distinction",
          "release",
          "order_numbers",
          "components",
          "ports",
          "connectors",
          "features",
          "verdict",
          "applicable",
          "tested",
          "verified",
          "counts",
          "capabilities",
          "reports",
          "url"
        ],
        "type": "object"
      },
      "Connector": {
        "properties": {
          "also": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "criteria": {
            "description": "The criteria this connector is tested for",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "Side and position, left to right as you face that side, e.g. left-2",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "type": {
            "description": "e.g. usb-a-2, thunderbolt-1, magsafe",
            "type": "string"
          }
        },
        "required": [
          "id",
          "side",
          "type",
          "name",
          "criteria"
        ],
        "type": "object"
      },
      "Counts": {
        "properties": {
          "Failed": {
            "type": "integer"
          },
          "Partial": {
            "type": "integer"
          },
          "Supported": {
            "type": "integer"
          },
          "Unsupported": {
            "type": "integer"
          },
          "Untested": {
            "type": "integer"
          }
        },
        "required": [
          "Supported",
          "Partial",
          "Failed",
          "Unsupported",
          "Untested"
        ],
        "type": "object"
      },
      "Criterion": {
        "properties": {
          "blocking": {
            "description": "A failure in this category makes the whole configuration fail",
            "type": "boolean"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "description": "The criterion ID reports use, e.g. network.wifi",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "retired": {
            "description": "No longer tested; kept so old reports still resolve",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "category",
          "name"
        ],
        "type": "object"
      },
      "CriterionList": {
        "properties": {
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/Criterion"
            },
            "type": "array"
          }
        },
        "required": [
          "capabilities"
        ],
        "type": "object"
      },
      "CriterionStatus": {
        "properties": {
          "conflict": {
            "description": "Accepted reports on the same Omarchy build disagree",
            "type": "boolean"
          },
          "fix": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Fix"
              }
            ],
            "description": "The fix issue for a failed criterion"
          },
          "id": {
            "type": "string"
          },
          "kernel": {
            "type": "string"
          },
          "latest_report": {
            "description": "The code of the report that set this verdict",
            "type": "string"
          },
          "method": {
            "description": "automatic, observed or fixture",
            "type": "string"
          },
          "newest_build": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NewestBuild"
              }
            ],
            "description": "The result on the newest pre-release or edge build, when it differs"
          },
          "omarchy": {
            "type": "string"
          },
          "omarchy_channel": {
            "type": "string"
          },
          "ports": {
            "description": "Per-connector results, for port criteria",
            "items": {
              "$ref": "#/components/schemas/PortStatus"
            },
            "type": "array"
          },
          "stale": {
            "description": "Tested on an Omarchy release older than the current major",
            "type": "boolean"
          },
          "tested_at": {
            "type": "string"
          },
          "unsupported_reason": {
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        },
        "required": [
          "id",
          "verdict"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "error": {
            "type": "string"
          },
          "problems": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Fix": {
        "properties": {
          "assignee": {
            "type": "string"
          },
          "fix_link": {
            "type": "string"
          },
          "issue": {
            "type": "integer"
          },
          "last_activity": {
            "type": "string"
          },
          "retest": {
            "type": "boolean"
          },
          "state": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "issue",
          "url",
          "state"
        ],
        "type": "object"
      },
      "Flag": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "detail"
        ],
        "type": "object"
      },
      "Index": {
        "properties": {
          "docs": {
            "type": "string"
          },
          "endpoints": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Each endpoint's path, with its method when that isn't GET",
            "type": "object"
          },
          "mcp": {
            "description": "The MCP server, for AI assistants",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "schema": {
            "description": "The report format version submissions use",
            "type": "string"
          }
        },
        "required": [
          "name",
          "docs",
          "schema",
          "endpoints",
          "mcp"
        ],
        "type": "object"
      },
      "Mac": {
        "properties": {
          "board_ids": {
            "description": "Apple board IDs, e.g. Mac-94245A3940C91C80",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "configs": {
            "description": "Its configuration IDs",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "configurations": {
            "items": {
              "$ref": "#/components/schemas/Configuration"
            },
            "type": "array"
          },
          "efi": {
            "description": "The firmware's EFI width: 32 or 64",
            "type": "integer"
          },
          "hard_blocker": {
            "description": "Why no configuration can run Omarchy (e.g. a 32-bit CPU)",
            "type": "string"
          },
          "identifier": {
            "description": "The model identifier, e.g. MacBookPro8,2",
            "type": "string"
          },
          "line": {
            "description": "The product line, e.g. macbook-pro",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "security_chip": {
            "description": "t1 or t2, when it has one",
            "type": "string"
          },
          "url": {
            "description": "Its page on the site",
            "type": "string"
          },
          "verdicts": {
            "description": "The distinct verdicts of its configurations",
            "items": {
              "$ref": "#/components/schemas/Verdict"
            },
            "type": "array"
          },
          "years": {
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "name",
          "line",
          "years",
          "verdicts",
          "configs",
          "url",
          "efi",
          "board_ids",
          "configurations"
        ],
        "type": "object"
      },
      "MacList": {
        "properties": {
          "macs": {
            "items": {
              "$ref": "#/components/schemas/MacSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "macs"
        ],
        "type": "object"
      },
      "MacSummary": {
        "properties": {
          "configs": {
            "description": "Its configuration IDs",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "identifier": {
            "description": "The model identifier, e.g. MacBookPro8,2",
            "type": "string"
          },
          "line": {
            "description": "The product line, e.g. macbook-pro",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "description": "Its page on the site",
            "type": "string"
          },
          "verdicts": {
            "description": "The distinct verdicts of its configurations",
            "items": {
              "$ref": "#/components/schemas/Verdict"
            },
            "type": "array"
          },
          "years": {
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "name",
          "line",
          "years",
          "verdicts",
          "configs",
          "url"
        ],
        "type": "object"
      },
      "MatchCandidate": {
        "properties": {
          "config": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "matched": {
            "description": "Probe IDs its components have",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "not_reported": {
            "description": "Its distinguishing parts the probe doesn't show",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "score": {
            "description": "Higher fits better; only the order matters",
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "config",
          "score",
          "matched",
          "not_reported",
          "label",
          "url"
        ],
        "type": "object"
      },
      "MatchResult": {
        "properties": {
          "best": {
            "description": "Every configuration tied at the top score; their order means nothing",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "by": {
            "description": "What identified the Mac: product_name, board_id or devices",
            "type": "string"
          },
          "candidates": {
            "description": "Every configuration, best first",
            "items": {
              "$ref": "#/components/schemas/MatchCandidate"
            },
            "type": "array"
          },
          "config": {
            "description": "The single best configuration, or null when several fit equally",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "exact": {
            "description": "Exactly one configuration fits",
            "type": "boolean"
          },
          "identifier": {
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "by",
          "exact",
          "config",
          "best",
          "candidates"
        ],
        "type": "object"
      },
      "NewestBuild": {
        "properties": {
          "omarchy": {
            "type": "string"
          },
          "omarchy_channel": {
            "type": "string"
          },
          "report": {
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        },
        "required": [
          "verdict",
          "omarchy",
          "omarchy_channel",
          "report"
        ],
        "type": "object"
      },
      "PortStatus": {
        "properties": {
          "connector": {
            "type": "string"
          },
          "covered_by": {
            "type": "string"
          },
          "possible_hardware_fault": {
            "type": "boolean"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        },
        "required": [
          "connector",
          "verdict"
        ],
        "type": "object"
      },
      "Probe": {
        "properties": {
          "board_id": {
            "description": "e.g. Mac-94245A3940C91C80 (Linux: /sys/class/dmi/id/board_name)",
            "type": "string"
          },
          "cpu": {
            "description": "The processor's name, e.g. Intel(R) Core(TM) i7-2635QM CPU @ 2.00GHz",
            "type": "string"
          },
          "pci": {
            "description": "PCI vendor:device IDs, e.g. 1002:6760 (lspci -nn)",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "product_name": {
            "description": "The model identifier, e.g. MacBookPro8,2 (Linux: /sys/class/dmi/id/product_name)",
            "type": "string"
          },
          "usb": {
            "description": "USB vendor:product IDs (lsusb)",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "product_name",
          "board_id",
          "pci",
          "usb"
        ],
        "type": "object"
      },
      "ReportRef": {
        "properties": {
          "code": {
            "type": "string"
          },
          "kernel": {
            "type": "string"
          },
          "omarchy": {
            "type": "string"
          },
          "omarchy_channel": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "tested_at": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "state",
          "tested_at",
          "omarchy",
          "omarchy_channel",
          "url"
        ],
        "type": "object"
      },
      "ReportStatus": {
        "properties": {
          "code": {
            "type": "string"
          },
          "config": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "reason": {
            "description": "Why it was rejected or retracted",
            "type": "string"
          },
          "state": {
            "description": "pending, accepted, rejected or retracted",
            "type": "string"
          },
          "submitted_at": {
            "type": "string"
          },
          "tested_at": {
            "type": "string"
          },
          "url": {
            "description": "Its public page, once accepted",
            "type": "string"
          }
        },
        "required": [
          "code",
          "state",
          "config",
          "identifier",
          "tested_at",
          "submitted_at"
        ],
        "type": "object"
      },
      "Submitted": {
        "properties": {
          "candidates": {
            "description": "The configurations that fit equally, when the hardware couldn't tell them apart",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "code": {
            "description": "The report's code; keep it to check its state",
            "type": "string"
          },
          "config": {
            "description": "The configuration it was matched to (empty when several fit)",
            "type": "string"
          },
          "flags": {
            "description": "Things a maintainer will check, e.g. duplicate or hardware_mismatch",
            "items": {
              "$ref": "#/components/schemas/Flag"
            },
            "type": "array"
          },
          "state": {
            "description": "pending until a maintainer reviews it",
            "type": "string"
          },
          "status_url": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "state",
          "config",
          "candidates",
          "flags",
          "status_url"
        ],
        "type": "object"
      },
      "Verdict": {
        "enum": [
          "supported",
          "partial",
          "failed",
          "unsupported",
          "untested",
          "not-compatible"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "sourceKey": {
        "description": "A source key (doi_ plus 32 characters), issued to registered test tools.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "url": "https://doesitomarchy.com/api"
  },
  "info": {
    "description": "How well Omarchy runs on every Intel Mac (2006–2020), per configuration. Reads are public JSON with CORS and need no key; submitting diagnostic reports needs a source key. Catalog data is CC BY-SA 4.0. AI assistants can use the MCP server at https://doesitomarchy.com/mcp instead. Docs: https://doesitomarchy.com/api",
    "license": {
      "name": "CC BY-SA 4.0 (data)",
      "url": "https://creativecommons.org/licenses/by-sa/4.0/"
    },
    "title": "DoesItOmarchy API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#intro"
        },
        "operationId": "index",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Index"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "List the endpoints"
      }
    },
    "/capabilities": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#capabilities"
        },
        "operationId": "capabilities",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriterionList"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "List the test criteria"
      }
    },
    "/configs/{id}": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#config"
        },
        "operationId": "config",
        "parameters": [
          {
            "description": "A configuration ID, from a Mac's configs",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Configuration"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "Get a configuration: hardware, ports, criteria status and reports"
      }
    },
    "/macs": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#macs"
        },
        "operationId": "macs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MacList"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "List every Intel Mac"
      }
    },
    "/macs/{identifier}": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#mac"
        },
        "operationId": "mac",
        "parameters": [
          {
            "description": "A model identifier, e.g. MacBookPro8,2 (MacBookPro8-2 works too)",
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mac"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "Get a Mac and all its configurations"
      }
    },
    "/match": {
      "post": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#match"
        },
        "operationId": "match",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Probe"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "Identify a Mac and its configuration from hardware IDs"
      }
    },
    "/openapi.json": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#ai"
        },
        "operationId": "openapi",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "This API as an OpenAPI 3.1 document"
      }
    },
    "/reports": {
      "post": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#submit"
        },
        "operationId": "submit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "https://doesitomarchy.com/api/v1/schema"
              }
            },
            "application/yaml": {
              "schema": {
                "$ref": "https://doesitomarchy.com/api/v1/schema"
              }
            }
          },
          "description": "One report in the doesitomarchy/report/v1 format, as JSON or YAML.",
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Submitted"
                }
              }
            },
            "description": "Created: the report is pending review"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "security": [
          {
            "sourceKey": []
          }
        ],
        "summary": "Submit a diagnostic report (needs a source key)"
      }
    },
    "/reports/{code}": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#report"
        },
        "operationId": "report",
        "parameters": [
          {
            "description": "A report's code, from the reply to a submission",
            "in": "path",
            "name": "code",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportStatus"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "Check where a submitted report stands"
      }
    },
    "/schema": {
      "get": {
        "externalDocs": {
          "url": "https://doesitomarchy.com/api#format"
        },
        "operationId": "schema",
        "responses": {
          "200": {
            "content": {
              "application/schema+json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "An error: `error` says what went wrong; `problems` lists every problem in a report."
          }
        },
        "summary": "The diagnostic report format, as JSON Schema"
      }
    }
  },
  "servers": [
    {
      "url": "https://doesitomarchy.com/api/v1"
    }
  ]
}
