{
  "openapi": "3.1.0",
  "info": {
    "title": "PreviewSmith Helper Releases API",
    "version": "1.0.0",
    "description": "Release manifest for the PreviewSmith macOS helper. `GET /versions.json` returns the list of published helper versions, newest first.",
    "contact": {
      "name": "Delightful Apps PTY LTD support",
      "email": "support@previewsmith.app",
      "url": "https://helper.previewsmith.app"
    }
  },
  "servers": [
    {
      "url": "https://helper.previewsmith.app",
      "description": "Production"
    }
  ],
  "paths": {
    "/versions.json": {
      "get": {
        "summary": "List published helper releases",
        "description": "Returns every published PreviewSmith helper version, ordered newest first.",
        "operationId": "getVersions",
        "responses": {
          "200": {
            "description": "The release manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Release"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Release": {
        "type": "object",
        "description": "A single published helper release.",
        "required": [
          "version",
          "build",
          "releaseDate",
          "minimumSystemVersion",
          "minimumAppVersion",
          "url",
          "size",
          "sha256",
          "notes"
        ],
        "properties": {
          "version": {
            "type": "string",
            "pattern": "^\\d{4}\\.\\d+$",
            "description": "Helper release version, `YYYY.x`.",
            "examples": [
              "2026.1"
            ]
          },
          "build": {
            "type": "string",
            "description": "Monotonic build number.",
            "examples": [
              "1"
            ]
          },
          "releaseDate": {
            "type": "string",
            "format": "date",
            "description": "Release date, `YYYY-MM-DD`.",
            "examples": [
              "2026-07-13"
            ]
          },
          "minimumSystemVersion": {
            "type": "string",
            "description": "Minimum macOS version required to run this helper build.",
            "examples": [
              "13.0"
            ]
          },
          "minimumAppVersion": {
            "type": "string",
            "pattern": "^\\d{4}\\.\\d+$",
            "description": "Minimum PreviewSmith app version (`YYYY.x`) that supports this helper build.",
            "examples": [
              "2026.1"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Download URL for the release archive.",
            "examples": [
              "https://helper.previewsmith.app/downloads/PreviewSmithHelper-2026.1.zip"
            ]
          },
          "size": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Size of the release archive in bytes. `null` if the archive is missing at build time.",
            "examples": [
              261
            ]
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "description": "SHA-256 hex digest of the release archive. `null` if the archive is missing at build time.",
            "examples": [
              "4b0bbcab9a0da1d4561cca9c28f77fa75d886811bc0944e97695710ff2124934"
            ]
          },
          "notes": {
            "type": "string",
            "description": "Human-readable release notes.",
            "examples": [
              "Initial release of the PreviewSmith helper."
            ]
          }
        }
      }
    }
  }
}
